Fix projection matrix for 3d canvases;
@@ -109,19 +109,6 @@ void lovrCanvasBind(Canvas* canvas) {
float projection[16];
mat4_orthographic(projection, 0, width, 0, height, -1, 1);
lovrGraphicsSetProjection(projection);
- } else {
- mat4 projection = lovrGraphicsGetProjection();
- float b = projection[5];
- float c = projection[10];
- float d = projection[14];
- float aspect = (float) width / height;
- float k = (c - 1.f) / (c + 1.f);
- float near = (d * (1.f - k)) / (2.f * k);
- float far = k * near;
- float fov = 2.f * atan(1.f / b);
- float newProjection[16];
- mat4_perspective(newProjection, near, far, fov, aspect);
- lovrGraphicsSetProjection(newProjection);
}
}
