From b925b4b1bf79e3d6f930a4d799a7194673b62bde Mon Sep 17 00:00:00 2001 From: yum Date: Sat, 17 Jan 2026 17:35:13 -0800 Subject: Impostors: continue work on depth, getting closer --- 3ner.cginc | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to '3ner.cginc') diff --git a/3ner.cginc b/3ner.cginc index ab80a8d..18c23ee 100644 --- a/3ner.cginc +++ b/3ner.cginc @@ -258,7 +258,7 @@ float4 frag(v2f i, uint facing : SV_IsFrontFace #endif ) : SV_Target { UNITY_SETUP_INSTANCE_ID(i); -#if defined(SHADOW_CASTER_PASS) +#if defined(SHADOW_CASTER_PASS) && !(_IMPOSTORS) return 0; #endif @@ -281,18 +281,9 @@ float4 frag(v2f i, uint facing : SV_IsFrontFace i.normal = pbr.normal; i.objPos = pbr.objPos; propagateObjPos(i); + float4 imp_clip_pos = UnityObjectToClipPos(i.objPos); depth = imp_clip_pos.z / imp_clip_pos.w; - if (false) { - depth *= 100; - depth *= depth; - depth *= depth; - depth *= 100; - return float4(depth, depth, depth, 1); - } - if (false) { - return float4(i.objPos, 1); - } #endif #if defined(_DEBUG_VIEW_UNLIT) @@ -304,7 +295,6 @@ float4 frag(v2f i, uint facing : SV_IsFrontFace #elif defined(_DEBUG_VIEW_DEPTH) float2 screen_uv = i.pos.xy / _ScreenParams.xy; float depth = SAMPLE_DEPTH_TEXTURE(_CameraDepthTexture, screen_uv); - depth = 1.0f - depth; depth *= 100; depth *= depth; depth *= depth; @@ -323,4 +313,3 @@ float4 frag(v2f i, uint facing : SV_IsFrontFace } #endif // __3NER_INC - -- cgit v1.2.3