use super::identity::DecalImageId;
use glam::{Quat, Vec3};
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct Decal {
pub position: Vec3,
pub rotation: Quat,
pub size: Vec3,
pub base_color: DecalImageId,
pub normal: Option<DecalImageId>,
pub metallic_roughness: Option<DecalImageId>,
pub color: [f32; 4],
pub base_color_mix: f32,
pub upper_fade: f32,
pub lower_fade: f32,
pub normal_fade: f32,
}
impl Decal {
pub fn new(base_color: DecalImageId) -> Self {
Self {
position: Vec3::ZERO,
rotation: Quat::IDENTITY,
size: Vec3::splat(2.),
base_color,
normal: None,
metallic_roughness: None,
color: [1.; 4],
base_color_mix: 1.,
upper_fade: 0.3,
lower_fade: 0.3,
normal_fade: 0.,
}
}
}