Toast Engine
Loading...
Searching...
No Matches
shadow_slots.hpp File Reference
#include <cstdint>
#include <span>
Include dependency graph for shadow_slots.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  renderer::shadow_slots::Candidate
struct  renderer::shadow_slots::Slot

Functions

auto renderer::shadow_slots::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
auto renderer::shadow_slots::owns (std::span< const Slot > slots, uint64_t key) -> bool
auto renderer::shadow_slots::retention () -> float
auto renderer::shadow_slots::graceFrames () -> uint32_t
void renderer::shadow_slots::setRetention (float factor)
void renderer::shadow_slots::setGraceFrames (uint32_t frames)
auto renderer::shadow_slots::stableResolution (uint32_t current, float camera_distance, float resolution_scale) -> uint32_t
 Keeps the current tier until the camera distance leaves its band.

Variables

constexpr float renderer::shadow_slots::k_default_retention = 1.5f
 An owner keeps its slot unless outranked by this factor.
constexpr uint32_t renderer::shadow_slots::k_default_grace_frames = 30
 Frames an owner still counts as seen after it leaves the view.
constexpr float renderer::shadow_slots::k_distance_slack = 1.15f
 Owners keep casting this much past the light shadow distance.
constexpr float renderer::shadow_slots::k_resolution_band = 0.1f
 Relative camera distance band around a resolution tier switch.

Detailed Description

Author
dario
Date
21/09/2026