- Home /
Shading on 2D sprites?
So I'm screwing around with Unity 2D, and I am trying to make a level where everything is dark except where a light shines. I went into the render settings and changed the ambient lighting to black, but nothing seemed to change. Fog didn't do anything either.
Then I realized, I didn't know how to change the shading for a sprite in unity like you can a texture. And I think the problem is that the sprites are always self-lit, not responding to the environmental lighting. Is there a way to change that? Or do you have to write a custom shader? If so, I have no idea how to do that, so are there any shaders I could find online that I could stick on my sprites? Thanks for any help.
Answer by robertbu · Dec 27, 2013 at 05:01 AM
Create a new material and use the Sprites/Diffuse shader. Drag the material onto the 'Material' variable in the Sprite Renderer.
This is great! You're a genius! Or I'm an idiot. Or both! But thanks anyway!
LOL respect man if you are reading this plez tell me haw did u figured that out it saved my whole life
Your answer
Follow this Question
Related Questions
Unity 2D Shader Graph Sprite transparent when in shadow 0 Answers
Ambient Light not working with some objects 1 Answer
Making glowing lines and shapes 1 Answer
Trying to create 2D pixel art lighting 1 Answer
2d lighting effect 1 Answer