summaryrefslogtreecommitdiffstats
path: root/3ner.cginc
diff options
context:
space:
mode:
Diffstat (limited to '3ner.cginc')
-rw-r--r--3ner.cginc5
1 files changed, 3 insertions, 2 deletions
diff --git a/3ner.cginc b/3ner.cginc
index 4b98812..a1ab224 100644
--- a/3ner.cginc
+++ b/3ner.cginc
@@ -184,14 +184,15 @@ float4 frag(v2f i, uint facing : SV_IsFrontFace
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
+#endif
+
LightData light_data;
GetLighting(i, pbr, light_data);
return brdf(pbr, light_data);
-#endif
}
#endif // __3NER_INC