Struct bevy::prelude::StandardMaterial[]

pub struct StandardMaterial {
    pub base_color: Color,
    pub base_color_texture: Option<Handle<Texture>>,
    pub roughness: f32,
    pub metallic: f32,
    pub metallic_roughness_texture: Option<Handle<Texture>>,
    pub reflectance: f32,
    pub normal_map: Option<Handle<Texture>>,
    pub double_sided: bool,
    pub occlusion_texture: Option<Handle<Texture>>,
    pub emissive: Color,
    pub emissive_texture: Option<Handle<Texture>>,
    pub unlit: bool,
}

A material with “standard” properties used in PBR lighting Standard property values with pictures here https://google.github.io/filament/Material%20Properties.pdf

Fields

base_color: Color

Doubles as diffuse albedo for non-metallic, specular for metallic and a mix for everything in between If used together with a base_color_texture, this is factored into the final base color as base_color * base_color_texture_value

base_color_texture: Option<Handle<Texture>>roughness: f32

Linear perceptual roughness, clamped to [0.089, 1.0] in the shader Defaults to minimum of 0.089 If used together with a roughness/metallic texture, this is factored into the final base color as roughness * roughness_texture_value

metallic: f32

From [0.0, 1.0], dielectric to pure metallic If used together with a roughness/metallic texture, this is factored into the final base color as metallic * metallic_texture_value

metallic_roughness_texture: Option<Handle<Texture>>

Specular intensity for non-metals on a linear scale of [0.0, 1.0] defaults to 0.5 which is mapped to 4% reflectance in the shader

reflectance: f32normal_map: Option<Handle<Texture>>double_sided: boolocclusion_texture: Option<Handle<Texture>>emissive: Coloremissive_texture: Option<Handle<Texture>>unlit: bool

Trait Implementations

impl Debug for StandardMaterial

impl Default for StandardMaterial

impl From<Color> for StandardMaterial

impl From<Handle<Texture>> for StandardMaterial

impl RenderResources for StandardMaterial

impl ShaderDefs for StandardMaterial

impl TypeUuid for StandardMaterial

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Asset for T where
    T: TypeUuid + AssetDynamic + TypeUuidDynamic

impl<T> AssetDynamic for T where
    T: Send + Sync + 'static + TypeUuidDynamic

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Component for T where
    T: 'static + Send + Sync

impl<T> Downcast for T where
    T: Any

impl<T> Downcast<T> for T

impl<T> DowncastSync for T where
    T: Any + Send + Sync

impl<T> From<T> for T[src]

impl<T> FromWorld for T where
    T: Default

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> TypeUuidDynamic for T where
    T: TypeUuid

impl<T> Upcast<T> for T

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,