Normal map lighting for 2D Pixel Art sprites

So after a bit of experimentation with this concept, I’ve come up with a simple project that’s able to support normal and spectral lighting and can handle multiple different lights. It uses a lua module to help create/track lights and their values as they are pushed to the renderscript.

It supports directional, point, and spotlights as per this LearnOpenGL tutorial. The lights exist in 3d space and their effects on the sprites reflect (haha) that, and the lighting is attenuated. I’ll post code or the entire project (after cleaning and documenting) if anyone is interested. Here’s a sloppy example:

10 Likes

Yes please share!

2 Likes

I’ll see if I can get it put later today (it’s 2 am for me lol)

1 Like

That would be great for reference. Let us know if you finally share the code. Thanks!

I’ve shared it already, here it is

3 Likes