summaryrefslogtreecommitdiffstats
path: root/tooner_lighting.cginc
diff options
context:
space:
mode:
Diffstat (limited to 'tooner_lighting.cginc')
-rw-r--r--tooner_lighting.cginc18
1 files changed, 18 insertions, 0 deletions
diff --git a/tooner_lighting.cginc b/tooner_lighting.cginc
index 9195a73..2e2a254 100644
--- a/tooner_lighting.cginc
+++ b/tooner_lighting.cginc
@@ -26,6 +26,7 @@
#include "tone.cginc"
#include "tooner_scroll.cginc"
#include "trochoid_math.cginc"
+#include "zwrite_abomination.cginc"
#ifndef TOONER_LIGHTING
#define TOONER_LIGHTING
@@ -1170,6 +1171,23 @@ float4 effect(inout v2f i, out float depth)
float roughness = _Roughness;
#endif
+#if defined(_GIMMICK_ZWRITE_ABOMINATION) && defined(FORWARD_BASE_PASS)
+ {
+ ZWriteAbominationPBR pbr = zwrite_abomination(i);
+ i.worldPos = pbr.worldPos;
+ albedo = pbr.albedo;
+ metallic = pbr.metallic;
+ roughness = pbr.roughness;
+ normal = pbr.normal;
+ depth = pbr.depth;
+#if 0
+ float3 c = 1;
+ c *= saturate(dot(normal, float3(0, -1, 1)));
+ return float4(c, albedo.a);
+#endif
+ }
+#endif
+
#if defined(VERTEXLIGHT_ON)
float4 vertex_light_color = float4(i.vertexLightColor, 1);
#else