Search Issue Tracker
By Design
Votes
8
Found in
2017.1.1f1
Issue ID
952214
Regression
No
Graphics.Blit in OnRenderImage always causes a warning on entering Play mode when writing to a RenderTexture variable last
Steps to reproduce:
1.Open attached “WriteWarning.zip” Unity project
2.Open ‘test’ scene
3.Enter Play mode
Expected results:
No warning is given
Actual results:
'OnRenderImage() possibly didn't write anything to the destination texture!’ warning is given
Reproduced in: 2017.3.0b2, 2017.2.0f1, 2017.1.1p3, 5.6.3p4, 5.5.4p5, 5.5.0b3
Note: Even though the warning is given, the texture is always written
-
spajus
Jul 29, 2020 14:07
To help you out, this happens when OnRenderImage(source, destination) does not have active render texture set to "destination". For example if you do Graphics.Blit into somewhere else (downscaled copy of destination for example), active render texture will become that downscaled copy. One workaround is to do RenderTexture.active = destination in the end of your OnRenderImage, and make sure it does not return early.
Nobody will fix this issue because they closed it as "by design". For Unity team: it would be super useful is to include the actual active render texture name, expected render texture (destination) name and camera name in the warning message.
-
abishekhparivel
Jul 22, 2020 12:22
sorry got it
-
abishekhparivel
Jul 22, 2020 12:21
I am still getting this issue on 2019.3.12f1
-
AwesomeAlexx
Jan 30, 2020 15:17
I'm facing the same issue on 2019.2.17f1.
I have this warning :
"OnRenderImage() possibly didn't write anything to the destination texture!"Note: Even though the warning is given, the texture seems to always be written
-
RendCycle
Jul 05, 2018 13:19
Console Warning message is still present in Unity 2018.1.6f1.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
- VFX property value names are cut off when properties with 'Arc' are viewed in the VFX Blackboard
Resolution Note (2018.1.X):
Hello, this is by design. As written in the doc you're expected to render into the destination texture as it'll be the one used as a source for the rest of the render chain. It still works if you don't because there's a fail-safe in the engine but it will issue a warning as this is bad practice.