10namespace renderer::shadow_slots {
26 float importance = 0.0f;
32 uint32_t hidden_frames = 0;
33 uint32_t resolution = 0;
37auto assign(std::span<const Candidate> candidates, std::span<Slot> slots, std::span<int32_t> slot_of) -> uint32_t;
40auto owns(std::span<const Slot> slots, uint64_t key) -> bool;
43auto retention() -> float;
46auto graceFrames() -> uint32_t;
48void setRetention(
float factor);
49void setGraceFrames(uint32_t frames);
53auto stableResolution(uint32_t current,
float camera_distance,
float resolution_scale) -> uint32_t;
auto stableResolution(uint32_t current, float camera_distance, float resolution_scale) -> uint32_t
Keeps the current tier until the camera distance leaves its band.
Definition shadow_slots.cpp:129
auto assign(std::span< const Candidate > candidates, std::span< Slot > slots, std::span< int32_t > slot_of) -> uint32_t
slot_of is -1 for losers and the return counts owners displaced
Definition shadow_slots.cpp:25
constexpr float k_distance_slack
Owners keep casting this much past the light shadow distance.
Definition shadow_slots.hpp:19
constexpr float k_default_retention
An owner keeps its slot unless outranked by this factor.
Definition shadow_slots.hpp:13
constexpr uint32_t k_default_grace_frames
Frames an owner still counts as seen after it leaves the view.
Definition shadow_slots.hpp:16
constexpr float k_resolution_band
Relative camera distance band around a resolution tier switch.
Definition shadow_slots.hpp:22
Definition shadow_slots.hpp:24
Definition shadow_slots.hpp:30