Documentation / @ripl/3d / unprojectPoint
Function: unprojectPoint() ​
unprojectPoint(
x,y,depth,inverseViewProjection,viewport):Vector3
Defined in: 3d/src/math/projection.ts:59
Reverses projectPoint, mapping a screen-space point at a given clip depth back into world space.
Parameters ​
| Parameter | Type | Description |
|---|---|---|
x | number | Screen-space x, in the same logical pixels projectPoint produces. |
y | number | Screen-space y. |
depth | number | Clip-space depth, 0 at the near plane and 1 at the far plane. |
inverseViewProjection | Matrix4 | The inverse of the view-projection matrix used to project. |
viewport | Viewport | The viewport the point was projected into. |
Returns ​
The world-space point.