summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2026-03-16 15:00:36 -0700
committeryum <yum.food.vr@gmail.com>2026-03-16 15:00:36 -0700
commit50fcd18a2fb21cb19893c0c65310a525925c9177 (patch)
tree84411bfdc42203b157be932b2dc33a53b92a65c1
parent921990168c22f5cccb77c5b608063d77adeaeab8 (diff)
Further improve tessellation shadows
-rwxr-xr-x3ner.cginc10
1 files changed, 7 insertions, 3 deletions
diff --git a/3ner.cginc b/3ner.cginc
index c8d76e6..bd6880b 100755
--- a/3ner.cginc
+++ b/3ner.cginc
@@ -224,15 +224,19 @@ v2f domain(
#if defined(_RAY_MARCHING_BAKED_ORIGINS)
o.color = DOMAIN_INTERP(color);
#endif
+#if defined(POINT) || defined(SPOT) || defined(POINT_COOKIE) || defined(DIRECTIONAL_COOKIE)
+ o._LightCoord = DOMAIN_INTERP(_LightCoord);
+#endif
+ o._ShadowCoord = DOMAIN_INTERP(_ShadowCoord);
propagateObjPos(o);
UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
+ UNITY_TRANSFER_FOG_COMBINED_WITH_EYE_VEC(o, o.pos);
#if defined(SHADOW_CASTER_PASS)
- //TRANSFER_SHADOW_CASTER_NORMALOFFSET(o);
-#else
- TRANSFER_SHADOW(o);
+ o.pos = UnityClipSpaceShadowCasterPos(float4(o.objPos, 1), o.normal);
+ o.pos = UnityApplyLinearShadowBias(o.pos);
#endif
return o;
}