pub struct CsmCascadeSplits { /* private fields */ }Expand description
Practical-Split Cascaded Shadow Map configuration and texel-snapped cascade matrices.
Implementations§
Source§impl CsmCascadeSplits
Practical-split Cascaded Shadow Map calculation and cascade selection for CsmCascadeSplits.
impl CsmCascadeSplits
Practical-split Cascaded Shadow Map calculation and cascade selection for CsmCascadeSplits.
Sourcepub fn compute(
camera: &Camera3D,
aspect: f32,
light_dir: Vec3,
cascade_count: usize,
lambda: f32,
max_distance: f32,
resolution: u32,
) -> Self
pub fn compute( camera: &Camera3D, aspect: f32, light_dir: Vec3, cascade_count: usize, lambda: f32, max_distance: f32, resolution: u32, ) -> Self
Computes Practical-Split Cascaded Shadow Map splits with rotation-invariant bounding spheres and light-space texel snapping.
§Arguments
&Camera3D- Active 3D perspective camera.f32- Viewport width-to-height aspect ratio.Vec3- Unit direction vector pointing toward the directional light.usize- Requested cascade count (clamped to1..=CSM_MAX_CASCADES).f32- Practical split lambda in[0.0, 1.0](0.0uniform,1.0logarithmic).f32- Maximum world-space shadow coverage distance in meters.u32- Square shadow map edge resolution in texels.
§Returns
Self- Texel-snapped directional shadow cascades.
Source§impl CsmCascadeSplits
Implements impl #impl_generics #name #ty_generics #where_clause.
impl CsmCascadeSplits
Implements impl #impl_generics #name #ty_generics #where_clause.
pub fn get_cascade_count(&self) -> usize
pub fn get_mut_cascade_count(&mut self) -> &mut usize
pub fn set_cascade_count(&mut self, val: usize) -> &mut Self
pub fn get_lambda(&self) -> f32
pub fn get_mut_lambda(&mut self) -> &mut f32
pub fn set_lambda(&mut self, val: f32) -> &mut Self
pub fn get_near_plane(&self) -> f32
pub fn get_mut_near_plane(&mut self) -> &mut f32
pub fn set_near_plane(&mut self, val: f32) -> &mut Self
pub fn get_far_plane(&self) -> f32
pub fn get_mut_far_plane(&mut self) -> &mut f32
pub fn set_far_plane(&mut self, val: f32) -> &mut Self
pub fn get_shadow_map_resolution(&self) -> u32
pub fn get_mut_shadow_map_resolution(&mut self) -> &mut u32
pub fn set_shadow_map_resolution(&mut self, val: u32) -> &mut Self
pub fn get_slices(&self) -> [CsmCascadeSlice3D; 4]
pub fn get_mut_slices(&mut self) -> &mut [CsmCascadeSlice3D; 4]
pub fn set_slices(&mut self, val: [CsmCascadeSlice3D; 4]) -> &mut Self
Trait Implementations§
Source§impl Clone for CsmCascadeSplits
impl Clone for CsmCascadeSplits
impl Copy for CsmCascadeSplits
Source§impl Debug for CsmCascadeSplits
impl Debug for CsmCascadeSplits
Source§impl PartialEq for CsmCascadeSplits
impl PartialEq for CsmCascadeSplits
impl StructuralPartialEq for CsmCascadeSplits
Auto Trait Implementations§
impl Forget for CsmCascadeSplits
impl Freeze for CsmCascadeSplits
impl Move for CsmCascadeSplits
impl RefUnwindSafe for CsmCascadeSplits
impl Send for CsmCascadeSplits
impl Sync for CsmCascadeSplits
impl Unpin for CsmCascadeSplits
impl UnsafeUnpin for CsmCascadeSplits
impl UnwindSafe for CsmCascadeSplits
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more