#[repr(C)]pub struct DirectionalLightData {
pub direction: [f32; 3],
pub intensity: f32,
pub color: [f32; 3],
pub _pad: f32,
}Expand description
One directional light entry in LightUniforms.
Layout (32 bytes) mirrors DirLight in main_types.slang, which spells each
(float3, scalar) pair as one float4 lane.
Fields§
§direction: [f32; 3]Unit vector pointing TOWARD the light source (same as L in Blinn-Phong).
intensity: f32Radiance scale.
color: [f32; 3]Linear RGB light colour.
_pad: f32Padding so the field layout matches the shader-side struct.
Trait Implementations§
Source§impl Clone for DirectionalLightData
impl Clone for DirectionalLightData
Source§fn clone(&self) -> DirectionalLightData
fn clone(&self) -> DirectionalLightData
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 DirectionalLightData
Source§impl Debug for DirectionalLightData
impl Debug for DirectionalLightData
Source§impl PartialEq for DirectionalLightData
impl PartialEq for DirectionalLightData
impl Pod for DirectionalLightData
impl StructuralPartialEq for DirectionalLightData
Auto Trait Implementations§
impl Freeze for DirectionalLightData
impl RefUnwindSafe for DirectionalLightData
impl Send for DirectionalLightData
impl Sync for DirectionalLightData
impl Unpin for DirectionalLightData
impl UnsafeUnpin for DirectionalLightData
impl UnwindSafe for DirectionalLightData
Blanket Implementations§
impl<T> AnyBitPattern for Twhere
T: Pod,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more