Shade4PointLights and ShadeVertexLights custom shader functions

I’m not really sure how those 2 functions are used in a custom shader, and what they do exactly (both functions are included in the ‘UnityCG.cginc’ file).

Shade4PointLights: The name implies that this will only compute light for 4 POINT lights, am I correct in assuming that SPOT and DIRECTIONAL lights won’t be computed?

ShadeVertexLights: Not really sure about what this function achieves exactly…I have looked at the body of both functions to try and understand what they are supposed to do, but I have a hard time understanding exactly what’s going on.

If anyone could shed some light on both these functions it would really help out a lot. As always, thanks for your time!


4 may be “for” :wink: