Matrix.Orthographic
static Matrix Orthographic(float width, float height, float nearClip, float farClip)
This creates a matrix used for projecting 3D geometry onto a 2D surface for rasterization. Orthographic projection matrices will preserve parallel lines. This is great for 2D scenes or content.
float width | The width, in meters, of the area that will be projected. |
float height | The height, in meters, of the area that will be projected. |
float nearClip | Anything closer than this distance (in meters) will be discarded. Must not be zero, and if you make this too small, you may experience glitching in your depth buffer. |
float farClip | Anything further than this distance (in meters) will be discarded. For low resolution depth buffers, this should not be too far away, or you’ll see bad z-fighting artifacts. |
RETURNS: Matrix | The final orthographic matrix. |
Found an issue with these docs, or have some additional questions? Create an Issue on Github!