So I’ve spend the last 4 hours or so trying to add spotlights… with limited success
The lighting part of spotlights work (diffuse, specular, distance and cosin falloff, volume mesh… all of it), the shadows don’t work and I need help with that.
If you know anything about shadows, maths, glsl, shaders, or anything else related pleas take a moment to take a look at my shaders and help me fix them.
Here’s a convenient link to the faulty shader: github.com/wezu/p3d_auto_deferr … ght_f.glsl