Cookies and Lights in Unity 2020

GameDev Dustin
2 min readFeb 18, 2022


“A cookie is a mask that you place on a Light to create a shadow with a specific shape or color, which changes the appearance and intensity of the Light.

Cookies are an efficient way of simulating complex lighting effects with minimal or no runtime performance impact.

Effects you can simulate with cookies include caustics, soft shadows, and light shapes.

To apply a cookie to a Light in Unity, assign a texture to the Cookie field of a a Light component.”

We need to first find a suitable texture and import it into our unity project.

I’ve created an obnoxious green spotlight and cranked up the intensity.

Before we can use our cookie light texture, we need to change a few import settings.

We drag our new cookie light texture onto our Spot Light.

As you can see, this has given some real variation and detail to our spotlight.

Cookies would be most useful for lights that are directly attached to light fixture game objects.