#[derive(Clone)]
pub struct MeshLodLevel {
pub mesh_name: String,
pub min_screen_pixels: f32,
}
#[derive(Clone)]
pub struct MeshLodChain {
pub base_mesh: String,
pub levels: Vec<MeshLodLevel>,
}
#[derive(Clone, Default)]
pub struct InstancedObjectData {
pub world_models: Vec<[[f32; 4]; 4]>,
pub world_normals: Vec<[[f32; 4]; 3]>,
pub local_matrices: Vec<nalgebra_glm::Mat4>,
pub custom_tints: Vec<[f32; 4]>,
pub mesh_name: String,
pub render_layer: u32,
pub visible: u32,
pub parent_transform: nalgebra_glm::Mat4,
}
#[derive(Clone, Default)]
pub struct RenderDecalData {
pub texture: Option<String>,
pub emissive_texture: Option<String>,
pub emissive_strength: f32,
pub color: [f32; 4],
pub size: nalgebra_glm::Vec2,
pub depth: f32,
pub normal_threshold: f32,
pub fade_start: f32,
pub fade_end: f32,
}
#[derive(Clone, Debug, Default)]
pub struct RenderWaterData {
pub half_extents: nalgebra_glm::Vec2,
pub tessellation: u32,
pub wave_amplitude: f32,
pub wave_steepness: f32,
pub wave_length: f32,
pub wave_speed: f32,
pub wave_direction_radians: f32,
pub shallow_color: [f32; 3],
pub deep_color: [f32; 3],
pub depth_fade_distance: f32,
pub edge_foam_distance: f32,
pub foam_amount: f32,
pub foam_color: [f32; 3],
pub roughness: f32,
pub fresnel_power: f32,
pub reflection_strength: f32,
pub refraction_strength: f32,
pub specular_strength: f32,
}
#[derive(Clone)]
pub struct RenderWater {
pub entity: nightshade_ecs::Entity,
pub water: RenderWaterData,
pub transform: nalgebra_glm::Mat4,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Default)]
pub enum RenderClothPinning {
#[default]
TopRow,
TopCorners,
None,
}
#[derive(Clone, Debug, PartialEq, Default)]
pub struct RenderClothData {
pub columns: u32,
pub rows: u32,
pub width: f32,
pub height: f32,
pub pinning: RenderClothPinning,
pub stiffness: f32,
pub damping: f32,
pub substeps: u32,
pub solver_iterations: u32,
pub gravity: nalgebra_glm::Vec3,
pub wind_response: f32,
pub ground_height: Option<f32>,
pub texture_tiling: nalgebra_glm::Vec2,
pub reset_epoch: u32,
}
#[derive(Clone, Default)]
pub struct RenderText {
pub mesh: nightshade_text::text_data::TextMesh,
pub color: nalgebra_glm::Vec4,
pub outline_color: nalgebra_glm::Vec4,
pub outline_width: f32,
pub smoothing: f32,
pub billboard: bool,
pub transform: nalgebra_glm::Mat4,
pub char_count: usize,
pub character_colors: Option<Vec<Option<nalgebra_glm::Vec4>>>,
}
#[derive(Clone, Copy, Debug, Default)]
pub struct RenderBounds {
pub center: nalgebra_glm::Vec3,
pub sphere_radius: f32,
}
#[derive(Clone, Copy, Debug, Default)]
pub struct MeshletPlacement {
pub transform: nalgebra_glm::Mat4,
pub asset_id: u64,
pub material_id: u32,
}
#[cfg(feature = "meshlet")]
pub type MeshletAssetCache =
std::collections::HashMap<u64, std::sync::Arc<crate::meshlet::asset::MeshletMesh>>;