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
- [macOS] Pop-up windows are misaligned on macOS Tahoe 26.0
- Console errors are thrown and import loop when adding "Default.tss" to Inherited Themes in Default Runtime Theme File Asset
- Cutout box is covered in a shadow when the object that houses the cutout is casting shadows
- There is no limit on how many Properties windows can be opened
- Some TextMesh Pro Font Asset Preview Box items icons are tiny or nonexistent
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.