pub struct VsmCascade { /* private fields */ }Expand description
Single orthographic directional shadow cascade inside VirtualShadowMap with static page caching.
Implementations§
Source§impl VsmCascade
Cascade construction, orthographic shadow rasterization, and PCF sampling for VsmCascade.
impl VsmCascade
Cascade construction, orthographic shadow rasterization, and PCF sampling for VsmCascade.
Sourcepub fn light_view_proj(&self) -> Mat4
pub fn light_view_proj(&self) -> Mat4
Sourcepub fn sample_pcf(
&self,
world_pos: Vec3,
normal: Vec3,
sun_dir: Vec3,
) -> Option<f32>
pub fn sample_pcf( &self, world_pos: Vec3, normal: Vec3, sun_dir: Vec3, ) -> Option<f32>
Evaluates rotated 16-tap Vogel-disk PCF shadow visibility at world_pos if inside this cascade’s bounds.
§Arguments
Vec3- World-space surface position.Vec3- Unit outward surface normal for normal-offset acne prevention.Vec3- Unit vector pointing toward the sun.
§Returns
Option<f32>- Visibility in[VSM_SHADOW_FLOOR, 1.0], orNoneif outside this cascade.
Source§impl VsmCascade
Implements impl #impl_generics #name #ty_generics #where_clause.
impl VsmCascade
Implements impl #impl_generics #name #ty_generics #where_clause.
pub fn get_resolution(&self) -> usize
pub fn get_mut_resolution(&mut self) -> &mut usize
pub fn set_resolution(&mut self, val: usize) -> &mut Self
pub fn get_half_extent_m(&self) -> f32
pub fn get_mut_half_extent_m(&mut self) -> &mut f32
pub fn set_half_extent_m(&mut self, val: f32) -> &mut Self
pub fn get_snapped_center(&self) -> Vec3
pub fn get_mut_snapped_center(&mut self) -> &mut Vec3
pub fn set_snapped_center(&mut self, val: Vec3) -> &mut Self
pub fn get_light_right(&self) -> Vec3
pub fn get_mut_light_right(&mut self) -> &mut Vec3
pub fn set_light_right(&mut self, val: Vec3) -> &mut Self
pub fn get_light_up(&self) -> Vec3
pub fn get_mut_light_up(&mut self) -> &mut Vec3
pub fn set_light_up(&mut self, val: Vec3) -> &mut Self
pub fn get_light_forward(&self) -> Vec3
pub fn get_mut_light_forward(&mut self) -> &mut Vec3
pub fn set_light_forward(&mut self, val: Vec3) -> &mut Self
pub fn get_depth_min(&self) -> f32
pub fn get_mut_depth_min(&mut self) -> &mut f32
pub fn set_depth_min(&mut self, val: f32) -> &mut Self
pub fn get_depth_max(&self) -> f32
pub fn get_mut_depth_max(&mut self) -> &mut f32
pub fn set_depth_max(&mut self, val: f32) -> &mut Self
pub fn get_static_valid(&self) -> bool
pub fn get_mut_static_valid(&mut self) -> &mut bool
pub fn set_static_valid(&mut self, val: bool) -> &mut Self
Trait Implementations§
Source§impl Clone for VsmCascade
impl Clone for VsmCascade
Auto Trait Implementations§
impl Forget for VsmCascade
impl Freeze for VsmCascade
impl Move for VsmCascade
impl RefUnwindSafe for VsmCascade
impl Send for VsmCascadewhere
RawVecInner: Send,
impl Sync for VsmCascadewhere
RawVecInner: Sync,
impl Unpin for VsmCascade
impl UnsafeUnpin for VsmCascade
impl UnwindSafe for VsmCascadewhere
RawVecInner: UnwindSafe,
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