Struct PbrMaterial

Source
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

Source§

fn default() -> PbrMaterial

Returns the “default value” for a type. Read more
Source§

impl DepthRenderableMaterial for PbrMaterial

Source§

const ALPHA_CUTOUT: Option<AlphaCutoutSpec>

If Some it is possible to do alpha cutouts
Source§

impl Material for PbrMaterial

Source§

const TEXTURE_COUNT: u32 = 10u32

The texture count that will be provided to to_textures.
Source§

const DATA_SIZE: u32 = 160u32

The amount of data that will be provided to to_data.
Source§

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>])

Fill up the given slice with textures.
Source§

fn to_data(&self, slice: &mut [u8])

Fill up the given slice with binary material data. This can be whatever data a shader expects.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> AnyBound<dyn Any> for T
where T: Any,

Source§

impl<T> AnyBound<dyn Any + Send> for T
where T: Any + Send,

Source§

impl<T> AnyBound<dyn Any + Send + Sync> for T
where T: Any + Send + Sync,

Source§

impl<T> AnyBound<dyn Any + Sync> for T
where T: Any + Sync,