@Riven
Eh, I’m not sure it would be a significant enough jump in quality to warrant the extra render costs. I’ll probably look back into this later to see if I can change the algorithm to make the lights have a penumbra, but it’s not a high priority.
@matheus23
Haha yeah, that’s one of the main issues with pillars in my lighting engine. Straight-line terrain is fine, but curves are difficult, because the entire algorithm is based on line-segment polygon clipping.
The way that the lights work is that I render my scene normally into a texture, like this:
Then, I render my lights into a lighting mask texture:
And then I render the two buffers together in a shader, to make something this:
Voila. Easy-peasy lights.
To create the geometry for each light, I create the base geometry of a point light (a textured quad), and then I clip out sections using line segments as barriers. So, for the columns, I take the most efficient route and use the cross-section of the column as the barrier.
It looks great except for the top of the object.
It’s possible that I can get away with this - one thing I did not show in the video was a “line of sight” mask that doesn’t allow you to see through walls. The tops of the pillars will be covered, so the glaring discrepancy won’t be as obvious.