leetvr / hotham

Hotham is a tool for creating incredible standalone VR games.
Apache License 2.0
396 stars 28 forks source link

[Rendering] Dithering #390

Closed rasmusgo closed 2 years ago

rasmusgo commented 2 years ago

Description

Because 8 bits is too little for storing smooth gradients without noticeable banding, we should consider adding dithering to compensate.

https://computergraphics.stackexchange.com/questions/5904/whats-a-proper-way-to-clamp-dither-noise/8777#8777 is the state of the art according to @Ralith.

TODO

Ralith commented 2 years ago

Banding is generally only noticeable for perfectly smooth gradients. In other words you usually don't see it once you have textures applied, so long as those textures are not themselves mainly solid, flat colors. Since dithering isn't free (you either need to bake it into every fragment shader, or use a HDR framebuffer and dither in the tonemapping pass) it's probably best to take advantage of texturing to avoid it entirely in resource-constrained environments.

kanerogers commented 2 years ago

Given that this only really applies to un-textured objects and could have a very significant impact on performance I think it's best to close this one off for now!