Struct gltf_json::material::PbrMetallicRoughness [−][src]
pub struct PbrMetallicRoughness {
pub base_color_factor: PbrBaseColorFactor,
pub base_color_texture: Option<Info>,
pub metallic_factor: StrengthFactor,
pub roughness_factor: StrengthFactor,
pub metallic_roughness_texture: Option<Info>,
pub extensions: Option<PbrMetallicRoughness>,
pub extras: Extras,
}
Expand description
A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology.
Fields
base_color_factor: PbrBaseColorFactor
The material’s base color factor.
base_color_texture: Option<Info>
The base color texture.
metallic_factor: StrengthFactor
The metalness of the material.
roughness_factor: StrengthFactor
The roughness of the material.
- A value of 1.0 means the material is completely rough.
- A value of 0.0 means the material is completely smooth.
metallic_roughness_texture: Option<Info>
The metallic-roughness texture.
This texture has two components:
The metalness values are sampled from the B channel. The roughness values are sampled from the G channel. These values are linear. If other channels are present (R or A), they are ignored for metallic-roughness calculations.
extensions: Option<PbrMetallicRoughness>
Extension specific data.
extras: Extras
Optional application specific data.
Trait Implementations
Returns the “default value” for a type. Read more
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for PbrMetallicRoughness
impl Send for PbrMetallicRoughness
impl Sync for PbrMetallicRoughness
impl Unpin for PbrMetallicRoughness
impl UnwindSafe for PbrMetallicRoughness
Blanket Implementations
Mutably borrows from an owned value. Read more