use super::*;
#[derive(Clone, Copy, Data, Debug, PartialEq)]
pub struct PointLight3D {
#[get(type(copy))]
pub(crate) position: Vec3,
#[get(type(copy))]
pub(crate) color: Vec3,
#[get(type(copy))]
pub(crate) intensity: f32,
#[get(type(copy))]
pub(crate) radius: f32,
#[get(type(copy))]
pub(crate) cast_shadows: bool,
}
#[derive(Clone, Copy, Data, Debug, PartialEq)]
pub struct SpotLight3D {
#[get(type(copy))]
pub(crate) position: Vec3,
#[get(type(copy))]
pub(crate) direction: Vec3,
#[get(type(copy))]
pub(crate) color: Vec3,
#[get(type(copy))]
pub(crate) intensity: f32,
#[get(type(copy))]
pub(crate) range: f32,
#[get(type(copy))]
pub(crate) inner_cos: f32,
#[get(type(copy))]
pub(crate) outer_cos: f32,
}
#[repr(C, align(16))]
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub(crate) struct PackedLocalLight {
pub(crate) pos_inv_r2: [f32; 4],
pub(crate) radiance_radius: [f32; 4],
pub(crate) dir_outer_cos: [f32; 4],
pub(crate) inv_cone_span: [f32; 4],
}
#[derive(Clone, Data, Debug)]
pub struct LightClusterGrid3D {
#[get(type(copy))]
pub(crate) near_plane: f32,
#[get(type(copy))]
pub(crate) far_plane: f32,
#[get(type(copy))]
pub(crate) log_depth_scale: f32,
#[get(skip)]
#[get_mut(skip)]
#[set(skip)]
pub(crate) depth_slice_max: [f32; LIGHT_CLUSTER_GRID_Z],
#[get(type(copy))]
pub(crate) active_light_count: usize,
#[get(type(copy))]
pub(crate) total_assignments: usize,
#[get(skip)]
#[get_mut(skip)]
#[set(skip)]
pub(crate) packed_lights: Vec<PackedLocalLight>,
#[get(skip)]
#[get_mut(skip)]
#[set(skip)]
pub(crate) cluster_counts: Vec<u16>,
#[get(skip)]
#[get_mut(skip)]
#[set(skip)]
pub(crate) cluster_indices: Vec<u16>,
}
#[derive(Clone, Data, Debug)]
pub struct VsmCascade {
#[get(type(copy))]
pub(crate) resolution: usize,
#[get(type(copy))]
pub(crate) half_extent_m: f32,
#[get(type(copy))]
pub(crate) snapped_center: Vec3,
#[get(type(copy))]
pub(crate) light_right: Vec3,
#[get(type(copy))]
pub(crate) light_up: Vec3,
#[get(type(copy))]
pub(crate) light_forward: Vec3,
#[get(type(copy))]
pub(crate) depth_min: f32,
#[get(type(copy))]
pub(crate) depth_max: f32,
#[get(type(copy))]
pub(crate) static_valid: bool,
#[get(skip)]
#[get_mut(skip)]
#[set(skip)]
pub(crate) static_depth: Vec<f32>,
#[get(skip)]
#[get_mut(skip)]
#[set(skip)]
pub(crate) active_depth: Vec<f32>,
}
#[derive(Clone, Data, Debug)]
pub struct VirtualShadowMap {
pub(crate) cascade_near: VsmCascade,
pub(crate) cascade_far: VsmCascade,
#[get(type(copy))]
pub(crate) cached_sun_dir: Vec3,
#[get(type(copy))]
pub(crate) cached_static_epoch: u64,
#[get(type(copy))]
pub(crate) static_cache_hits: u64,
#[get(type(copy))]
pub(crate) static_rebuilds: u64,
}