Struct bevy_pbr::MeshInputUniform 
source · #[repr(C)]pub struct MeshInputUniform {
    pub world_from_local: [Vec4; 3],
    pub lightmap_uv_rect: UVec2,
    pub flags: u32,
    pub previous_input_index: u32,
}Expand description
Information that has to be transferred from CPU to GPU in order to produce
the full MeshUniform.
This is essentially a subset of the fields in MeshUniform above.
Fields§
§world_from_local: [Vec4; 3]Affine 4x3 matrix transposed to 3x4.
lightmap_uv_rect: UVec2Four 16-bit unsigned normalized UV values packed into a UVec2:
                        <--- MSB                   LSB --->
                        +---- min v ----+ +---- min u ----+
    lightmap_uv_rect.x: vvvvvvvv vvvvvvvv uuuuuuuu uuuuuuuu,
                        +---- max v ----+ +---- max u ----+
    lightmap_uv_rect.y: VVVVVVVV VVVVVVVV UUUUUUUU UUUUUUUU,
(MSB: most significant bit; LSB: least significant bit.)
flags: u32Various MeshFlags.
previous_input_index: u32The index of this mesh’s MeshInputUniform in the previous frame’s
buffer, if applicable.
This is used for TAA. If not present, this will be u32::MAX.
Trait Implementations§
source§impl Clone for MeshInputUniform
 
impl Clone for MeshInputUniform
source§fn clone(&self) -> MeshInputUniform
 
fn clone(&self) -> MeshInputUniform
Returns a copy 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 CreateFrom for MeshInputUniformwhere
    Self: ShaderType<ExtraMetadata = StructMetadata<4usize>>,
    for<'__> [Vec4; 3]: CreateFrom,
    for<'__> UVec2: CreateFrom,
    for<'__, '__> u32: CreateFrom,
 
impl CreateFrom for MeshInputUniformwhere
    Self: ShaderType<ExtraMetadata = StructMetadata<4usize>>,
    for<'__> [Vec4; 3]: CreateFrom,
    for<'__> UVec2: CreateFrom,
    for<'__, '__> u32: CreateFrom,
fn create_from<B: BufferRef>(reader: &mut Reader<B>) -> Self
source§impl ReadFrom for MeshInputUniform
 
impl ReadFrom for MeshInputUniform
source§impl ShaderSize for MeshInputUniform
 
impl ShaderSize for MeshInputUniform
source§const SHADER_SIZE: NonZero<u64> = _
 
const SHADER_SIZE: NonZero<u64> = _
Represents WGSL Size (equivalent to 
ShaderType::min_size)source§impl ShaderType for MeshInputUniformwhere
    [Vec4; 3]: ShaderType + ShaderSize,
    UVec2: ShaderType + ShaderSize,
    u32: ShaderType + ShaderSize,
 
impl ShaderType for MeshInputUniformwhere
    [Vec4; 3]: ShaderType + ShaderSize,
    UVec2: ShaderType + ShaderSize,
    u32: ShaderType + ShaderSize,
source§fn size(&self) -> NonZeroU64
 
fn size(&self) -> NonZeroU64
Returns the size of 
Self at runtime Read moresource§fn assert_uniform_compat()
 
fn assert_uniform_compat()
Asserts that 
Self meets the requirements of the
uniform address space restrictions on stored values and the
uniform address space layout constraints Read moresource§impl WriteInto for MeshInputUniform
 
impl WriteInto for MeshInputUniform
fn write_into<B: BufferMut>(&self, writer: &mut Writer<B>)
impl Copy for MeshInputUniform
impl Pod for MeshInputUniform
Auto Trait Implementations§
impl Freeze for MeshInputUniform
impl RefUnwindSafe for MeshInputUniform
impl Send for MeshInputUniform
impl Sync for MeshInputUniform
impl Unpin for MeshInputUniform
impl UnwindSafe for MeshInputUniform
Blanket Implementations§
source§impl<T, U> AsBindGroupShaderType<U> for T
 
impl<T, U> AsBindGroupShaderType<U> for T
source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
 
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
Return the 
T ShaderType for self. When used in AsBindGroup
derives, it is safe to assume that all images in self exist.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,
§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> 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.