mercurys 0.0.1

Mercury celestial simulation crate for the MilkyWay SolarSystem workspace
Documentation
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum ShaderPass {
    Depth,
    Color,
    Shadow,
    Thermal,
}

pub struct ShaderConfig {
    pub id: &'static str,
    pub has_atmosphere: bool,
    pub has_ocean: bool,
    pub has_clouds: bool,
    pub thermal_overlay: bool,
    pub normal_mapping: bool,
}

impl ShaderConfig {
    pub fn mercury_surface() -> Self {
        Self {
            id: "mercury_surface",
            has_atmosphere: false,
            has_ocean: false,
            has_clouds: false,
            thermal_overlay: true,
            normal_mapping: true,
        }
    }

    pub fn mercury_nightside() -> Self {
        Self {
            id: "mercury_nightside",
            has_atmosphere: false,
            has_ocean: false,
            has_clouds: false,
            thermal_overlay: true,
            normal_mapping: false,
        }
    }

    pub fn active_features(&self) -> Vec<&'static str> {
        let mut f = vec!["pbr_base"];
        if self.normal_mapping {
            f.push("normal_map");
        }
        if self.thermal_overlay {
            f.push("thermal_ir");
        }
        f
    }
}

pub fn shader_id() -> &'static str {
    "mercury_default"
}