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

Implement support for 16bit depth buffers shadow maps #5355

Closed
mvaligursky opened this issue May 30, 2023 · 0 comments · Fixed by #7142
Closed

Implement support for 16bit depth buffers shadow maps #5355

mvaligursky opened this issue May 30, 2023 · 0 comments · Fixed by #7142
Assignees
Labels
area: graphics Graphics related issue feature

Comments

@mvaligursky
Copy link
Contributor

Currently, a depth buffer which is part of the render target uses a depth format based on the device:

const depthFormat = device.webgl2 ? gl.DEPTH_COMPONENT32F : gl.DEPTH_COMPONENT16;

We would ideally:

  • take an optional parameter when RT is created to specify 16/32bit depth buffer.
  • this could be specifically useful for shadow maps to save half the memory bandwidth used
  • LightParameters used by the clustered lights would need to specify this, allowing clustered depth texture to be 16bit.

Some parts we'd need to possibly update:

  • the resolve depth buffer on webgl2
  • grab depth pass functionality would need to reflect the format
  • webgl1 implications (could leave untouched perhaps, as shadow depth map is using RGBA8)
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

Successfully merging a pull request may close this issue.

3 participants