#[repr(C)]pub struct GroundPlaneUniforms {
pub center: [f32; 4],
pub basis_x: [f32; 4],
pub basis_y: [f32; 4],
pub basis_z: [f32; 4],
pub height: f32,
pub length_scale: f32,
pub camera_height: f32,
pub up_sign: f32,
pub shadow_darkness: f32,
pub shadow_mode: u32,
pub is_orthographic: u32,
pub reflection_intensity: f32,
}Expand description
GPU representation of ground plane uniforms.
Matches the shader’s GroundUniforms struct.
Fields§
§center: [f32; 4]Scene center (xyz) + padding
basis_x: [f32; 4]Forward direction on ground plane (basis X)
basis_y: [f32; 4]Right direction on ground plane (basis Y)
basis_z: [f32; 4]Up direction / normal to ground (basis Z)
height: f32Ground plane height
length_scale: f32Scene length scale for tiling
camera_height: f32Camera height for fade calculation
up_sign: f32+1 or -1 depending on up direction
shadow_darkness: f32Shadow darkness (0.0 = no shadow, 1.0 = full black)
shadow_mode: u32Shadow mode: 0=none, 1=shadow_only, 2=tile_with_shadow
is_orthographic: u32Whether camera is in orthographic mode (0=perspective, 1=orthographic)
reflection_intensity: f32Reflection intensity (0.0 = no reflection/opaque ground, 1.0 = mirror)
Trait Implementations§
Source§impl Clone for GroundPlaneUniforms
impl Clone for GroundPlaneUniforms
Source§fn clone(&self) -> GroundPlaneUniforms
fn clone(&self) -> GroundPlaneUniforms
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GroundPlaneUniforms
impl Debug for GroundPlaneUniforms
Source§impl Default for GroundPlaneUniforms
impl Default for GroundPlaneUniforms
impl Copy for GroundPlaneUniforms
impl Pod for GroundPlaneUniforms
Auto Trait Implementations§
impl Freeze for GroundPlaneUniforms
impl RefUnwindSafe for GroundPlaneUniforms
impl Send for GroundPlaneUniforms
impl Sync for GroundPlaneUniforms
impl Unpin for GroundPlaneUniforms
impl UnsafeUnpin for GroundPlaneUniforms
impl UnwindSafe for GroundPlaneUniforms
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> 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,
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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&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
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().