perspective4x4

fun perspective4x4(fovy: Float, aspect: Float, zNear: Float, zFar: Float, res: FloatArray)

Constructs a perspective projection 4x4 matrix.

Parameters

fovy

The field of view angle in the y-direction

aspect

The aspect ratio

zNear

The distance to the near clipping plane

zFar

The distance to the far clipping plane

res

The 4x4 matrix to store the result