pub struct Pbr {
pub base_color_factor: Color,
pub base_color_alpha: f32,
pub metallic_factor: f32,
pub roughness_factor: f32,
pub occlusion_strength: f32,
pub emissive_factor: Color,
pub normal_scale: f32,
pub base_color_map: Option<Texture<[f32; 4]>>,
pub normal_map: Option<Texture<[f32; 4]>>,
pub emissive_map: Option<Texture<[f32; 4]>>,
pub metallic_roughness_map: Option<Texture<[f32; 4]>>,
pub occlusion_map: Option<Texture<[f32; 4]>>,
}
Expand description
Parameters for a PBR (physically based rendering) lighting model.
Renders triangle meshes with a PBR (physically-based rendering) illumination model
Fields
base_color_factor: Color
Solid base color applied in the absense of base_color_map
.
Default: WHITE
.
base_color_alpha: f32
Base color alpha factor applied in the absense of base_color_map
.
Default: 1.0
(opaque).
metallic_factor: f32
Metallic factor in the range [0.0, 1.0].
Default: 1.0
.
roughness_factor: f32
Roughness factor in the range [0.0, 1.0].
- A value of 1.0 means the material is completely rough.
- A value of 0.0 means the material is completely smooth.
Default: 1.0
.
occlusion_strength: f32
Scalar multiplier in the range [0.0, 1.0] that controls the amount of
occlusion applied in the presense of occlusion_map
.
Default: 1.0
.
emissive_factor: Color
Solid emissive color applied in the absense of emissive_map
.
Default: BLACK
.
normal_scale: f32
Scalar multiplier applied to each normal vector of the normal_map
.
This value is ignored in the absense of normal_map
.
Default: 1.0
.
base_color_map: Option<Texture<[f32; 4]>>
Base color texture.
Default: None
.
normal_map: Option<Texture<[f32; 4]>>
Normal texture.
Default: None
.
emissive_map: Option<Texture<[f32; 4]>>
Emissive texture.
Default: None
.
metallic_roughness_map: Option<Texture<[f32; 4]>>
Metallic-roughness texture.
Default: None
.
occlusion_map: Option<Texture<[f32; 4]>>
Occlusion texture.
Default: None
.
Trait Implementations
impl Eq for Pbr
Auto Trait Implementations
impl !RefUnwindSafe for Pbr
impl Send for Pbr
impl Sync for Pbr
impl Unpin for Pbr
impl !UnwindSafe for Pbr
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Resultwhere
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Resultwhere
T: Parameter<Self>,
value
as a parameter of self
.