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])
| 181 | /// the inverse needs to be recomputed for any view-space reconstruction |
| 182 | /// downstream (SSR, deferred unprojection). |
| 183 | pub 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 |
no test coverage detected