use bevy::{prelude::Resource, render::extract_resource::ExtractResource};
#[cfg(feature = "detection")]
#[derive(Debug, Clone, Copy)]
pub enum SkyboxCreationMode {
FromProjectionFarWithFallback(f32),
FromSpecifiedFar(f32),
}
#[cfg(feature = "detection")]
impl Default for SkyboxCreationMode {
fn default() -> Self {
Self::FromProjectionFarWithFallback(1000.0)
}
}
#[derive(Resource, ExtractResource, Debug, Clone, Copy)]
pub struct AtmosphereSettings {
pub resolution: u32,
#[cfg(feature = "dithering")]
pub dithering: bool,
#[cfg(feature = "detection")]
pub skybox_creation_mode: SkyboxCreationMode,
}
impl Default for AtmosphereSettings {
fn default() -> Self {
Self {
resolution: 512,
#[cfg(feature = "dithering")]
dithering: true,
#[cfg(feature = "detection")]
skybox_creation_mode: SkyboxCreationMode::default(),
}
}
}