Currently SceneDepth only works if there is a shadow node in the pass. Furthermore SceneDepth uses the ShadowSceneDepth code path which is a little confusing when first looking at it.
Suggest implementing a separate GetSceneDepth which works with the current set rendering camera instead of querying the pass shadow node. The scene depth should be the intersection of the near/far planes with the current scene AABB. However I am not sure where these results should be cached (if at all), perhaps the camera, sceneManager, or current compositor node?
Currently SceneDepth only works if there is a shadow node in the pass. Furthermore SceneDepth uses the ShadowSceneDepth code path which is a little confusing when first looking at it.
Suggest implementing a separate GetSceneDepth which works with the current set rendering camera instead of querying the pass shadow node. The scene depth should be the intersection of the near/far planes with the current scene AABB. However I am not sure where these results should be cached (if at all), perhaps the camera, sceneManager, or current compositor node?