Skip to main content

VRChat Shader Globals

VRChat provides multiple global shader parameters Shader creators can use to implement VRChat-specific features.

The following shader globals are currently available:

  • float _VRChatCameraMode:
    • 0 - Rendering normally
    • 1 - Rendering in VR handheld camera
    • 2 - Rendering in Desktop handheld camera
    • 3 - Rendering for a screenshot
  • uint _VRChatCameraMask - The cullingMask property of the active camera, available if _VRChatCameraMode != 0
  • float _VRChatMirrorMode:
    • 0 - Rendering normally, not in a mirror
    • 1 - Rendering in a mirror viewed in VR
    • 2 - Rendering in a mirror viewed in desktop mode
  • float3 _VRChatMirrorCameraPos - World space position of mirror camera (eye independent, "centered" in VR)