4
\$\begingroup\$

How do I create shadows and lights in a 2D top down perspective game? I want to achieve an effect similar to this game (also made in unity) where some objects like a torch, different sprites, and the player have a light source while the rest of the map is dark.

enter image description here

Do you anyone know how to achieve this, and could link me to some good resources on how to implement it in unity?

\$\endgroup\$
3
\$\begingroup\$

For simple shadows you can create a material and select the shader as Sprite>Diffuse , this will enable shadows on the sprite.

If you are looking for more than just shadows i.e. adding normal maps and other cool stuff, then check these two links give below :)

Writing a SpriteLamp Shader in Unity

Kencho's dev blog

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.