Material roughness, metallic, specular editing

This commit is contained in:
Danny McGee
2024-03-21 21:36:14 -04:00
committed by Brandon Thomas
parent dbebcfaafc
commit abefbf9fcc
4 changed files with 77 additions and 8 deletions
+6
View File
@@ -542,12 +542,18 @@ fn auto_serialize_asset<T: Asset + Reflect + GetTypeRegistration>(
#[reflect(Default)]
struct ShortMaterial {
pub base_color: Color,
pub perceptual_roughness: f32,
pub metallic: f32,
pub reflectance: f32,
}
impl ShortMaterial {
pub fn new(material: &StandardMaterial) -> Self {
Self {
base_color: material.base_color,
perceptual_roughness: material.perceptual_roughness,
metallic: material.metallic,
reflectance: material.reflectance,
}
}
}