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

Depth bias support for WebGPU and refactor to add it to the DepthState #5871

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

mvaligursky
Copy link
Contributor

@mvaligursky mvaligursky commented Dec 1, 2023

Fixes #5688

  • depth bias is supported on WebGPU (both Material and Shadow map)
  • bias values are now part of the DepthState to avoid some conditions for each draw call - lights now stores the depth state used by it's shadow renderer, and that contains the shadow bias
  • removed private API no longer needed from GraphicsDevice: setDepthBias and setDepthBiasValues
  • updated MeshDecals example to not offset the plane to avoid z-fighting with decals, but to use bias on the decal material
    Screenshot 2023-12-01 at 11 35 06

@mvaligursky mvaligursky self-assigned this Dec 1, 2023
@mvaligursky mvaligursky added feature area: graphics Graphics related issue labels Dec 1, 2023
@mvaligursky mvaligursky changed the title Depth bias support for WebGPU and refactor to be part of DepthState Depth bias support for WebGPU and refactor to add it to the DepthState Dec 1, 2023
@mvaligursky mvaligursky merged commit d1eea67 into main Dec 1, 2023
@mvaligursky mvaligursky deleted the mv-depth-bias branch December 1, 2023 16:15
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 this pull request may close these issues.

Support depth bias on WebGPU Platform
2 participants