pub struct PbrMaterial {Show 17 fields
pub albedo: AlbedoComponent,
pub transparency: Transparency,
pub normal: NormalTexture,
pub aomr_textures: AoMRTextures,
pub ao_factor: Option<f32>,
pub metallic_factor: Option<f32>,
pub roughness_factor: Option<f32>,
pub clearcoat_textures: ClearcoatTextures,
pub clearcoat_factor: Option<f32>,
pub clearcoat_roughness_factor: Option<f32>,
pub emissive: MaterialComponent<Vec3>,
pub reflectance: MaterialComponent<f32>,
pub anisotropy: MaterialComponent<f32>,
pub uv_transform0: Mat3,
pub uv_transform1: Mat3,
pub unlit: bool,
pub sample_type: SampleType,
}
Expand description
A set of textures and values that determine the how an object interacts with light.
Fields§
§albedo: AlbedoComponent
§transparency: Transparency
§normal: NormalTexture
§aomr_textures: AoMRTextures
§ao_factor: Option<f32>
§metallic_factor: Option<f32>
§roughness_factor: Option<f32>
§clearcoat_textures: ClearcoatTextures
§clearcoat_factor: Option<f32>
§clearcoat_roughness_factor: Option<f32>
§emissive: MaterialComponent<Vec3>
§reflectance: MaterialComponent<f32>
§anisotropy: MaterialComponent<f32>
§uv_transform0: Mat3
§uv_transform1: Mat3
§unlit: bool
§sample_type: SampleType
Trait Implementations§
Source§impl Default for PbrMaterial
impl Default for PbrMaterial
Source§fn default() -> PbrMaterial
fn default() -> PbrMaterial
Returns the “default value” for a type. Read more
Source§impl DepthRenderableMaterial for PbrMaterial
impl DepthRenderableMaterial for PbrMaterial
Source§const ALPHA_CUTOUT: Option<AlphaCutoutSpec>
const ALPHA_CUTOUT: Option<AlphaCutoutSpec>
If Some it is possible to do alpha cutouts
Source§impl Material for PbrMaterial
impl Material for PbrMaterial
Source§const TEXTURE_COUNT: u32 = 10u32
const TEXTURE_COUNT: u32 = 10u32
The texture count that will be provided to
to_textures
.Source§fn object_key(&self) -> u64
fn object_key(&self) -> u64
u64 key that determine’s an object’s archetype. When you query for
objects from the object manager, you must provide this key to get all
objects with this key.
Source§fn to_textures<'a>(&'a self, slice: &mut [Option<&'a TextureHandle>])
fn to_textures<'a>(&'a self, slice: &mut [Option<&'a TextureHandle>])
Fill up the given slice with textures.
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
Mutably borrows from an owned value. Read more