summaryrefslogtreecommitdiffstats
path: root/cnlohr.cginc
diff options
context:
space:
mode:
Diffstat (limited to 'cnlohr.cginc')
-rw-r--r--cnlohr.cginc8
1 files changed, 6 insertions, 2 deletions
diff --git a/cnlohr.cginc b/cnlohr.cginc
index 4962805..709c7ac 100644
--- a/cnlohr.cginc
+++ b/cnlohr.cginc
@@ -37,6 +37,11 @@
* SOFTWARE.
*/
+UNITY_DECLARE_DEPTH_TEXTURE(_CameraDepthTexture);
+float _VRChatMirrorMode;
+float3 _VRChatMirrorCameraPos;
+
+
// Source:
// https://github.com/cnlohr/shadertrixx?tab=readme-ov-file#eye-center-position
bool isMirror() { return _VRChatMirrorMode != 0; }
@@ -82,7 +87,7 @@ void GetScreenUVAndPerspectiveFactor(float3 worldPos, float4 clipPos, out float2
}
#if defined(_SSAO)
-float GetDepthOfWorldPos(float3 worldPos, out float2 debug)
+float GetDepthOfWorldPos(float3 worldPos)
{
float3 objPos = mul(unity_WorldToObject, float4(worldPos, 1));
float4 clipPos = UnityObjectToClipPos(objPos);
@@ -94,7 +99,6 @@ float GetDepthOfWorldPos(float3 worldPos, out float2 debug)
GetLinearZFromZDepth_WorksWithMirrors(zDepthFromMap, screen_uv);
linearZ = min(1E3, linearZ);
- debug = screen_uv;
return linearZ;
}
#endif