#[repr(C)]pub struct GlassMeshParams {
pub model: [[f32; 4]; 4],
pub tint: [f32; 4],
pub opacity: f32,
pub refraction_strength: f32,
pub fresnel_power: f32,
pub prefilter_mip_count: f32,
}Expand description
Per-draw tunables for a see-through glass MESH: a Material flagged
see_through on an RT-capable device, drawn in the transparent pass instead
of the opaque one. Unlike GlassParams (a pre-baked world-space pane), a
mesh is LOCAL-space, so this carries the model matrix the vertex stage
applies; the fragment uses the interpolated per-vertex world normal. Matches
GlassMeshParams in shaders/glass_mesh.slang. 96 bytes (model is the first
field, so its 16-byte GPU alignment is satisfied at offset 0).
Fields§
§model: [[f32; 4]; 4]Column-major local-to-world model matrix.
tint: [f32; 4][r, g, b, _]: colour multiplied into the refracted scene (material tint).
opacity: f32Base alpha at normal incidence (from Material.opacity).
refraction_strength: f32Screen-space refraction offset strength.
fresnel_power: f32Schlick-Fresnel exponent for the grazing-angle rim.
prefilter_mip_count: f32Mip count of the bound IBL prefilter cube (ray-miss fallback); 0 = none.
Trait Implementations§
Source§impl Clone for GlassMeshParams
impl Clone for GlassMeshParams
Source§fn clone(&self) -> GlassMeshParams
fn clone(&self) -> GlassMeshParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more