[HLSL Code] Basic Dithering

share shaders here
  • Author
  • Message
Offline
User avatar
*blah-blah-blah maniac*
Posts: 17558
Joined: 27 Dec 2011, 08:53
Location: Rather not to say

Re: [HLSL Code] Basic Dithering

Even with hdr data dithering may be required, depends from scene. Problem is that 16 bit per channel hdr used and it's precision is very poor for small range like0.25-0.5, 0.5-1.0, 1.0-2.0, etc., so as soon as tonemapping do not compress data enough, banding artifacts appears.
_________________
i9-9900k, 64Gb RAM, RTX 3060 12Gb, Win7

Offline
*blah-blah-blah maniac*
Posts: 565
Joined: 05 Apr 2014, 10:29
Location: Taiwan

Re: [HLSL Code] Basic Dithering

@roxahris
Can't say for sure for specific implementation. The modification could be adjusting the amplitude and offset for artifacts at the ends of color range like the one mentioned by boris.

Anyway, the concept of dithering is about local sum, and due to the optic illusion thingy, as the noise amplitude/intensity increase, more pixels are taken into consideration of the local sum, hence the smoother visual gradient. But of course, it would also suffered from those extra noise grain.
_________________
Intel Xeon L5639 6C12T @3.96GHz | Gigabyte ga-x58a-ud3r | MSI GTX680 4G | 48G RAM | Intel 760p Nvme w clover bootloader
Flickr
YouTube
Post Reply