How to I implement a spotlight cone in vertex/fragment shader?

Hello, I’m trying to implement lighting in my shader but I can’t find any way to determine the spotlight angle. Lights in my shader seem to be working fine except that the spotlights are not affected by the cone radius.

How do I get the spotlight angle in my shader? Do I need to use a cookie or something?

To answer my own question, yes unity uses a default cookie for the spotlight radius.

see here for ‘how to’

It also requires forward rendering lightmode not vertex lit. Vertex lightmode is limited to the 4 nearest point lights and 1 directional light.