I have an Enlighten RTGI setup with an emissive quad on the MirrorReflection layer so that it is not visible to the player. To also hide this quad from personal mirrors, facecams, and cameras, I'm using the VRChat provided shader globals _VRChatCameraMode and VRChatMirrorMode and testing whether they are greater than zero.
I found that when I open my stream cam in game, all lighting effect disappear in the main VR game view. Somehow the _VRChatCameraMode is greater than zero in the main camera and I don't believe this is intended.
I tested the following scenarios:
Desktop
- Photo camera: works fine
- Stream camera (spout off): works fine
- Stream camera (spout on): works fine
VR
- Photo camera: works fine
- Stream camera (spout off): broken! *******
- Stream camera (spout on): works fine
Seems like a bug that it is broken only with Spout off and only in VR. There is also a possibility that this is a bug with the MirrorReflection layer, but I haven't created an isolated test scenario to confirm.
Code I'm using in a surface shader to reproduce:
if(_VRChatCameraMode > 0 || _VRChatMirrorMode > 0)
{
clip( -1.0 );
}