summaryrefslogtreecommitdiffstats
path: root/2ner.cginc
diff options
context:
space:
mode:
authoryum <yum.food.vr@gmail.com>2025-07-19 19:45:39 -0700
committeryum <yum.food.vr@gmail.com>2025-08-13 17:02:57 -0700
commit32781eb9ab83b504788198df552934ed6da08ee0 (patch)
tree7568fa381defe0bc59a0b411b2594023aea5076a /2ner.cginc
parent6e1c003ad574fa7606b91cc1c59b327237b6af3e (diff)
fuck
Diffstat (limited to '2ner.cginc')
-rw-r--r--2ner.cginc20
1 files changed, 19 insertions, 1 deletions
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)