Skip to content

Commit

Permalink
Merge pull request #54 from alandtse/new_llf
Browse files Browse the repository at this point in the history
fix: adjust right eye by averaged position
  • Loading branch information
doodlum authored Aug 26, 2023
2 parents 33c29a1 + 8fb4090 commit 6375bcb
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 6375bcb

Please sign in to comment.