#[repr(C)]pub struct RaymarchView {
pub vp: [[f32; 4]; 4],
pub inv_vp: [[f32; 4]; 4],
pub cam_pos: [f32; 4],
pub viewport: [f32; 2],
pub time: f32,
pub prefilter_mip_count: f32,
pub sky_rot: [[f32; 4]; 3],
}Expand description
Per-frame view inputs, 208 bytes. Every field after inv_vp is a float4
lane or smaller, which is what keeps the three targets agreeing: a float3
occupies 16 bytes in a Metal constant buffer and 12 on SPIR-V and DXIL.
Fields§
§vp: [[f32; 4]; 4]View-projection matrix, column-major.
inv_vp: [[f32; 4]; 4]Inverse view-projection matrix, column-major.
cam_pos: [f32; 4]World-space camera position in xyz; w is padding.
viewport: [f32; 2]Render-target size in pixels.
time: f32Seconds since the world started, available to the authored field.
prefilter_mip_count: f32Mip count of the bound IBL prefilter cube. 0 means no EnvironmentMap
is bound and the ambient helper takes its hemispheric fallback.
sky_rot: [[f32; 4]; 3]Rows of the rotation taking a world direction into the environment cubemap’s baked frame, so a volume’s ambient turns with the sky.
Trait Implementations§
Source§impl Clone for RaymarchView
impl Clone for RaymarchView
Source§fn clone(&self) -> RaymarchView
fn clone(&self) -> RaymarchView
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 RaymarchView
impl NoUninit for RaymarchView
Auto Trait Implementations§
impl Freeze for RaymarchView
impl RefUnwindSafe for RaymarchView
impl Send for RaymarchView
impl Sync for RaymarchView
impl Unpin for RaymarchView
impl UnsafeUnpin for RaymarchView
impl UnwindSafe for RaymarchView
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