- Home /
Normal map on 2D sprite screwed it up.,Applying material with normal map on 2D sprite screwed it up.
Hello!
I am making 2D game first time in Unity and so far I have created a simple scene with some "ufo" and space station then I decided to apply lighting on them so I started with space station. I have learned that for my purposes will be applying a normal map on sprite the best solution. However when I created bumped diffuse material and add sprite and normal map and apply it on my game object it messed it up from some reason and some strange unwanted black areas apeard there. You can see that on image: https://answers.unity.com/storage/temp/169796-whyy.png
Why is this happening to me and how to fix it.
Also normal map itself appears to work well.
Answer by rainChu · Oct 24, 2020 at 10:36 PM
The shader you are using, Legacy/Bumped Diffuse, doesn't support transparency at all. if you're going to be using shaded sprites which interact with lighting, with a normal map, I see no issue with just using the Standard shader, instead. Set the material to use the Standard shader with the Cutout rendering mode, instead of Opaque. This should solve your problem.
Let me know how this works.
Thx @rainChu ... Well yes, it did something. Standard make sprite a bit brighter I think but those black spaces did not vanish they only become semi-transparent. And trying to set rendering mode to cutout makes the whole sprite transparent so this is not the point.
So it helps a bit but did not solve the problem :(
Answer by Petkopetko · Oct 26, 2020 at 02:54 PM
I manage to figure this out on my own. All that you need to do is set Shader on Legacy Shaders/Transparent/Bumped Diffuse practically the same as I have originally only with Transparent between!
Your answer
![](https://koobas.hobune.stream/wayback/20220613014451im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Inconsistent Lighting Options 1 Answer
Disable Lightmap when baked lights turn off 0 Answers
Circle Sprite Looking Pixelated 1 Answer