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
pub fn from_flags(flags: u32) -> Self
Trait Implementations§
Source§impl Clone for SpriteLightMode
impl Clone for SpriteLightMode
Source§fn clone(&self) -> SpriteLightMode
fn clone(&self) -> SpriteLightMode
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 SpriteLightMode
impl Eq for SpriteLightMode
Source§impl PartialEq for SpriteLightMode
impl PartialEq for SpriteLightMode
Source§fn eq(&self, other: &SpriteLightMode) -> bool
fn eq(&self, other: &SpriteLightMode) -> bool
Tests for
self and other values to be equal, and is used by ==.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
Mutably borrows from an owned value. Read more
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>
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