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

Improvements to PCSS shadow sampling #7234

Open
4 of 7 tasks
mvaligursky opened this issue Dec 23, 2024 · 1 comment
Open
4 of 7 tasks

Improvements to PCSS shadow sampling #7234

mvaligursky opened this issue Dec 23, 2024 · 1 comment
Assignees
Labels
area: graphics Graphics related issue enhancement

Comments

@mvaligursky
Copy link
Contributor

mvaligursky commented Dec 23, 2024

Related to PCSS implementation: #5483

  • consider what needs to be done with the hardcoded constant here: Address PCSS softness #5483 (comment) DONE Overhaul of directional PCSS shadows #7258
  • the implementation uses hardcoded 16 samples #define PCSS_SAMPLE_COUNT 16 - perhaps add some control over this DONE Overhaul of directional PCSS shadows #7258
  • Make compatible with WebGPU, at least for directional lights. WebGPU only supports clustered lights currently, so other lights won't work unless PCSS is supported by clustered lights. DONE Overhaul of directional PCSS shadows #7258
  • R32F texture is used to store shadow depth map. We need a fallback for platforms that do not support it, perhaps the same as RenderPassPrepass uses, which stores the depth float bits in RGBA8, which then SSAO decodes back to float. DONE - added F32->F16->PCF3 fallback here: 3b1e69f
  • adjust omni and spot PCSS code to work as well as directional updated in Overhaul of directional PCSS shadows #7258
  • add sample randomization to allow smaller number of samples then TAA is enabled
  • We currently render to F32 texture + depth buffer, but only use the F32 texture. For directional lights (and eventually for all types) we store non-linear depth, meaning the color buffer contains the same data as depth buffer. On WebGPU, we should be able to avoid using color buffer entirely, and simply use depth buffer only - as long as we can load a single sample from it.
@mvaligursky mvaligursky added area: graphics Graphics related issue enhancement labels Dec 23, 2024
@mvaligursky mvaligursky self-assigned this Dec 23, 2024
@mvaligursky
Copy link
Contributor Author

updated in #7258

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

No branches or pull requests

1 participant