Skip to content

Commit

Permalink
fix: adjust right eye by averaged position
Browse files Browse the repository at this point in the history
  • Loading branch information
alandtse committed Aug 26, 2023
1 parent f57e7ad commit 8fb4090
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Features/LightLimitFix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -685,9 +685,9 @@ void LightLimitFix::UpdateLights()
light.positionWS[1] = light.positionWS[0];
if (eyeCount == 2) {
auto offset = eyePosition - state->GetVRRuntimeData().posAdjust.getEye(1);
light.positionWS[1].x += offset.x;
light.positionWS[1].y += offset.y;
light.positionWS[1].z += offset.z;
light.positionWS[1].x += offset.x / (float)clusteredLights;
light.positionWS[1].y += offset.y / (float)clusteredLights;
light.positionWS[1].z += offset.z / (float)clusteredLights;
}
currentLightCount += AddCachedParticleLights(lightsData, light, particleLight.second.second, eyeIndex);

Expand Down Expand Up @@ -719,9 +719,9 @@ void LightLimitFix::UpdateLights()
light.positionWS[1] = light.positionWS[0];
if (eyeCount == 2) {
auto offset = eyePosition - state->GetVRRuntimeData().posAdjust.getEye(1);
light.positionWS[1].x += offset.x;
light.positionWS[1].y += offset.y;
light.positionWS[1].z += offset.z;
light.positionWS[1].x += offset.x / (float)clusteredLights;
light.positionWS[1].y += offset.y / (float)clusteredLights;
light.positionWS[1].z += offset.z / (float)clusteredLights;
}
currentLightCount += AddCachedParticleLights(lightsData, light, particleLight.second.second, eyeIndex);
}
Expand Down

0 comments on commit 8fb4090

Please sign in to comment.