Stationary light cast CSM on one view when enable Google VR plugin

Hi,

I guess there’s some bug on mobile CSM when enable Google VR.

Issues description:
To test the issue, I just create a very simple level with one stationary direction light, one dynamic skeletal mesh and a big flat static mesh as floor. According to documentation, the direction light is stationary, ‘Cast Modulated Shadows’ is unchecked, ‘Dynamic Shadow Distance Stationary Light’ is 1500.0 and disable ‘Inset Shadows For Movable Objects’. The skeletal mesh is dynamic. The big floor static mesh is Static and enable ‘Receive Combined Static and CSM Shadow’.
Add Google VR plugin, so, two view exist for VR rendering. Preview the level with ‘Mobile Preview’ after build light map. We found only show dynamic shadow on left view, and no any dynamic shadow on right view.

Issues detail:
Debug with feature level ‘OpenGL ES2’, we find, BuildCombinedStaticAndCSMVisibilityState function only update left view CSM related data in ShadowSetupMobile.cpp. That means, no CSM for right view.

My Fix:
According to the debug result, I did a very simple fix, copy all mobile CSM info from view0 to view1.
if (Views.Num()>1)
{
check(Views.Num() == 2);
if (Views.Num() == 2)
{
Views[1].MobileCSMVisibilityInfo = Views[0].MobileCSMVisibilityInfo;
}
}

We want to report this issue and verify it’s a bug or not. Also, we want to have a more stable fix if this is a bug. Thanks in advance.

Best regards,
Jin Yaping