Posts

Showing posts from 2024

Preventing banding by including truncated color depth as dithering

An image with and without dither rounding   The same image with one band shaded a different color.   NOTE: The stripey pattern on some of the cubes is an artifact of half-implemented SSAO. It is not an artifact of dither rounding. In a deferred-renderer: Intermediate images are created and combined to form what the user sees each frame. In my case, one of these intermediate images uses 16bit floats for each color channel. This is really nice for a lot of reasons. One reason for this is to allow certain pixels to be "brighter than white" ( https://learnopengl.com/Advanced-Lighting/HDR ). Another reason is to retain enough precision to produce any color when converting from linear color space to sRGB. This post is about yet another good reason to have that high-bit-depth image: The extra color information can be included in the final image as dithering! This prevents the otherwise unavoidable banding that comes from having only 256 brightness levels for any one color. The algor...