Search Issue Tracker
By Design
Votes
0
Found in
2021.1.0a7
Issue ID
1304130
Regression
No
[URP] [Camera] Depth seems incorrect to user when camera's postpro=off
Steps
1a. Open 16bpc minimal repro
1b. upgrade to URP, create a new UniversalRenderPipelineAsset
1c. assign URPAsset in Graphics settings
2. Open 16bpc scene
3. Observe only 1 cube rendered in plane textures
4. In hierarchy, Select cameras 16bpc and 8bpc
5. With both cameras selected, in inspector, check "Post-Processing"
6. Observe all cubes now rendered on planes
Expected: it is clear to the user that Post-processing will force depth texture attachment
Actual: it is not indicated that Camera > Target Texture > Depth Buffer=“No depth buffer” option has been overridden by enabling Post-processing on Camera
Repro: 2021.2 w/ URP
Notes:
- It is correct behaviour that depth can be off if DepthTexture="No depth texture" and PostPro = off
- This behaviour is not documented ( https://docs.unity3d.com/Manual/class-RenderTexture.html and https://docs.unity3d.com/Manual/class-Camera.html )
- Also happens with: post-pro=on, use depth = on, opaque texture = on
- Camera's depth setting is on Render Texture asset (which is set as Camera > Target Texture)
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:
This behaviour is by-design - priority is given to features which require a depth buffer so they work correctly.
To ensure depth buffer is disabled on a Render Texture asset, ensure Depth Buffer=No depth buffer on your render texture, and that no features are used which require depth.
For example:
- disable HDR on cameras using the render texture (when using Built-in Render Pipeline).
- disable post-processing on cameras using the render texture (when using Universal Render Pipeline)
Frame Debugger can be used to verify whether the depth buffer is used or not.
Changes are under consideration to make this behaviour more clear.