pub struct SceneLights {
pub lights: [LightData; 10],
pub num_lights: u32,
pub sun_dir: Vec3,
pub sun_col: Vec4,
pub has_sun: bool,
pub shadow_point_index: i32,
}Expand description
Point + spot + sun lights collected from the world for one frame, ready to be
dropped into SceneUniforms.
Fields§
§lights: [LightData; 10]Up to 10 point/spot lights (the shader’s fixed light array).
num_lights: u32§sun_dir: Vec3Direction the sun points along (normalized). Default down-vector when the
scene has no LightRole::Sun.
sun_col: Vec4Sun colour in rgb, intensity in w. w == 0 means “no sun” — the deferred
lighting shader keys off this exactly like the old inline code did.
has_sun: boolWhether the scene actually contains a LightRole::Sun. The studio forward
shader signals “sun present” through sun_direction.w (1.0 vs 0.0); this
carries that bit so the studio path stays behaviourally identical.
shadow_point_index: i32Index into lights of the point light that owns the single point-shadow cube,
or -1 when there is no point light. There is only one point-shadow cubemap, so
exactly one point light casts; the caller renders that light’s cube and the shader
only samples it for this index (avoids applying one cube to every point light).
Auto Trait Implementations§
impl Freeze for SceneLights
impl RefUnwindSafe for SceneLights
impl Send for SceneLights
impl Sync for SceneLights
impl Unpin for SceneLights
impl UnsafeUnpin for SceneLights
impl UnwindSafe for SceneLights
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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>
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>
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