INNER CODE UNIT · Rust
default
dust-engine/dust · crates/pbr/src/lib.rs:98
fn default() -> Self {
Self::zeroed()
}
}
/// Last frame's camera transform and FOV. Held as `Local` state on the
/// `render` system to fill the `prev_*` fields of the camera uniform.
#[derive(Default)]
struct PreviousCameraState {
model: Option<vk::TransformMatrixKHR>,
tan_half_fov: f32,
}
/// Build a camera uniform for the current frame.
///
/// If `prev` is `Some`, the previous-frame matrix/FOV are read from it and
/// then overwritten with the current frame's values. If `None` (or on the
/// very first call), `prev_*` mirror the current camera, which produces zero