Search Issue Tracker
By Design
Votes
0
Found in [Package]
13.1.4
Issue ID
1385527
Regression
No
Shader Graph Scene Depth node returns no value when using Opaque Surface Type
How to reproduce:
1. Open the user's attached project
2. Open scene Assets/SceneDepth_bugreport
3. Observe the GameObjects "opaque" and "transparent" in the Scene view or Game view
Expected result: Scene Depth node returns a value and the "opaque" GameObject is not black
Actual result: Scene Depth node returns no value and the "opaque" GameObject is black
Reproducible with: 10.8.1 (2020.3.26f1), 12.1.3 (2021.2.8f1), 13.1.4 (2022.1.0b4, 2022.2.0a2)
Could not test with: 7.7.1 (2019.4.34f1) (scripts missing after downgrading)
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
- Memory leak when a lot of UI elements are spawned and despawned
- Warnings are not logged in the Console window when using external code analyzers
- Errors “TLS Allocator ALLOC_TEMP_TLS, underlying allocator ALLOC_TEMP_MAIN has unfreed allocations, size 288“ appear constantly when Prefab is open
- Crash on PPtr<Shader>::operator or NullException errors spammed in console when calling Dispose() on null GraphicsBuffer with baked Reflection Probes
- “EndRenderPass: Not inside a Renderpass” and other Render Graph errors in the Player when Render Graph is enabled and Overlay UI is used
Resolution Note:
The Scene Depth node only works on Transparents because it samples the depth buffer (that is only available after the opaques are done rendering). This is working as designed. If you need the depth of opaque objects you can wire the Camera's Position into the A port of the Distance node and wire the Position (set to Absolute World space) into the B port of the Distance node. It's possible that we may choose to alter the Scene Depth node in the future so that it performs these operations, but that will be a new feature, not as a bug resolution.