pub enum Material3D {
Standard {
color: Color,
roughness: f32,
metalness: f32,
emissive: Option<Color>,
},
Physical {
color: Color,
roughness: f32,
metalness: f32,
clearcoat: f32,
transmission: f32,
},
Basic {
color: Color,
},
Shader {
vertex_shader: Option<ShaderSource>,
fragment_shader: Option<ShaderSource>,
glsl_fragment: Option<String>,
uniforms: BTreeMap<String, f32>,
},
Textured(TexturedMaterial3D),
TexturedBatch(TexturedBatchMaterial3D),
}Expand description
3D Material: Unifies high-level PBR workflows with low-level custom hardware shaders.
Variants§
Standard
High-Level Physically Based Rendering (PBR) Metallic-Roughness workflow
Physical
High-Level PBR with Clearcoat extensions
Basic
High-Level Unlit flat material
Shader
Low-Level Custom Hardware Shader Material
Textured(TexturedMaterial3D)
Textured surface sampled from a TextureId.
TexturedBatch(TexturedBatchMaterial3D)
Several textured index ranges sharing one vertex buffer.
Trait Implementations§
Source§impl Clone for Material3D
impl Clone for Material3D
Source§impl Debug for Material3D
impl Debug for Material3D
Source§impl Default for Material3D
impl Default for Material3D
Source§impl PartialEq for Material3D
impl PartialEq for Material3D
impl StructuralPartialEq for Material3D
Auto Trait Implementations§
impl Forget for Material3D
impl Freeze for Material3D
impl Move for Material3D
impl RefUnwindSafe for Material3D
impl Send for Material3D
impl Sync for Material3D
impl Unpin for Material3D
impl UnsafeUnpin for Material3D
impl UnwindSafe for Material3D
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