18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-02 06:12:41 +01:00
Files
maszyna/rendering/opengl46
pwarszawski 2dd53bc97b Make the glare of a FreeSpotLight as bright as the part of its point seen
The glare was drawn whole or not at all, depending on whether any sample
of the light point passed the depth test. The point is a few pixels
wide, so where it sits at the edge of something in front of it (the
hood of the lamp, a mast, a wire) the large glare switched on and off
as the camera moved and the signal seemed to flash.

The opengl renderer now counts the samples of the point which are seen
and, drawing the point once more without the depth test and without
colour, all of its samples. The gpu writes both counts into a small
storage buffer (GLARE_SSBO_BINDING) and billboard.frag scales the glare
by their ratio, so a partly hidden lamp gets a fainter glare instead
of a flashing one. The conditional render still leaves out the glare
of a point not seen at all. The vulkan renderer is unchanged.
2026-11-14 17:46:40 +01:00
..
2026-10-26 15:51:56 +01:00
2026-10-26 15:51:56 +01:00