pub struct ShadowUniformInputs {
pub view: [[f32; 4]; 4],
pub cam_pos: [f32; 3],
pub fov_y_rad: f32,
pub aspect: f32,
pub near: f32,
pub shadow_distance: f32,
pub light_dir_to_source: [f32; 3],
pub shadow_map_size: u32,
pub active_cascades: u32,
}Expand description
Camera, light, and shadow-configuration inputs to
compute_shadow_uniforms.
Fields§
§view: [[f32; 4]; 4]Camera view matrix (column-major, RH, same convention as look_at).
cam_pos: [f32; 3]World-space camera position.
fov_y_rad: f32Vertical FOV in radians.
aspect: f32Viewport aspect ratio (width / height).
near: f32Camera near plane.
shadow_distance: f32Far end of the last cascade. Cascades cover [near, shadow_distance].
light_dir_to_source: [f32; 3]Unit vector pointing TOWARD the light. Same convention as
DirectionalLight.direction; renormalised internally.
shadow_map_size: u32Per-cascade texture resolution; used for texel snapping.
active_cascades: u32How many of the NUM_SHADOW_CASCADES slots are live (1..=4); only the
first active are split + projected, the rest hold a negative split
sentinel and an identity VP so the shader never selects them.
Trait Implementations§
Source§impl Clone for ShadowUniformInputs
impl Clone for ShadowUniformInputs
Source§fn clone(&self) -> ShadowUniformInputs
fn clone(&self) -> ShadowUniformInputs
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ShadowUniformInputs
Auto Trait Implementations§
impl Freeze for ShadowUniformInputs
impl RefUnwindSafe for ShadowUniformInputs
impl Send for ShadowUniformInputs
impl Sync for ShadowUniformInputs
impl Unpin for ShadowUniformInputs
impl UnsafeUnpin for ShadowUniformInputs
impl UnwindSafe for ShadowUniformInputs
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