#[repr(C)]pub struct TransparentView {
pub vp: [[f32; 4]; 4],
pub inv_vp: [[f32; 4]; 4],
pub camera_pos: [f32; 4],
pub viewport: [f32; 2],
pub time: f32,
pub prefilter_mip_count: f32,
}Expand description
Per-frame view inputs shared by every draw in the transparent pass (water,
glass), bound once for the whole pass. Matches TransparentView in
shaders/glass.slang and shaders/water.slang. 160 bytes.
Fields§
§vp: [[f32; 4]; 4]View-projection matrix, column-major.
inv_vp: [[f32; 4]; 4]Inverse view-projection matrix, column-major.
camera_pos: [f32; 4]World-space camera position (xyz). .w is ignored by the shader.
viewport: [f32; 2]Render-target width / height in pixels: the shader uses this to turn its fragment position into a normalised screen UV.
time: f32Wall-clock seconds since startup, fed to the Gerstner sum.
prefilter_mip_count: f32Mip count of the bound IBL prefilter cube; 0 signals “no environment map”, where the glass reflection falls back to a white rim. Per-frame state, so it rides the shared view rather than a per-draw params block.
Trait Implementations§
Source§impl Clone for TransparentView
impl Clone for TransparentView
Source§fn clone(&self) -> TransparentView
fn clone(&self) -> TransparentView
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TransparentView
impl NoUninit for TransparentView
Auto Trait Implementations§
impl Freeze for TransparentView
impl RefUnwindSafe for TransparentView
impl Send for TransparentView
impl Sync for TransparentView
impl Unpin for TransparentView
impl UnsafeUnpin for TransparentView
impl UnwindSafe for TransparentView
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more