Fix for vr rendering not taking render target size into account (#2424)

This commit is contained in:
Maiko Steeman
2022-04-24 10:48:50 +01:00
committed by GitHub
parent e1ee4b1466
commit ccfac59c60
3 changed files with 26 additions and 6 deletions

View File

@@ -2348,8 +2348,8 @@ VrStereoConfig LoadVrStereoConfig(VrDeviceInfo device)
// Fovy is normally computed with: 2*atan2f(device.vScreenSize, 2*device.eyeToScreenDistance)
// ...but with lens distortion it is increased (see Oculus SDK Documentation)
//float fovy = 2.0f*atan2f(device.vScreenSize*0.5f*distortionScale, device.eyeToScreenDistance); // Really need distortionScale?
float fovy = 2.0f*(float)atan2f(device.vScreenSize*0.5f, device.eyeToScreenDistance);
float fovy = 2.0f*atan2f(device.vScreenSize*0.5f*distortionScale, device.eyeToScreenDistance); // Really need distortionScale?
// float fovy = 2.0f*(float)atan2f(device.vScreenSize*0.5f, device.eyeToScreenDistance);
// Compute camera projection matrices
float projOffset = 4.0f*lensShift; // Scaled to projection space coordinates [-1..1]