summaryrefslogtreecommitdiffstats
path: root/cnlohr.cginc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2025-01-22 21:04:34 -0800
committeryum <yum.food.vr@gmail.com>2025-01-22 21:04:34 -0800
commit358c53eb9ffae8da890fdc7ff10952bf3958819d (patch)
tree1c018d628ebb1975957b831327736766272c61ed /cnlohr.cginc
parent4ec13bd7513f29e16ab22b7ffe7d06724c92a912 (diff)
Add some options to ds2_11 (terrain gimmick)
Also chase down the weird clearcoat bug.
Diffstat (limited to 'cnlohr.cginc')
-rw-r--r--cnlohr.cginc2
1 files changed, 1 insertions, 1 deletions
diff --git a/cnlohr.cginc b/cnlohr.cginc
index 73fb80c..ef4aa79 100644
--- a/cnlohr.cginc
+++ b/cnlohr.cginc
@@ -43,7 +43,7 @@ bool isMirror() { return _VRChatMirrorMode != 0; }
// Source:
// https://github.com/cnlohr/shadertrixx?tab=readme-ov-file#eye-center-position
float3 getCenterCamPos() {
-#if defined(USING_STEREO_MATRICES)
+#if defined(USING_STEREO_MATRICES) || defined(UNITY_SINGLE_PASS_STEREO)
return (unity_StereoWorldSpaceCameraPos[0] + unity_StereoWorldSpaceCameraPos[1]) / 2;
#else
return isMirror() ? _VRChatMirrorCameraPos : _WorldSpaceCameraPos.xyz;