Function ortho
Build an orthographic projection matrix with NDC determined at runtime
Parameters
Name | Description |
---|---|
ndc | the target NDC |
l | X position of the left plane |
r | X position of the right plane |
b | Y position of the bottom plane |
t | Y position of the top plane |
n | distance from origin to near plane (in Z-) |
f | distance from origin to far plane (in Z-) |
Returns
an affine matrix that maps from eye coordinates to NDC.