Skip to content

Check if depth is filterable in SSR and PCSS - #24992

Open
beicause wants to merge 6 commits into
bevyengine:mainfrom
beicause:check-depth-filterable
Open

Check if depth is filterable in SSR and PCSS#24992
beicause wants to merge 6 commits into
bevyengine:mainfrom
beicause:check-depth-filterable

Conversation

@beicause

Copy link
Copy Markdown
Member

Objective

Fixes #23965, Fixes #23977

Solution

Check if depth is filterable instead of #[cfg(not(target_arch = "wasm32"))] in SSR, and if not, disable PCSS.

Also replace the linear sampling emulation with a more effecient method via one textureGather.

TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES feature is removed from default wgpu settings, to make the settings respect WGPU_SETTINGS_PRIO="webgpu".

Testing

WGPU_SETTINGS_PRIO="webgpu" cargo r --example ssr --features bluenoise_texture
WGPU_SETTINGS_PRIO="webgpu" cargo r --example pcss --features experimental_pbr_pcss

The ssr example texture bindings (17) exceeds default webgpu limit (16). I disable ScreenSpaceAmbientOcclusion conditionally so it can run with webgpu limits.

@kfc35 kfc35 added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jul 15, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in Rendering Jul 15, 2026
@Zeophlite Zeophlite added the S-Merge-Conflicts Merge conflicts :( Add this label on top of other S- labels. label Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior S-Merge-Conflicts Merge conflicts :( Add this label on top of other S- labels. S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

Status: Needs SME Triage

Development

Successfully merging this pull request may close these issues.

PCSS samples depth with linear sampler which is poorly supported SSR samples depth with linear sampler, which is poorly supported

3 participants