#[repr(C)]pub struct GBufferModel {
pub cur_model: [[f32; 4]; 4],
pub prev_model: [[f32; 4]; 4],
}Expand description
Per-draw model matrices for the G-buffer pre-pass. Matches GbModel in
shaders/gbuffer_prepass.slang, which Metal and DirectX bind as a constant
buffer; Vulkan carries the same pair plus the roughness in one push-constant
block (vulkan::uniforms::GbModelPush), because a pipeline layout may declare
only one. For a static or skinned object with no motion the caller sets
prev == cur.
Fields§
§cur_model: [[f32; 4]; 4]This frame’s model matrix, column-major.
prev_model: [[f32; 4]; 4]The previous frame’s model matrix, for velocity.
Trait Implementations§
Source§impl Clone for GBufferModel
impl Clone for GBufferModel
Source§fn clone(&self) -> GBufferModel
fn clone(&self) -> GBufferModel
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 GBufferModel
impl NoUninit for GBufferModel
Auto Trait Implementations§
impl Freeze for GBufferModel
impl RefUnwindSafe for GBufferModel
impl Send for GBufferModel
impl Sync for GBufferModel
impl Unpin for GBufferModel
impl UnsafeUnpin for GBufferModel
impl UnwindSafe for GBufferModel
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