- Home /
Pixelated Sprite Lighting
I am using 2D pixel art in my game. I want there to be lighting on my pixel art sprites. When I change the shader of the sprite to the sprites/Diffuse shader, it works well. However, I would like only for pixels to be lit. Right now, the lighting is too smooth. Can anyone help me create an effect like in this article? (maybe with normal maps)
Try save a greyscale version of your sprite, then get Unity to convert it to a normal map?
Also, you're probably wanting to use the Transparent/Cutout/Bumped Diffuse shader, not Diffuse.
neisis: when I use this shader, the sprites do not respond to lighting in my scene. Any help?
EDIT: After further tests, the sprites only respond to lighting behind them? Odd...
A normal map. It explains how to do this in the article -_-
I followed the instructions in the article as well and all I get is a black sprite. Changing the position of the light doesn't help, I switched from 2D mode to 3D mode and it didn't help. When I change the ambient light to white I can see everything. The point light is somehow not illu$$anonymous$$ating the material. Example: http://imgur.com/hog0r7k
Your answer
![](https://koobas.hobune.stream/wayback/20220613131128im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Trying to create 2D pixel art lighting 1 Answer
Age of Empire Mini Map 1 Answer
How to efficiently render a 2D grid? 1 Answer
How to make 2D water like in Celeste 0 Answers
2D Lighting Material Overlap Issues 4 Answers