mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 21:42:31 +02:00
Oculus: fix for lighting changes as avatar scale changes
The code was incorrectly NOT using the near and far clip distances when computing the culling projection matrix. This projection matrix is used by the lighting system to for deferred lighting, if it does not match actual projection used for rendering into the g-buffer, the lighting will be incorrect.
This commit is contained in:
parent
a41aced032
commit
f314ba38df
1 changed files with 1 additions and 1 deletions
|
@ -84,7 +84,7 @@ glm::mat4 OculusBaseDisplayPlugin::getCullingProjection(const glm::mat4& basePro
|
|||
float baseFarClip = baseFrustum.getFarClip();
|
||||
auto combinedFov = _eyeFovs[0];
|
||||
combinedFov.LeftTan = combinedFov.RightTan = std::max(combinedFov.LeftTan, combinedFov.RightTan);
|
||||
return toGlm(ovrMatrix4f_Projection(combinedFov, DEFAULT_NEAR_CLIP, DEFAULT_FAR_CLIP, ovrProjection_ClipRangeOpenGL));
|
||||
return toGlm(ovrMatrix4f_Projection(combinedFov, baseNearClip, baseFarClip, ovrProjection_ClipRangeOpenGL));
|
||||
} else {
|
||||
return baseProjection;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue