bevy/crates/bevy_pbr/src/meshlet
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
..
asset.rs Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
copy_material_depth.wgsl Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
cull_meshlets.wgsl Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
downsample_depth.wgsl Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
dummy_visibility_buffer_resolve.wgsl Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
from_mesh.rs Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
gpu_scene.rs Relax BufferVec's type constraints (#12866) 2024-04-05 02:11:41 +00:00
material_draw_nodes.rs Add previous_view_uniforms.inverse_view (#12902) 2024-04-07 18:59:16 +00:00
material_draw_prepare.rs Implement percentage-closer filtering (PCF) for point lights. (#12910) 2024-04-10 20:16:08 +00:00
meshlet_bindings.wgsl Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
meshlet_mesh_material.wgsl Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
meshlet_preview.png Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
mod.rs Refactor App and SubApp internals for better separation (#9202) 2024-03-31 03:16:10 +00:00
persistent_buffer.rs Make PersistentGpuBufferable a safe trait (#12744) 2024-03-29 13:14:34 +00:00
persistent_buffer_impls.rs Make PersistentGpuBufferable a safe trait (#12744) 2024-03-29 13:14:34 +00:00
pipelines.rs Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
visibility_buffer_raster.wgsl Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
visibility_buffer_raster_node.rs Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00
visibility_buffer_resolve.wgsl Add previous_view_uniforms.inverse_view (#12902) 2024-04-07 18:59:16 +00:00
write_index_buffer.wgsl Meshlet rendering (initial feature) (#10164) 2024-03-25 19:08:27 +00:00