#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub struct Glow {
pub position: [f32; 3],
pub color: [f32; 4],
pub kind: GlowKind,
pub soft_distance: f32,
}
#[derive(Clone, Copy, Debug, Default, PartialEq)]
pub enum GlowKind {
#[default]
Uniform,
Tapered { uv: [f32; 2], profile: GlowProfile },
Line { other: [f32; 3], offset: f32 },
}
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct GlowProfile {
pub taper: f32,
pub ripple_frequency: [f32; 2],
pub ripple_amplitude: f32,
}
impl Default for GlowProfile {
fn default() -> Self {
Self {
taper: 2.,
ripple_frequency: [62.83, 18.],
ripple_amplitude: 0.3,
}
}
}
pub const MAX_VERTICES: usize = 6144;
pub const MAX_DISPLACEMENT_PIXELS: f32 = 32.;
#[repr(C)]
#[derive(Clone, Copy, bytemuck::Pod, bytemuck::Zeroable)]
pub struct HeatDistortion {
pub position: [f32; 3],
pub displacement: [f32; 2],
pub weight: f32,
}
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct FogVolume {
pub center: glam::Vec3,
pub rotation: glam::Quat,
pub size: glam::Vec3,
pub density: f32,
pub albedo: [f32; 3],
pub edge_fade: f32,
}
impl Default for FogVolume {
fn default() -> Self {
Self {
center: glam::Vec3::ZERO,
rotation: glam::Quat::IDENTITY,
size: glam::Vec3::splat(2.),
density: 1.,
albedo: [1.; 3],
edge_fade: 0.1,
}
}
}