Skip to content

Commit

Permalink
fix(VR): fix VR desync
Browse files Browse the repository at this point in the history
closes #601
  • Loading branch information
alandtse committed Oct 8, 2024
1 parent 08c8887 commit 958bc9a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion package/Shaders/Lighting.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -2132,7 +2132,13 @@ PS_OUTPUT main(PS_INPUT input, bool frontFace

float shadowComponent = 1.0;
if ((PixelShaderDescriptor & _DefShadow) && (light.lightFlags & Llf_ShadowLight)) {
shadowComponent = shadowColor[light.shadowLightIndex];
shadowComponent = shadowColor[
# ifndef VR
light.shadowLightIndex
# else
ShadowLightMaskSelect[light.shadowLightIndex]
# endif
];
lightShadow *= shadowComponent;
}

Expand Down

0 comments on commit 958bc9a

Please sign in to comment.