diff options
| author | yum <yum.food.vr@gmail.com> | 2026-03-16 15:00:36 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2026-03-16 15:00:36 -0700 |
| commit | 50fcd18a2fb21cb19893c0c65310a525925c9177 (patch) | |
| tree | 84411bfdc42203b157be932b2dc33a53b92a65c1 | |
| parent | 921990168c22f5cccb77c5b608063d77adeaeab8 (diff) | |
Further improve tessellation shadows
| -rwxr-xr-x | 3ner.cginc | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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; } |
