MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / inv_proj_for

Function inv_proj_for

native/shared/src/renderer/planar_reflection.rs:183–185  ·  view source on GitHub ↗

Recompute `inv_proj` from a possibly-modified projection. After the EN-011 V2 `oblique_proj` rewrite, the reflection pass uses a near- plane-clipped projection that differs from the main camera's, so the inverse needs to be recomputed for any view-space reconstruction downstream (SSR, deferred unprojection).

(proj: [[f32; 4]; 4])

Source from the content-addressed store, hash-verified

181/// the inverse needs to be recomputed for any view-space reconstruction
182/// downstream (SSR, deferred unprojection).
183pub fn inv_proj_for(proj: [[f32; 4]; 4]) -> [[f32; 4]; 4] {
184 mat4_invert(proj)
185}
186
187/// Transform a world-space plane `(Nx, Ny, Nz, d)` (such that
188/// `N · p + d = 0` for points on the plane) into eye / view space

Callers 1

Calls 1

mat4_invertFunction · 0.85

Tested by

no test coverage detected