Struct easy_gltf::model::PbrMaterial
source · 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: f32
metallic_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: f32
roughness_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 moresource§impl Debug for PbrMaterial
impl Debug for PbrMaterial
Auto Trait Implementations§
impl Freeze for PbrMaterial
impl RefUnwindSafe for PbrMaterial
impl Send for PbrMaterial
impl Sync for PbrMaterial
impl Unpin for PbrMaterial
impl UnwindSafe for PbrMaterial
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
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.