Struct gltf::material::PbrSpecularGlossiness
source · pub struct PbrSpecularGlossiness<'a> { /* private fields */ }
KHR_materials_pbrSpecularGlossiness
only.Expand description
A set of parameter values that are used to define the specular-glossiness material model from Physically-Based Rendering (PBR) methodology.
Implementations§
source§impl<'a> PbrSpecularGlossiness<'a>
impl<'a> PbrSpecularGlossiness<'a>
sourcepub fn diffuse_factor(&self) -> [f32; 4]
pub fn diffuse_factor(&self) -> [f32; 4]
Returns the material’s base color factor.
The default value is [1.0, 1.0, 1.0, 1.0]
.
sourcepub fn diffuse_texture(&self) -> Option<Info<'a>>
pub fn diffuse_texture(&self) -> Option<Info<'a>>
Returns the base color texture.
sourcepub fn specular_factor(&self) -> [f32; 3]
pub fn specular_factor(&self) -> [f32; 3]
Returns the specular factor of the material.
The default value is [1.0, 1.0, 1.0]
.
sourcepub fn glossiness_factor(&self) -> f32
pub fn glossiness_factor(&self) -> f32
Returns the glossiness factor of the material.
A value of 1.0 means the material has full glossiness or is perfectly smooth. A value of 0.0 means the material has no glossiness or is completely rough. This value is linear.
The default value is 1.0
.
sourcepub fn specular_glossiness_texture(&self) -> Option<Info<'a>>
pub fn specular_glossiness_texture(&self) -> Option<Info<'a>>
The specular-glossiness texture.
A RGBA texture, containing the specular color of the material (RGB components) and its glossiness (A component). The color values are in sRGB space.