#[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,
}Expand description
Per-frame view inputs the raymarch pass binds at buffer(0). Layout matches
RaymarchView in shaders/raymarch_helpers.metal. 160 bytes.
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 (xyz). .w is ignored.
viewport: [f32; 2]HDR target width / height in pixels: the shader divides position.xy by
this to read the depth attachment with integer pixel coordinates.
time: f32Wall-clock seconds since startup, available to the user SDF.
prefilter_mip_count: f32Mip count of the bound IBL prefilter cube; 0 disables the cube-sample IBL
path and the helper falls back to the hand-tuned hemispheric ambient.
Mirrors ViewUniforms.prefilter_mip_count from the Main pass: same
semantics, same gate.
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