diff options
| author | yum <yum.food.vr@gmail.com> | 2026-01-17 17:35:13 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2026-01-17 17:37:06 -0800 |
| commit | b925b4b1bf79e3d6f930a4d799a7194673b62bde (patch) | |
| tree | 1c45dbf95f66c4948ef6bcf64d9622b259fce624 /3ner.cginc | |
| parent | c6923a553c98da7805407fe1fbfdb6c69c8d7530 (diff) | |
Impostors: continue work on depth, getting closer
Diffstat (limited to '3ner.cginc')
| -rw-r--r-- | 3ner.cginc | 15 |
1 files changed, 2 insertions, 13 deletions
@@ -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 - |
