Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further SceneDepth refactoring / changes needed #3133

Closed
mvaligursky opened this issue Apr 29, 2021 · 2 comments
Closed

Further SceneDepth refactoring / changes needed #3133

mvaligursky opened this issue Apr 29, 2021 · 2 comments
Assignees
Labels
area: graphics Graphics related issue feature

Comments

@mvaligursky
Copy link
Contributor

A follow up for this could be done in the future: #3132

Issues and possible solutions:

  1. Internally requestDepthMap() is used to request depth texture, which enables the depth layer. The problem is that the depth layer is added to cameras by default, and so when multiple cameras are used, all of them render depth to texture.
    This should be done similarly to how postprocessing is integrated to Layer Composition. When postprocessing is required for the camera, a property on CameraComponent is set. LayerComposition adds flag to RenderActions and callback executes from ForwardRenderer.

  2. SceneDepth currently uses device.width and height for render targets. This is not very compatible with using depth as part of post processing on a camera that renders to a texture with different size. Solution for issue 1 would solve it by handling it per camera.

  3. we could support option to render the the depth map before the camera renders, allowing SSAO to run ahead of time and be useable in main lighting pass. This would also prime the depth buffer on webgl2 platform to limit overdraw to gain some performance on heavy shaders.

@mvaligursky mvaligursky added enhancement area: graphics Graphics related issue labels Apr 29, 2021
@mvaligursky mvaligursky added this to the Depth buffer rendering milestone Apr 29, 2021
@mvaligursky mvaligursky self-assigned this Apr 29, 2021
@mvaligursky
Copy link
Contributor Author

  1. has been addressed by Refactored the grab pass and scene depth rendering #4244

@mvaligursky
Copy link
Contributor Author

Points 2 and 3 are addressed by the render pass architecture already, closing as the current architecture will not be addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue feature
Projects
None yet
Development

No branches or pull requests

2 participants