bevy/crates/bevy_pbr/src/render
Patrick Walton d59b1e71ef
Implement percentage-closer filtering (PCF) for point lights. (#12910)
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.
2024-04-10 20:16:08 +00:00
..
clustered_forward.wgsl Add random shader utils, fix cluster_debug_visualization (#11956) 2024-02-26 15:59:44 +00:00
fog.rs Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
fog.wgsl update shader imports (#10180) 2023-10-21 11:51:58 +00:00
forward_io.wgsl Implement lightmaps. (#10231) 2024-01-02 20:38:47 +00:00
gpu_preprocess.rs Generate MeshUniforms on the GPU via compute shader where available. (#12773) 2024-04-10 05:33:32 +00:00
light.rs Generate MeshUniforms on the GPU via compute shader where available. (#12773) 2024-04-10 05:33:32 +00:00
mesh.rs Implement percentage-closer filtering (PCF) for point lights. (#12910) 2024-04-10 20:16:08 +00:00
mesh.wgsl Update to wgpu 0.19 and raw-window-handle 0.6 (#11280) 2024-01-26 18:14:21 +00:00
mesh_bindings.rs Implement lightmaps. (#10231) 2024-01-02 20:38:47 +00:00
mesh_bindings.wgsl Swap material and mesh bind groups (#10485) 2023-11-28 22:26:22 +00:00
mesh_functions.wgsl Add support for KHR_texture_transform (#11904) 2024-02-21 01:11:28 +00:00
mesh_preprocess.wgsl Generate MeshUniforms on the GPU via compute shader where available. (#12773) 2024-04-10 05:33:32 +00:00
mesh_types.wgsl Add support for KHR_texture_transform (#11904) 2024-02-21 01:11:28 +00:00
mesh_view_bindings.rs Consolidate Render(Ui)Materials(2d) into RenderAssets (#12827) 2024-04-09 13:26:34 +00:00
mesh_view_bindings.wgsl FIX: iOS Simulator not rendering due to missing CUBE_ARRAY_TEXTURES (#12052) 2024-02-23 01:24:59 +00:00
mesh_view_types.wgsl Implement irradiance volumes. (#10268) 2024-02-06 23:23:20 +00:00
mod.rs Generate MeshUniforms on the GPU via compute shader where available. (#12773) 2024-04-10 05:33:32 +00:00
morph.rs Relax BufferVec's type constraints (#12866) 2024-04-05 02:11:41 +00:00
morph.wgsl Swap material and mesh bind groups (#10485) 2023-11-28 22:26:22 +00:00
parallax_mapping.wgsl update shader imports (#10180) 2023-10-21 11:51:58 +00:00
pbr.wgsl Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
pbr_ambient.wgsl Use “specular occlusion” term to consistently extinguish fresnel on Ambient and Environment Map lights (#10182) 2023-10-23 03:26:20 +00:00
pbr_bindings.wgsl Swap material and mesh bind groups (#10485) 2023-11-28 22:26:22 +00:00
pbr_fragment.wgsl Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
pbr_functions.wgsl Bump crate-ci/typos from 1.19.0 to 1.20.4 (#12907) 2024-04-08 15:31:11 +00:00
pbr_lighting.wgsl update shader imports (#10180) 2023-10-21 11:51:58 +00:00
pbr_prepass.wgsl Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
pbr_prepass_functions.wgsl Add previous_view_uniforms.inverse_view (#12902) 2024-04-07 18:59:16 +00:00
pbr_transmission.wgsl Exposure settings (adopted) (#11347) 2024-01-16 14:53:21 +00:00
pbr_types.wgsl Fix WebGL not rendering StandardMaterial (#12110) 2024-02-25 22:42:28 +00:00
rgb9e5.wgsl Deferred Renderer (#9258) 2023-10-12 22:10:38 +00:00
shadow_sampling.wgsl Implement percentage-closer filtering (PCF) for point lights. (#12910) 2024-04-10 20:16:08 +00:00
shadows.wgsl Implement percentage-closer filtering (PCF) for point lights. (#12910) 2024-04-10 20:16:08 +00:00
skin.rs try_insert NoAutomaticBatching (#12396) 2024-03-10 02:14:33 +00:00
skinning.wgsl Swap material and mesh bind groups (#10485) 2023-11-28 22:26:22 +00:00
utils.wgsl Add random shader utils, fix cluster_debug_visualization (#11956) 2024-02-26 15:59:44 +00:00
view_transformations.wgsl View Transformations (#9726) 2023-10-24 21:26:19 +00:00
wireframe.wgsl Swap material and mesh bind groups (#10485) 2023-11-28 22:26:22 +00:00