bevy/crates
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
..
bevy_a11y Set the logo and favicon for all of Bevy's published crates (#12696) 2024-03-25 18:52:50 +00:00
bevy_animation Clean up some low level dependencies (#12858) 2024-04-08 19:45:42 +00:00
bevy_app Clean up some low level dependencies (#12858) 2024-04-08 19:45:42 +00:00
bevy_asset Error info has been added to LoadState::Failed (#12709) 2024-04-04 14:04:27 +00:00
bevy_audio updated audio_source.rs documentation (#12765) 2024-03-28 19:10:09 +00:00
bevy_color Clean up some low level dependencies (#12858) 2024-04-08 19:45:42 +00:00
bevy_core Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
bevy_core_pipeline Consolidate Render(Ui)Materials(2d) into RenderAssets (#12827) 2024-04-09 13:26:34 +00:00
bevy_derive Forbid unsafe in most crates in the engine (#12684) 2024-03-27 03:30:08 +00:00
bevy_dev_tools remove close_on_esc (#12859) 2024-04-03 18:02:50 +00:00
bevy_diagnostic Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
bevy_dylib Set the logo and favicon for all of Bevy's published crates (#12696) 2024-03-25 18:52:50 +00:00
bevy_dynamic_plugin Forbid unsafe in most crates in the engine (#12684) 2024-03-27 03:30:08 +00:00
bevy_ecs Clean up some low level dependencies (#12858) 2024-04-08 19:45:42 +00:00
bevy_ecs_compile_fail_tests Fix Ci failing over dead code in tests (#12623) 2024-03-21 18:08:47 +00:00
bevy_encase_derive Forbid unsafe in most crates in the engine (#12684) 2024-03-27 03:30:08 +00:00
bevy_gilrs Forbid unsafe in most crates in the engine (#12684) 2024-03-27 03:30:08 +00:00
bevy_gizmos Add tetrahedron gizmos (#12914) 2024-04-10 17:59:58 +00:00
bevy_gltf Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
bevy_hierarchy Forbid unsafe in most crates in the engine (#12684) 2024-03-27 03:30:08 +00:00
bevy_input fix previous_position / previous_force being discarded too early (#12556) 2024-04-01 21:45:47 +00:00
bevy_internal Fix ambiguities causing a crash (#12780) 2024-03-29 16:00:13 +00:00
bevy_log Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
bevy_macro_utils Clean up some low level dependencies (#12858) 2024-04-08 19:45:42 +00:00
bevy_macros_compile_fail_tests Fix Ci failing over dead code in tests (#12623) 2024-03-21 18:08:47 +00:00
bevy_math Random sampling of directions and quaternions (#12857) 2024-04-04 23:13:00 +00:00
bevy_mikktspace Forbid unsafe in most crates in the engine (#12684) 2024-03-27 03:30:08 +00:00
bevy_pbr Implement percentage-closer filtering (PCF) for point lights. (#12910) 2024-04-10 20:16:08 +00:00
bevy_ptr Document the lifetime requirement of byte_offset and byte_add (#12893) 2024-04-08 17:13:35 +00:00
bevy_reflect Meshing for Annulus primitive (#12734) 2024-04-01 21:55:49 +00:00
bevy_reflect_compile_fail_tests Fix Ci failing over dead code in tests (#12623) 2024-03-21 18:08:47 +00:00
bevy_render Implement percentage-closer filtering (PCF) for point lights. (#12910) 2024-04-10 20:16:08 +00:00
bevy_scene Clean up some low level dependencies (#12858) 2024-04-08 19:45:42 +00:00
bevy_sprite Generate MeshUniforms on the GPU via compute shader where available. (#12773) 2024-04-10 05:33:32 +00:00
bevy_tasks Fix beta CI (#12913) 2024-04-09 17:33:59 +00:00
bevy_text Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
bevy_time Remove redundant imports (#12817) 2024-04-01 19:59:08 +00:00
bevy_transform Remove redundant imports (#12817) 2024-04-01 19:59:08 +00:00
bevy_ui Consolidate Render(Ui)Materials(2d) into RenderAssets (#12827) 2024-04-09 13:26:34 +00:00
bevy_utils Moves intern and label modules into bevy_ecs (#12772) 2024-04-08 15:34:11 +00:00
bevy_window Move close_on_esc to bevy_dev_tools (#12855) 2024-04-03 01:29:06 +00:00
bevy_winit Fix beta CI (#12913) 2024-04-09 17:33:59 +00:00