diff options
| author | yum <yum.food.vr@gmail.com> | 2025-07-19 19:45:39 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2025-08-13 17:02:57 -0700 |
| commit | 32781eb9ab83b504788198df552934ed6da08ee0 (patch) | |
| tree | 7568fa381defe0bc59a0b411b2594023aea5076a /2ner.cginc | |
| parent | 6e1c003ad574fa7606b91cc1c59b327237b6af3e (diff) | |
fuck
Diffstat (limited to '2ner.cginc')
| -rw-r--r-- | 2ner.cginc | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -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)
|
