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
- Prefab override popup is cropped/positioned incorrectly when more than one display is used and a higher display Scale is set
- Opening a dropdown on a small screen results in its instant closing when mouse cursor is pressed where the dropdown is going to be opened
- Only "ArgumentNullException: Value cannot be null" is displayed instead of all the actual errors when opening a project with numerous compilation errors
- MultiColumnListView and MultiColumnTreeView do not change selection on first input when focus is set by code
- SerializedProperty.DataEquals is returning false when SerializedProperty.EqualContents return true
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.