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
- [Android] Neither of the callbacks are called when several videos with VideoPlayer are spawned on the target on the Google Pixel devices
- Texture2D memory allocation size is significantly increased when running on iOS device
- No data received in Profiler when connecting to WebGL Player without "Autoconnect Profiler" option enabled
- Screen Space Ambient Occlusion is ignored when toggling "Post Processing" visibility in the Scene window overlay
- “RenderTexture.Create failed: requested size is too large.” errors are thrown and the Inspector window is black when selecting a CubemapArray texture
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.