public static float4x4 MatrixPerspectiveFov(float fovy, float aspect, float zn, float zf)
{
float h = 1.0f / (float)Math.Tan(fovy / 2.0f); // view space height
float w = h / aspect; // view space width
return new float4x4(w, 0, 0, 0, 0, h, 0, 0, 0, 0, zf / (zn - zf), -1, 0, 0, zn * zf / (zn - zf), 0);
}
public static float4x4 MatrixTranslation(float3 t)