summaryrefslogtreecommitdiffstats
path: root/3ner.cginc
diff options
context:
space:
mode:
Diffstat (limited to '3ner.cginc')
-rw-r--r--3ner.cginc10
1 files changed, 9 insertions, 1 deletions
diff --git a/3ner.cginc b/3ner.cginc
index d50f553..1b5e358 100644
--- a/3ner.cginc
+++ b/3ner.cginc
@@ -161,14 +161,22 @@ v2f domain(
return o;
}
-float4 frag(v2f i, uint facing : SV_IsFrontFace) : SV_Target {
+float4 frag(v2f i, uint facing : SV_IsFrontFace
+#if defined(_CUSTOM31_TUBES)
+, out float depth : SV_DepthLessEqual
+#endif
+) : SV_Target {
i.normal *= facing ? 1 : -1;
i.normal = normalize(i.normal);
i.tangent.xyz = normalize(i.tangent.xyz);
Pbr pbr = getPbr(i);
+#if defined(_UNLIT)
+ return pbr.albedo;
+#else
LightData light_data;
GetLighting(i, pbr, light_data);
return brdf(pbr, light_data);
+#endif
}
#endif // __3NER_INC