euv-core 0.53.1

Core cross-platform runtime for euv featuring arena-based fine-grained reactivity, deterministic layout, flat scene graph, multi-mode rendering, and direct OS platform adapters.
Documentation
/// Horizontal froxel tile count of the UE5 Clustered Deferred Lighting grid.
pub const LIGHT_CLUSTER_GRID_X: usize = 16;

/// Vertical froxel tile count of the UE5 Clustered Deferred Lighting grid.
pub const LIGHT_CLUSTER_GRID_Y: usize = 9;

/// Logarithmic depth slice count of the UE5 Clustered Deferred Lighting grid.
pub const LIGHT_CLUSTER_GRID_Z: usize = 16;

/// Maximum local point/spot lights binned per individual 3D frustum froxel.
pub const LIGHT_CLUSTER_MAX_PER_FROXEL: usize = 16;

/// Maximum total packed local lights supported per frame in `LightClusterGrid3D`.
pub const LIGHT_CLUSTER_MAX_LIGHTS: usize = 256;

/// Default Virtual Shadow Map cascade edge resolution in texels (`160x160` L2-cache-resident atlas).
pub const VSM_DEFAULT_CASCADE_RES: usize = 160;

/// Number of Practical Split Cascaded Shadow Map cascades evaluated by `VirtualShadowMap`.
pub const VSM_CASCADE_COUNT: usize = 4;

/// Practical Split Scheme logarithmic/uniform blend weight (`lambda = 0.65`).
pub const VSM_CSM_LAMBDA: f32 = 0.65;

/// Default maximum directional shadow coverage distance in meters across all 4 CSM cascades.
pub const VSM_CSM_MAX_DISTANCE_M: f32 = 160.0;

/// Near VSM cascade world-space half-extent in meters (`16m` hero contact cascade).
pub const VSM_CASCADE_NEAR_EXTENT_M: f32 = 16.0;

/// Far VSM cascade world-space half-extent in meters (`140m` skyline cascade).
pub const VSM_CASCADE_FAR_EXTENT_M: f32 = 140.0;

/// Shadowed ambient floor matching BVH ray-traced shadow luminance (`0.22`).
pub(crate) const VSM_SHADOW_FLOOR: f32 = 0.22;

/// Minimum spot-light cone denominator avoiding division by zero when inner equals outer angle.
pub(crate) const SPOT_CONE_MIN_EPS: f32 = 1.0e-4;

/// Sixteen golden-angle Vogel-disk PCF tap offsets in normalized disk coordinates for smooth rotated shadow filtering.
pub(crate) const VSM_VOGEL_TAPS_16: [(f32, f32); 16] = [
    (0.176_777, 0.000_000),
    (-0.225_782, 0.206_707),
    (0.034_393, -0.393_812),
    (0.281_484, 0.373_427),
    (-0.517_484, -0.114_822),
    (0.453_740, -0.371_305),
    (-0.111_078, 0.627_806),
    (-0.375_241, -0.573_473),
    (0.713_134, 0.149_660),
    (-0.678_925, 0.364_092),
    (0.249_600, -0.770_432),
    (0.391_785, 0.731_267),
    (-0.858_541, -0.178_569),
    (0.848_639, -0.351_024),
    (-0.375_828, 0.873_238),
    (-0.359_113, -0.916_570),
];

/// Texel filter radius multiplier applied to rotated 16-tap Vogel-disk PCF sampling.
pub(crate) const VSM_VOGEL_FILTER_RADIUS_TEXELS: f32 = 1.85;