2D Tiles Lighting Problem

Hey guys. I’m making a 2D platformer and recently implemented an initial prototype random level generator. Each of the level tiles is 32x32px and have a material that responds to lights in the scene. The problem I’ve noticed is that the light seems to glare off of each tile individually instead of smoothly across a floor or wall as you’d expect from real life where the floor is continuous surface rather than the illusion of a continuous surface created by tiles being put together. I’ve tried all sorts of ranges for the point light as well as intensity tweaks but this same effect occurs. I thought about trying to write a script that might try to group sprites together into chunks and make them all one mesh to see if the lights render correctly, but before I try something crazy like that I wondered if anyone might have a solution for the problem. I’ve linked a video to show you what it’s doing. Fingers crossed that someone has come across this problem before and has a fix. I couldn’t find anything on the forums or the rest of the interwebs though after a few hours of research. Thanks in advance!

I don’t know what the problem could be right away… Can you tell what material/shader you’re using?

Sprites/Diffuse

It’s very strange that you get this, I just tried it in my own game and it looks right. If you’d allow me I could take a look at your project and see if I find the problem :slight_smile: Feel free to send me a PM.

Thanks for your willingness to take a look Siegfried… it only appears to be happening on solid colored blocks so it’s fine now that I’ve applied the actual level sprites to the objects. Still wonder what’s going on. It’s very strange.

1 Like

That’s very strange indeed… But glad it just works :slight_smile: