diff options
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 - |
