summaryrefslogtreecommitdiffstats
path: root/tooner_lighting.cginc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2024-07-14 15:54:16 -0700
committeryum <yum.food.vr@gmail.com>2024-07-14 15:54:16 -0700
commit2af60b243f15a4aa609176a6b0259bb4d2f1984f (patch)
tree22d45fc72c238be4542894c1091a15dd60d6c11e /tooner_lighting.cginc
parenteed8c3622c6d1ff7e54fd971bf470c70492e55bb (diff)
Switch to Mochie's BRDF
Better than Unity BRDF and supports things like parameterizable half-lambertian lighting.
Diffstat (limited to 'tooner_lighting.cginc')
-rw-r--r--tooner_lighting.cginc4
1 files changed, 4 insertions, 0 deletions
diff --git a/tooner_lighting.cginc b/tooner_lighting.cginc
index 4288293..16f3fe3 100644
--- a/tooner_lighting.cginc
+++ b/tooner_lighting.cginc
@@ -132,6 +132,10 @@ v2f vert(appdata v)
o.worldPos = mul(unity_ObjectToWorld, v.vertex);
o.objPos = v.vertex;
+#if defined(SSR_ENABLED)
+ o.screenPos = ComputeGrabScreenPos(o.vertex);
+#endif
+
o.normal = UnityObjectToWorldNormal(v.normal);
o.tangent = float4(UnityObjectToWorldDir(v.tangent.xyz), v.tangent.w);
o.uv = v.uv0;