pub struct PbrMaterial {
pub base_color_factor: Vector4<f32>,
pub base_color_texture: Option<Arc<RgbaImage>>,
pub metallic_texture: Option<Arc<GrayImage>>,
pub metallic_factor: f32,
pub roughness_texture: Option<Arc<GrayImage>>,
pub roughness_factor: f32,
}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: Vector4<f32>The base_color_factor contains scaling factors for the red, green,
blue and alpha component of the color. If no texture is used, these
values will define the color of the whole object in RGB color space.
base_color_texture: Option<Arc<RgbaImage>>The base_color_texture is the main texture that will be applied to the
object.
The texture contains RGB(A) components in sRGB color space.
metallic_texture: Option<Arc<GrayImage>>Contains the metalness value
metallic_factor: f32metallic_factor is multiply to the metallic_texture value. If no
texture is given, then the factor define the metalness for the whole
object.
roughness_texture: Option<Arc<GrayImage>>Contains the roughness value
roughness_factor: f32roughness_factor is multiply to the roughness_texture value. If no
texture is given, then the factor define the roughness for the whole
object.
Trait Implementations§
Source§impl Clone for PbrMaterial
impl Clone for PbrMaterial
Source§fn clone(&self) -> PbrMaterial
fn clone(&self) -> PbrMaterial
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more