Skip to main content

planar_matrices

Function planar_matrices 

Source
pub fn planar_matrices(
    view: Mat4,
    proj: Mat4,
    cam_pos: [f32; 3],
    plane_world: [f32; 4],
    clip_bias: f32,
) -> PlanarMatrices
Expand description

Build the mirror view + oblique-clipped view-projection + reflected eye for a camera (view / proj / cam_pos) reflecting across plane_world. The clip plane is nudged a hair below the surface (clip_bias, world units along the normal) so fragments exactly on the surface are not clipped by precision.