Corrected bug on MatrixPerspective()

Some other tweaks...
This commit is contained in:
raysan5
2017-07-22 10:35:41 +02:00
parent bee980e90f
commit 00d2768bc9
4 changed files with 7 additions and 7 deletions

View File

@@ -3585,7 +3585,7 @@ static void UpdateBuffersDefault(void)
// Draw default internal buffers vertex data
// NOTE: We draw in this order: lines, triangles, quads
static void DrawBuffersDefault()
static void DrawBuffersDefault(void)
{
Matrix matProjection = projection;
Matrix matModelView = modelview;
@@ -3967,9 +3967,9 @@ static void SetStereoConfig(VrDeviceInfo hmd)
SetShaderValue(vrConfig.distortionShader, GetShaderLocation(vrConfig.distortionShader, "chromaAbParam"), hmd.chromaAbCorrection, 4);
#endif
// Fovy is normally computed with: 2*atan2(hmd.vScreenSize, 2*hmd.eyeToScreenDistance)*RAD2DEG
// Fovy is normally computed with: 2*atan2(hmd.vScreenSize, 2*hmd.eyeToScreenDistance)
// ...but with lens distortion it is increased (see Oculus SDK Documentation)
//float fovy = 2.0f*atan2(hmd.vScreenSize*0.5f*distortionScale, hmd.eyeToScreenDistance)*RAD2DEG; // Really need distortionScale?
//float fovy = 2.0f*atan2(hmd.vScreenSize*0.5f*distortionScale, hmd.eyeToScreenDistance); // Really need distortionScale?
float fovy = 2.0f*(float)atan2(hmd.vScreenSize*0.5f, hmd.eyeToScreenDistance);
// Compute camera projection matrices