Struct mod3d_base::MaterialBaseData
source · pub struct MaterialBaseData {
pub rgba: u32,
pub metallic_roughness: u32,
pub emissive_rgb: u32,
pub alpha_etc: u32,
}Expand description
The basic data for a material; the most simple material is actually just RGB, but to keep the system simple the BaseData includes an alpha, metallicness and roughness.
For a simple material the alpha should be 1.0, and the metallic 0, and roughness 1
The simplest of shaders will use just the RGB values
Gltf
Fields§
§rgba: u32Color of the material
Least signficant is R, most A (0 transparent, of course)
metallic_roughness: u32Metallic nature of the material: 0 is fully dielectric, 1.0 is fully metallic
Roughness of the material: 0.5 is specular, no specular down to 0 full reflection, up to 1 fully matt
Each is 16 bits; least significant is metallic
emissive_rgb: u32The emissive color of the texture; 0 if unused
Least signficant is R
alpha_etc: u32The alpha data for the texture (alpha mode, alpha cutoff, etc)
effectively extensions
Implementations§
source§impl BaseData
impl BaseData
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BaseData
impl RefUnwindSafe for BaseData
impl Send for BaseData
impl Sync for BaseData
impl Unpin for BaseData
impl UnwindSafe for BaseData
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)