[−][src]Struct gltf::material::PbrMetallicRoughness
A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology.
Methods
impl<'a> PbrMetallicRoughness<'a>
[src]
pub fn base_color_factor(&self) -> [f32; 4]
[src]
Returns the material's base color factor.
The default value is [1.0, 1.0, 1.0, 1.0]
.
pub fn base_color_texture(&self) -> Option<Info<'a>>
[src]
Returns the base color texture. The texture contains RGB(A) components in sRGB color space.
pub fn metallic_factor(&self) -> f32
[src]
Returns the metalness factor of the material.
The default value is 1.0
.
pub fn roughness_factor(&self) -> f32
[src]
Returns the roughness factor 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.
The default value is 1.0
.
pub fn metallic_roughness_texture(&self) -> Option<Info<'a>>
[src]
The metallic-roughness texture.
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.
pub fn extras(&self) -> &'a Extras
[src]
Optional application specific data.
Auto Trait Implementations
impl<'a> RefUnwindSafe for PbrMetallicRoughness<'a>
impl<'a> Send for PbrMetallicRoughness<'a>
impl<'a> Sync for PbrMetallicRoughness<'a>
impl<'a> Unpin for PbrMetallicRoughness<'a>
impl<'a> UnwindSafe for PbrMetallicRoughness<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,