pub struct ExtractedLight {
pub light_type: LightType,
pub position: Vec3,
pub direction: Vec3,
pub shadow_view_proj: Mat4,
pub shadow_atlas_index: Option<i32>,
}Expand description
Flat, GPU-friendly representation of a light source.
Fields§
§light_type: LightTypeLight type and its parameters.
position: Vec3World-space position (ignored for purely directional lights).
direction: Vec3World-space direction (ignored for point lights).
shadow_view_proj: Mat4View-projection matrix used for shadow mapping.
shadow_atlas_index: Option<i32>Index into the shadow atlas, or None if the light casts no shadow.
Trait Implementations§
Source§impl Clone for ExtractedLight
impl Clone for ExtractedLight
Source§fn clone(&self) -> ExtractedLight
fn clone(&self) -> ExtractedLight
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 moreAuto Trait Implementations§
impl Freeze for ExtractedLight
impl RefUnwindSafe for ExtractedLight
impl Send for ExtractedLight
impl Sync for ExtractedLight
impl Unpin for ExtractedLight
impl UnsafeUnpin for ExtractedLight
impl UnwindSafe for ExtractedLight
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