mirror of
https://github.com/bevyengine/bevy
synced 2024-12-20 18:13:10 +00:00
d59b1e71ef
I ported the two existing PCF techniques to the cubemap domain as best I could. Generally, the technique is to create a 2D orthonormal basis using Gram-Schmidt normalization, then apply the technique over that basis. The results look fine, though the shadow bias often needs adjusting. For comparison, Unity uses a 4-tap pattern for PCF on point lights of (1, 1, 1), (-1, -1, 1), (-1, 1, -1), (1, -1, -1). I tried this but didn't like the look, so I went with the design above, which ports the 2D techniques to the 3D domain. There's surprisingly little material on point light PCF. I've gone through every example using point lights and verified that the shadow maps look fine, adjusting biases as necessary. Fixes #3628. --- ## Changelog ### Added * Shadows from point lights now support percentage-closer filtering (PCF), and as a result look less aliased. ### Changed * `ShadowFilteringMethod::Castano13` and `ShadowFilteringMethod::Jimenez14` have been renamed to `ShadowFilteringMethod::Gaussian` and `ShadowFilteringMethod::Temporal` respectively. ## Migration Guide * `ShadowFilteringMethod::Castano13` and `ShadowFilteringMethod::Jimenez14` have been renamed to `ShadowFilteringMethod::Gaussian` and `ShadowFilteringMethod::Temporal` respectively. |
||
---|---|---|
.. | ||
clustered_forward.wgsl | ||
fog.rs | ||
fog.wgsl | ||
forward_io.wgsl | ||
gpu_preprocess.rs | ||
light.rs | ||
mesh.rs | ||
mesh.wgsl | ||
mesh_bindings.rs | ||
mesh_bindings.wgsl | ||
mesh_functions.wgsl | ||
mesh_preprocess.wgsl | ||
mesh_types.wgsl | ||
mesh_view_bindings.rs | ||
mesh_view_bindings.wgsl | ||
mesh_view_types.wgsl | ||
mod.rs | ||
morph.rs | ||
morph.wgsl | ||
parallax_mapping.wgsl | ||
pbr.wgsl | ||
pbr_ambient.wgsl | ||
pbr_bindings.wgsl | ||
pbr_fragment.wgsl | ||
pbr_functions.wgsl | ||
pbr_lighting.wgsl | ||
pbr_prepass.wgsl | ||
pbr_prepass_functions.wgsl | ||
pbr_transmission.wgsl | ||
pbr_types.wgsl | ||
rgb9e5.wgsl | ||
shadow_sampling.wgsl | ||
shadows.wgsl | ||
skin.rs | ||
skinning.wgsl | ||
utils.wgsl | ||
view_transformations.wgsl | ||
wireframe.wgsl |