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
- "Draw Additional Lights Shadowmap" calls increase when custom MaterialBlockProperty is used
- Crash on _platform_memmove when importing the "Dragon Crashers - URP 2D Sample Project" to a new 2D project
- "Shader is not supported on this GPU" warnings and and shaders are not loading when building the project for non-Chromium browsers
- [iOS][URP] The screen flickers and the "Execution of the command buffer was aborted due to an error during execution" error is thrown continuously
- Shortcut Manager shows empty conflict filter when resolving runtime conflicts involving different contexts
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.