pub struct MaterialRecord {Show 25 fields
pub id: u64,
pub shading_model: ShadingModel,
pub opacity_mode: OpacityMode,
pub double_sided: bool,
pub casts_shadow: bool,
pub receives_shadow: bool,
pub pickable: bool,
pub multiply_vertex_color: bool,
pub wind_animated: bool,
pub base_color: [f32; 4],
pub emissive: [f32; 3],
pub metallic: f32,
pub roughness: f32,
pub specular: f32,
pub normal_scale: f32,
pub occlusion_strength: f32,
pub alpha_cutoff: f32,
pub base_color_texture: [u8; 32],
pub normal_texture: [u8; 32],
pub metallic_roughness_texture: [u8; 32],
pub occlusion_texture: [u8; 32],
pub emissive_texture: [u8; 32],
pub stylized_ramp_texture: [u8; 32],
pub texture_transforms: [TextureTransform; 6],
pub texture_samplers: [TextureSampler; 6],
}Expand description
Stable, renderer-independent material record. Colours are linear; each texture field is a SHA-256 HMC/resource digest, or all-zero when that slot is unbound.
Fields§
§id: u64§shading_model: ShadingModel§opacity_mode: OpacityMode§double_sided: bool§casts_shadow: bool§receives_shadow: bool§pickable: bool§multiply_vertex_color: bool§wind_animated: boolEnables the renderer’s restrained, time-based vertex wind response.
base_color: [f32; 4]§emissive: [f32; 3]§metallic: f32§roughness: f32§specular: f32§normal_scale: f32§occlusion_strength: f32§alpha_cutoff: f32§base_color_texture: [u8; 32]§normal_texture: [u8; 32]§metallic_roughness_texture: [u8; 32]glTF metallic-roughness texture dependency.
occlusion_texture: [u8; 32]glTF occlusion texture dependency; may differ from metallic-roughness.
emissive_texture: [u8; 32]§stylized_ramp_texture: [u8; 32]Optional authored toon-ramp dependency; used only by Stylized materials.
texture_transforms: [TextureTransform; 6]Base colour, normal, metallic-roughness, occlusion, emissive, stylized ramp.
texture_samplers: [TextureSampler; 6]Base colour, normal, metallic-roughness, occlusion, emissive, stylized ramp.
Implementations§
Source§impl MaterialRecord
impl MaterialRecord
Sourcepub const fn legacy_default() -> Self
pub const fn legacy_default() -> Self
Compatibility material for legacy static meshes without a material section.
Trait Implementations§
Source§impl Clone for MaterialRecord
impl Clone for MaterialRecord
impl Copy for MaterialRecord
Source§impl Debug for MaterialRecord
impl Debug for MaterialRecord
Source§impl PartialEq for MaterialRecord
impl PartialEq for MaterialRecord
impl StructuralPartialEq for MaterialRecord
Auto Trait Implementations§
impl Freeze for MaterialRecord
impl RefUnwindSafe for MaterialRecord
impl Send for MaterialRecord
impl Sync for MaterialRecord
impl Unpin for MaterialRecord
impl UnsafeUnpin for MaterialRecord
impl UnwindSafe for MaterialRecord
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 more