Shader global _VRChatCameraMode incorrectly set in main camera
needs more information
~nono~
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 );
}
Log In
_
_tau_
needs more information
Unable to reproduce. Test setup:
- Steam Link VR w/ Quest Pro on current live version, 1606
- Shader displaying the current value of _VRChatCameraMode
- Using Stream Camera mode and pointing it at a quad rendering with said shader
-> Number reads 1 on desktop window and viewfinder, number reads 0 when looking at it directly - as expected.
Tested with a mirror in view and without, no difference.
If you have a world with simple reproduction steps, feel free to post a link. In that case please also post the shader source for reference. Perhaps screenshots/video could help too.
~nono~
_tau_
The issue is apparent in my test world https://vrchat.com/home/world/wrld_9c584f88-0cc3-4daa-99bc-0341fe2212a5/info
This world is currently in progress and I'm working on unrelated tasks that may confuse/break the issue. The area with lighting on the MirrorRepflection layer is from on the stage pointing towards the room. I'll come back to this with a simpler world example. It's hard in VR to record this because the issue happens specifically happens when you toggle on/off the Spout option.
I'll add some screen shots in a bit.
Also I'm using a Valve Index on Windows 11 with an nvidia card if that makes any difference in reproducing.
~nono~
Recorded a video as best I could. I'll try to replicate in a simpler world later next week. This does not happen in desktop mode. https://youtu.be/w49F_2lLgCg
Private world above is gone. New link is live at https://vrchat.com/home/world/wrld_071227d4-9035-4728-ab2b-e60f0ae0c683/info
StormRel
tracked