Skip to content

Function: pickProjection() ​

ts
function pickProjection(out, projection, win): Matrix4;

Experimental

Narrow projection onto the pick window: out = T × projection, where T scales and translates clip-space x/y so the window's device pixels fill NDC [-1, 1]². Depth is untouched, so the pick pass depth-tests exactly like the visible frame. Equivalent to camera.setViewOffset(vw, vh, …, size, size) but works for any camera (and camera that already has a view offset) without mutating it. out may alias projection.

Parameters ​

ParameterType
outMatrix4
projectionReadonly<Matrix4>
winReadonly<PickWindow>

Returns ​

Matrix4

Released under the MIT License.