コンテンツにスキップ

ミラーやカメラに映らないシェーダーを書くときに

しれっと 3.1.8から以下のパラメーターが追加されている

Added 3 shader globals that can be accessed by any avatar or world shader:

float _VRChatCameraMode:

0 - Rendering normally
1 - Rendering in VR handheld camera
2 - Rendering in Desktop handheld camera
3 - Rendering for a screenshot

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)