What I’m trying to achieve is a hard edge to the light. I thought I’d do this by using a custom made light cookie. When it’s applied however I get this:
I’ve discovered that if I turn off mip-map generation in the cookie it cleans up the effect a lot. It still however leaves me with these odd looking bits.
Hello. Could you please provide more details about this issue, such as which version of Unity you are using, your lighting settings, etc. Alternatively, you can create a small repro project and attach it here for us to investigate.
The reason why you are experiencing light leaking when using the cookie is because you didn’t leave enough padding around the borders. As outlined in this Unity Manual page - https://docs.unity3d.com/Manual/HOWTO-LightCookie.html - the borders of your texture have to be completely black in order to prevent light leaking.
I have modified your cookie texture so that it has a bit of padding around the borders. I will attach the file to this post.