Struct gltf_json::material::PbrMetallicRoughness
source · 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§
source§impl Clone for PbrMetallicRoughness
impl Clone for PbrMetallicRoughness
source§fn clone(&self) -> PbrMetallicRoughness
fn clone(&self) -> PbrMetallicRoughness
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PbrMetallicRoughness
impl Debug for PbrMetallicRoughness
source§impl Default for PbrMetallicRoughness
impl Default for PbrMetallicRoughness
source§fn default() -> PbrMetallicRoughness
fn default() -> PbrMetallicRoughness
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for PbrMetallicRoughnesswhere
PbrMetallicRoughness: Default,
impl<'de> Deserialize<'de> for PbrMetallicRoughnesswhere
PbrMetallicRoughness: Default,
source§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
source§impl Serialize for PbrMetallicRoughness
impl Serialize for PbrMetallicRoughness
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§
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