From 32781eb9ab83b504788198df552934ed6da08ee0 Mon Sep 17 00:00:00 2001 From: yum Date: Sat, 19 Jul 2025 19:45:39 -0700 Subject: fuck --- 2ner.cginc | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to '2ner.cginc') diff --git a/2ner.cginc b/2ner.cginc index 861cd16..1e6af31 100644 --- a/2ner.cginc +++ b/2ner.cginc @@ -198,6 +198,24 @@ v2f vert(appdata v) { // Vertex color o.color = v.color; + + // Calculate vertex lights + #ifdef VERTEXLIGHT_ON + #if defined(_WRAPPED_LIGHTING) + o.vertexLight = Shade4PointLightsWrapped( + unity_4LightPosX0, unity_4LightPosY0, unity_4LightPosZ0, + unity_LightColor[0].rgb, unity_LightColor[1].rgb, unity_LightColor[2].rgb, unity_LightColor[3].rgb, + unity_4LightAtten0, o.worldPos, o.normal, _Wrap_NoL_Diffuse_Strength); + #else + o.vertexLight = Shade4PointLights( + unity_4LightPosX0, unity_4LightPosY0, unity_4LightPosZ0, + unity_LightColor[0].rgb, unity_LightColor[1].rgb, unity_LightColor[2].rgb, unity_LightColor[3].rgb, + unity_4LightAtten0, o.worldPos, o.normal); + #endif + #else + o.vertexLight = 0; + #endif + return o; } @@ -495,7 +513,7 @@ float4 frag(v2f i, uint facing : SV_IsFrontFace #ifdef LOD_FADE_CROSSFADE UnityApplyDitherCrossFade(i.pos.xy); #endif - + // Output proper shadow data SHADOW_CASTER_FRAGMENT(i) #elif defined(MASKED_STENCIL1_PASS) || defined(MASKED_STENCIL2_PASS) || defined(MASKED_STENCIL3_PASS) || defined(MASKED_STENCIL4_PASS) || defined(DEPTH_PREPASS) -- cgit v1.2.3