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: u32
Color of the material
Least signficant is R, most A (0 transparent, of course)
metallic_roughness: u32
Metallic 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: u32
The emissive color of the texture; 0 if unused
Least signficant is R
alpha_etc: u32
The alpha data for the texture (alpha mode, alpha cutoff, etc)
effectively extensions