Search Issue Tracker
By Design
Votes
0
Found in
2017.4.0f1
Issue ID
1078963
Regression
No
BuiltinRenderTextureType.CameraTarget is rendered black when HDR & MSAA is disabled in Forward Rendering
How to reproduce:
1. Open the attached "Test.zip" project
2. In the Hierarchy window select Main Camera then go to Inspector window -> Camera and disable Allow HDR and Allow MSAA
3. Enter the Game mode
4. Hover a mouse over rotating shapes in the scene
Expected: The rendered scene stays visible
Actual: The rendered scene becomes black
Reproduced on: 2017.4.11f1, 2018.1.9f2, 2018.2.8f1, 2018.3.0b2, 2019.1.0a1
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:
In forward rendering, if HDR / MSAA is not turned on, the objects are directly rendered to the "screen". They are not stored on a texture so that's why you can't blit anything from the CameraTarget. Which you can see on frame debugger, the target texture is null.
When you turn on HDR or MSAA, in order to use HDR or MSAA, the target texture format/settings have to match. i.e. for HDR, you need a float format texture, and MSAA you need to set multisample > 1 to the texture. In this case, the render pipeline will create a new texture matching these settings. Then the objects are rendered into this texture instead of direct to the "screen". The texture will then be used for post-processing / MSAA where texture read/write happens. CameraTarget will point to this texture when doing rendering, and that's why user can blit in this case.
Similar with deferred, which is a multi-render-target (MRT) pipeline where there are 4 textures. Albedo, normal, specular etc so they are all textures. So this is also why CameraTarget is not null and you can blit in deferred.