pub struct MaterialAsset {
pub name: String,
pub base_color: [f32; 4],
pub metallic: f32,
pub roughness: f32,
pub base_color_texture: Option<TextureAsset>,
pub normal_texture: Option<NormalTextureAsset>,
pub metallic_roughness_texture: Option<TextureAsset>,
pub occlusion_texture: Option<OcclusionTextureAsset>,
}Expand description
PBR material factors plus optional embedded glTF texture slots.
Fields§
§name: StringMaterial name.
base_color: [f32; 4]Multiplied with the texture when one is present (set to white by the FBX loader in that case, matching exporter convention).
metallic: f32Metallic factor.
roughness: f32Roughness factor.
base_color_texture: Option<TextureAsset>Embedded base-color texture, if one was loaded.
normal_texture: Option<NormalTextureAsset>Embedded tangent-space normal texture, if one was loaded.
metallic_roughness_texture: Option<TextureAsset>Embedded metallic-roughness texture, if one was loaded.
glTF stores roughness in green and metallic in blue.
occlusion_texture: Option<OcclusionTextureAsset>Embedded occlusion texture, if one was loaded.
Trait Implementations§
Source§impl Clone for MaterialAsset
impl Clone for MaterialAsset
Source§fn clone(&self) -> MaterialAsset
fn clone(&self) -> MaterialAsset
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 moreAuto Trait Implementations§
impl Freeze for MaterialAsset
impl RefUnwindSafe for MaterialAsset
impl Send for MaterialAsset
impl Sync for MaterialAsset
impl Unpin for MaterialAsset
impl UnsafeUnpin for MaterialAsset
impl UnwindSafe for MaterialAsset
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