bevy/crates/bevy_pbr
Robert Swain d34ecd7584 bevy_pbr: Use a special first depth slice for clustered forward (#3545)
# Objective

- Using plain exponential depth slicing for perspective projection cameras results in unnecessarily many slices very close together close to the camera. If the camera is then moved close to a collection of point lights, they will likely exhaust the available uniform buffer space for the lists of which lights affect which clusters.

## Solution

- A simple solution to this is to use a different near plane value for the depth slicing and set it to where the first slice's far plane should be. The default value is 5 and works well. This results in the configured number of depth slices, maintains the exponential slicing beyond the initial slice, and no slices are too small such that they cause problems that are sensitive to the view position.
2022-01-07 21:25:59 +00:00
..
src bevy_pbr: Use a special first depth slice for clustered forward (#3545) 2022-01-07 21:25:59 +00:00
Cargo.toml Materials and MaterialPlugin (#3428) 2021-12-25 21:45:43 +00:00