So today I finished implementing a really basic and unoptimized deferred shader. The basic rundown of what I did today is basically:
– Use the data gathered from the geometry buffers and use them to calculate basic directional light on every fragment by sampling the textures.
– Run a second pass with a shader meant to calculate the point lights, using the following attenuation formula
And here’s the current results, just using three lights and some textured cubes, as you can notice the z depth test isnt implemented yet and so things that arent actually in the light gets lit up.
Tomorrow I aim to implement some handling so I can spawn as many lights as I want as well as fixing and testing for the depth before I compute the lighting and get it to look reasonably well.