use crate::model::Atmospheric;
use bevy::{prelude::*, render::render_resource::ShaderType};
#[derive(Atmospheric, ShaderType, Reflect, Debug, Clone)]
#[uniform(0, Gradient)]
#[internal("shaders/gradient.wgsl")]
pub struct Gradient {
pub sky: Color,
pub horizon: Color,
pub ground: Color,
}
impl Default for Gradient {
fn default() -> Self {
Self {
sky: Color::rgb(0.29, 0.41, 0.50),
horizon: Color::rgb(0.48, 0.62, 0.69),
ground: Color::rgb(0.71, 0.69, 0.57),
}
}
}
impl From<&Gradient> for Gradient {
fn from(gradient: &Gradient) -> Self {
gradient.clone()
}
}