diff options
| author | yum <yum.food.vr@gmail.com> | 2026-01-17 14:43:18 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2026-01-17 15:11:56 -0800 |
| commit | c6923a553c98da7805407fe1fbfdb6c69c8d7530 (patch) | |
| tree | ad4a46d220fbb210cf82ffbe83b14ed05bab0a28 /cnlohr.cginc | |
| parent | 02c32fcc30e753da96f0aa072ed1d74ca300979c (diff) | |
Impostors: continue work on depth
Diffstat (limited to 'cnlohr.cginc')
| -rw-r--r-- | cnlohr.cginc | 8 |
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 |
