cameraProjectionMatrixInverse
Provides the inverse of the camera's projection matrix, used to transform a 2D point on the screen (with depth) back into 3D view-space coordinates. It is a cornerstone of advanced post-processing effects.
Core Advantages
Automation and high performance. It automatically provides the efficiently cached inverse matrix from the camera object, avoiding expensive, repetitive calculations in JS, and seamlessly adapts to single-camera, split-screen, and VR rendering environments.
Common Uses
Reconstructing a pixel's full world position from a depth texture and UV coordinates.
Comparing the 3D spatial relationship of neighboring pixels in Screen Space Ambient Occlusion (SSAO).
Transforming a ray-marched screen-space position to world coordinates for depth testing in Screen Space Reflections (SSR).
Calculating the view ray direction from the camera through each pixel for volumetric lighting or fog.
Implementing GPU-based picking by unprojecting the mouse coordinates into a ray.
How to adjust
This node cannot be adjusted directly. Its value is linked to cameraProjectionMatrix and is controlled by the active camera's properties in JavaScript. After modifying camera properties like `.fov` and calling `camera.updateProjectionMatrix()`, this node's value updates automatically.
Code Examples
1
2// Reconstruct view-space position from Normalized Device Coordinates (NDC)
3const viewPosition = ndcPosition.mul( cameraProjectionMatrixInverse );
4