pub enum SpriteLightMode {
FaceNormal,
WorldUp,
AmbientOnly,
FullBright,
}Expand description
Per-instance billboard lighting mode (BB.2b), decoded from the sprite
flags (bits 6/7). Controls the surface normal / direct-light handling at
the sprite shade site so a camera-facing billboard needn’t suffer the
camera-dependent N·L of its (camera-tracking) face normal.
Variants§
FaceNormal
The DDA hit-face normal (default; today’s DL.7 look).
WorldUp
A fixed world-up normal (stable directional shading).
AmbientOnly
Ambient only — no sun / point-light direct term (flat cutout).
FullBright
Full-bright / emissive — the voxel colour at full intensity, ignoring lighting (glows: fire, spell auras). Encoded as both flag bits set.
Implementations§
Source§impl SpriteLightMode
impl SpriteLightMode
Sourcepub fn from_flags(flags: u32) -> Self
pub fn from_flags(flags: u32) -> Self
Decode the mode from a sprite instance’s flags word (bits
6/7 — SPRITE_FLAG_LIGHT_WORLD_UP /
SPRITE_FLAG_LIGHT_AMBIENT_ONLY). Neither bit ⇒
FaceNormal (the default); both ⇒
FullBright.
Trait Implementations§
Source§impl Clone for SpriteLightMode
impl Clone for SpriteLightMode
Source§fn clone(&self) -> SpriteLightMode
fn clone(&self) -> SpriteLightMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SpriteLightMode
impl Eq for SpriteLightMode
Source§impl PartialEq for SpriteLightMode
impl PartialEq for SpriteLightMode
impl StructuralPartialEq for SpriteLightMode
Auto Trait Implementations§
impl Freeze for SpriteLightMode
impl RefUnwindSafe for SpriteLightMode
impl Send for SpriteLightMode
impl Sync for SpriteLightMode
impl Unpin for SpriteLightMode
impl UnsafeUnpin for SpriteLightMode
impl UnwindSafe for SpriteLightMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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