Cookies and Lights in Unity 2020

“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.




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Disaster Recovery At The Edge

A Goldilocks Approach to Reliability and Scalability Projects

Discovery stage: how it helps start software project successfully

SOLID Principles with Python Examples

Working with Handlers in Ansible

Airdrop Round 1 officially opened on September 20th at 12:00 PM UTC+7 with the HUGE number of…

Get started with Apache Superset and PostgreSQL

New Year Monday Note

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
GameDev Dustin

GameDev Dustin

More from Medium

Clear Shot Virtual Camera in Unity 2020

The Fourth Player Challenge: Problem Solving and Jumping

Platformer: Death Animation

Why Occlusion Culling Improves Performance