HDR and Tonemapping in GameMaker Shaders
2025-09-19
This article delves into handling High-Dynamic Range (HDR) colors in GameMaker shaders. GameMaker's default 8-bit unorm color format can lead to color clipping and inaccuracies when dealing with high-brightness scenarios, such as sun shaders. The author demonstrates the issues by comparing 6-bit and floating-point colors and showcases several common tonemapping functions (ACES, Uncharted2, Unreal, and tanh) to mitigate color clamping artifacts. Using the MandelBots project as an example, the article highlights the necessity of using HDR surfaces (surface_rgba16float) in complex lighting systems for improved color precision and blending.
Read more
Development