- Home /
2D Renderer Lighting with Normal Map, not working when running, but fine in editor.
I've installed the 2D renderer, and got 2D lights working fine. I've made some normal maps for my character sprites and added them as secondary textures. They clearly work in the editor and look really nice, but when I play the game in the editor I get strange results that look really bad and I can't even tell if it's working at all. When I do a build it seems like the normal maps aren't doing anything, and it lights the sprites normally. I'm new to normal maps, but I believe I've done them right as they look fine in scene view. So why could it be not working when running?
One other question
The one problem I do have in the editor is if I make the X scale -1, the Y axis flips on the lighting (normal map). This will be a problem with my characters that all flip this way, so is there a way around this?
Answer by 82MiddleMan · Jul 12, 2020 at 07:52 PM
I just worked this out. It didn't like the sprites being in a sprite atlas. I took them out and made them separate sprites and now it works fine in the build.
I take it that to use a sprite atlas I would need to have one atlas for the sprites, and one for the normal maps, both arranged in the same way?
I can't make a sprite atlas from the normal maps though when they are set to normal map. They seem to work fine when set to sprites, so do I just keep them as sprites? Is that fine to do? Or do I need to not use atlases when I'm using normal maps??? I'm confused!