Get the latest tech news
Mini: Tonemaps (2023)
How to conquer washed out lights and ugly color banding
Technically, we should make sure we don’t divide by zero here by clamping or adding to the divisor, but I won’t worry about that here since a texcoord value of exactly (0.5, 0.5) is unlikely. As a I also found that tanh(x) works good for a quick solution, but since GM’s GLSL doesn’t natively support it yet, you have to recreate it yourself: In the end, I draw all the lights additively on a surface and then did tonemapping on the final results to bring the colors back to a reasonable range.
Or read this on Hacker News