#[repr(C)]pub struct GlassParams {
pub centre: [f32; 4],
pub normal: [f32; 4],
pub tint: [f32; 4],
pub opacity: f32,
pub refraction_strength: f32,
pub fresnel_power: f32,
pub planar: f32,
}Expand description
Per-panel tunables for a GlassPanel, uploaded once per panel per frame.
The vec3-ish fields are [f32; 4] so the layout is byte-identical to the
shader’s float4. Matches GlassParams in shaders/glass.slang. 64 bytes.
Fields§
§centre: [f32; 4][x, y, z, _]: world-space panel centre.
normal: [f32; 4][nx, ny, nz, _]: unit panel normal (facing direction).
tint: [f32; 4][r, g, b, _]: colour multiplied into the refracted scene.
opacity: f32Base alpha at normal incidence.
refraction_strength: f32Screen-space refraction offset strength.
fresnel_power: f32Schlick-Fresnel exponent for the grazing-angle rim.
planar: f32Planar reflection strength: > 0.5 selects the sharp planar reflection
(the scene re-rendered mirrored across this pane’s plane, sampled
projectively at screen UV) over the probe / sky cube. 0 when planar is off
(RT on, no planar slot, or the plane overflowed the budget), keeping the
probe / sky path. Patched per-frame in collect_glass_transparent_draws.
Trait Implementations§
Source§impl Clone for GlassParams
impl Clone for GlassParams
Source§fn clone(&self) -> GlassParams
fn clone(&self) -> GlassParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more