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 a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Validates the invariants required for the library to function safely.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.