The most convenient way to create a cookie for use with the Built-in Render PipelineA series of operations that take the contents of a Scene, and displays them on a screen. Unity lets you choose from pre-built render pipelines, or write your own. More info
See in Glossary is to create a grayscale texture, import that texture to Unity, and then let Unity convert the texture’s brightness to alpha.
Note that in the Built-in Render Pipeline, cookies only use data from the alpha channel. This means that you can define a shape for a cookie, but not a color.
To do this:
Note that the pixelsThe smallest unit in a computer image. Pixel size depends on your screen resolution. Pixel lighting is calculated at every screen pixel. More info
See in Glossary of a cookie does not need to be completely transparent or opaque, but can also incorporate any values in between. You can use in-between values to simulate dust or dirt in the path of the light, or to simulate caustic effects such as those produced by the ridges in a car’s headlight.
For more information on configuring the import settings for cookies in the Built-in Render Pipeline, see Texture Type: Cookie.
In the Built-In Render Pipeline, VertexLit shadersA program that runs on the GPU. More info
See in Glossary can’t display Cookies or Shadows.
Shadows are disabled for directional lights with cookies when forward renderingA rendering path that renders each object in one or more passes, depending on lights that affect the object. Lights themselves are also treated differently by Forward Rendering, depending on their settings and intensity. More info
See in Glossary is used. It’s possible to write custom shaders to enable shadows in this case; see documentation on writing surface shaders for further details.