#[derive(Debug, Clone, Copy, PartialEq)]
pub struct GenericPlanetMaterial {
pub albedo: [f32; 3],
pub roughness: f32,
pub metallic: f32,
pub emissive: [f32; 3],
}
impl GenericPlanetMaterial {
pub fn rocky(albedo: [f32; 3]) -> Self {
Self {
albedo,
roughness: 0.8,
metallic: 0.0,
emissive: [0.0; 3],
}
}
pub fn gas_giant(albedo: [f32; 3]) -> Self {
Self {
albedo,
roughness: 0.3,
metallic: 0.0,
emissive: [0.0; 3],
}
}
pub fn icy(albedo: [f32; 3]) -> Self {
Self {
albedo,
roughness: 0.2,
metallic: 0.02,
emissive: [0.0; 3],
}
}
pub fn molten(albedo: [f32; 3], glow: [f32; 3]) -> Self {
Self {
albedo,
roughness: 0.95,
metallic: 0.05,
emissive: glow,
}
}
}