pub struct CuboidMaterial {
pub color_mode: ColorMode,
pub wireframe: u32,
pub scalar_hue: ScalarHueOptions,
pub emissive_gain: Vec3,
}Expand description
Shading options, constant for each draw call.
Fields§
§color_mode: ColorMode§wireframe: u32Nonzero values imply that only cuboid edges will be shaded.
VertexPullingRenderPlugin::edges
must be true for this to take effect.
scalar_hue: ScalarHueOptions§emissive_gain: Vec3An extra factor that multiplies a cuboid’s color when the “emissive” bit
on MetaBits is set.
Trait Implementations§
Source§impl Clone for CuboidMaterial
impl Clone for CuboidMaterial
Source§fn clone(&self) -> CuboidMaterial
fn clone(&self) -> CuboidMaterial
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 moreSource§impl CreateFrom for CuboidMaterialwhere
Self: ShaderType<ExtraMetadata = StructMetadata<4usize>>,
for<'__> ColorMode: CreateFrom,
for<'__> u32: CreateFrom,
for<'__> ScalarHueOptions: CreateFrom,
for<'__> Vec3: CreateFrom,
impl CreateFrom for CuboidMaterialwhere
Self: ShaderType<ExtraMetadata = StructMetadata<4usize>>,
for<'__> ColorMode: CreateFrom,
for<'__> u32: CreateFrom,
for<'__> ScalarHueOptions: CreateFrom,
for<'__> Vec3: CreateFrom,
fn create_from<B: BufferRef>(reader: &mut Reader<B>) -> Self
Source§impl Debug for CuboidMaterial
impl Debug for CuboidMaterial
Source§impl Default for CuboidMaterial
impl Default for CuboidMaterial
Source§impl ReadFrom for CuboidMaterialwhere
Self: ShaderType<ExtraMetadata = StructMetadata<4usize>>,
for<'__> ColorMode: ReadFrom,
for<'__> u32: ReadFrom,
for<'__> ScalarHueOptions: ReadFrom,
for<'__> Vec3: ReadFrom,
impl ReadFrom for CuboidMaterialwhere
Self: ShaderType<ExtraMetadata = StructMetadata<4usize>>,
for<'__> ColorMode: ReadFrom,
for<'__> u32: ReadFrom,
for<'__> ScalarHueOptions: ReadFrom,
for<'__> Vec3: ReadFrom,
Source§impl ShaderSize for CuboidMaterial
impl ShaderSize for CuboidMaterial
Source§const SHADER_SIZE: NonZero<u64> = _
const SHADER_SIZE: NonZero<u64> = _
Represents WGSL Size (equivalent to
ShaderType::min_size)Source§impl ShaderType for CuboidMaterialwhere
ColorMode: ShaderType + ShaderSize,
u32: ShaderType + ShaderSize,
ScalarHueOptions: ShaderType + ShaderSize,
Vec3: ShaderType,
impl ShaderType for CuboidMaterialwhere
ColorMode: ShaderType + ShaderSize,
u32: ShaderType + ShaderSize,
ScalarHueOptions: ShaderType + ShaderSize,
Vec3: ShaderType,
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 CuboidMaterialwhere
Self: ShaderType<ExtraMetadata = StructMetadata<4usize>>,
for<'__> ColorMode: WriteInto,
for<'__> u32: WriteInto,
for<'__> ScalarHueOptions: WriteInto,
for<'__> Vec3: WriteInto,
impl WriteInto for CuboidMaterialwhere
Self: ShaderType<ExtraMetadata = StructMetadata<4usize>>,
for<'__> ColorMode: WriteInto,
for<'__> u32: WriteInto,
for<'__> ScalarHueOptions: WriteInto,
for<'__> Vec3: WriteInto,
fn write_into<B: BufferMut>(&self, writer: &mut Writer<B>)
Auto Trait Implementations§
impl Freeze for CuboidMaterial
impl RefUnwindSafe for CuboidMaterial
impl Send for CuboidMaterial
impl Sync for CuboidMaterial
impl Unpin for CuboidMaterial
impl UnsafeUnpin for CuboidMaterial
impl UnwindSafe for CuboidMaterial
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<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates
Self using data from the given World.