Hacker News new | past | comments | ask | show | jobs | submit login

My recommendation is to do the equivalent of FRC in your shaders. I use one of the dither functions from https://developer.oculus.com/blog/tech-note-shader-snippets-... to break up banding in my geometry rasterization shaders that I use for rendering all my UI elements. It looks good in static images and fantastic in motion since the dithering pattern shifts every frame.

One thing to watch out for is that if you're alpha blending, you need to be fairly cautious about how you dither and multiply. Premultiplied alpha does not get along with dithering, so the output from your shaders needs to be dithered but NOT premultiplied, with premultiplication performed by the GPU's ROPs (they typically seem to operate above 8 bits of precision.) If you don't do this you will get really nasty banding on alpha fades even though you dither. Also, counter-intuitively, you may not want to dither the alpha channel (test it yourself, ymmv)

When dealing with sRGB and linear space it can also be important whether you dither before or after the color-space conversion.




Changing the dither pattern every frame subjectively increases noise so I have change dither pattern every frame off for videos.

I also turn off colored noise as well, because even though having colored noise on lowers luma noise, it does increase chroma noise.

I don't want to see noisy colors moving around on videos, esp. anime.

My monitor does do FRC, so all this software stuff is added noise which is why I like to turn it off.


noise and dithering are different, though. I'm referring to dithering. It's correct that for videos it can be distracting to have the dithering change every frame, particularly if your framerate is low. I'm doing game dev so my framerates are >=60, at which point FRC dither is near-invisible.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: