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

WebGPU support to shadow atlas (shadow cascades + clustered shadows) #5118

Merged
merged 3 commits into from
Mar 3, 2023

Conversation

mvaligursky
Copy link
Contributor

@mvaligursky mvaligursky commented Mar 1, 2023

  • shadow shaders updated to work with WebGPU
  • added a private way to display unfiltered texture for debugging, such as shadow map (WebGPU only) - this involved supporting multiple samplers per texture.
  • handling renderTarget.flipY when rendering using a viewport (shadow atlas) by flipping viewport as well on WebGPU
  • using WebGPU error scopes to report bind group validation errors with additional relevant data (used descriptors ...) to considerably improve understanding of those errors. To be used to validate other WeGPU APIs in the future. Based on https://toji.dev/webgpu-best-practices/error-handling

Missing for full support of clustered shadows:

  • support to clear only part of the render target (viewport) - WebGPU does not have a clear function to do this, and it needs to be implemented using a quad draw. Separate PR. This is to handle a case where not all shadows are updated per frame, and so the whole render target cannot get cleared.
clustered-shadows.mov

@mvaligursky mvaligursky mentioned this pull request Mar 1, 2023
@mvaligursky mvaligursky self-assigned this Mar 1, 2023
@mvaligursky mvaligursky added the area: graphics Graphics related issue label Mar 1, 2023
Copy link
Contributor

@willeastcott willeastcott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving with minor feedback...

Martin Valigursky added 2 commits March 3, 2023 14:12
@mvaligursky mvaligursky merged commit 1a640d5 into main Mar 3, 2023
@mvaligursky mvaligursky deleted the mv-webgpu-shadow-atlas branch March 3, 2023 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants