[Bf-committers] Where did OpenGL dither go?

Mike Erwin significant.bit at gmail.com
Fri Jun 7 21:01:35 CEST 2013


Yes, dither is still supported, but our implementation might not be
noticeable in full color RGB modes. It should be more obvious with a 16-bit
color buffer, but I don't have blender dev set up here to try that. This is
part of one of the few fixed-function parts of hardware these days, where
floating point fragment values are reduced to fixed point (of whatever bit
depth) in the framebuffer. You could always do a custom dither in the frag
shader to make the background color ramp look more "natural" -- roughen it
up to make it seem more smooth. Most displays do their own dithering on top
of all this, to make 8bpc signals look decent on (typically) 6bpc panels.
Maybe that's why the full-color dither doesn't try very hard to look good.

Mike Erwin
musician, naturalist, pixel pusher, hacker extraordinaire


On Fri, Jun 7, 2013 at 1:14 AM, Mike Erwin <significant.bit at gmail.com>wrote:

> Hey guys,
> I'll ask tomorrow at work, for the Mac ATI at least. What is it supposed
> to look like relative to the picture you posted?
> --Mike
>
> On Thursday, June 6, 2013, Ton Roosendaal wrote:
>
>> Hi,
>>
>> Yes of course that's it... 12 or 16 bits color displays had it. A decade
>> ago!
>> In the SGI days, many systems did double-buffer by halving the color
>> space to 2x12 bits, dithered too.
>>
>> Nevertheless, for 24 bits "true color" it would look nicer too :)
>>
>> -Ton-
>>
>> --------------------------------------------------------
>> Ton Roosendaal  -  ton at blender.org   -   www.blender.org
>> Chairman Blender Foundation - Producer Blender Institute
>> Entrepotdok 57A  -  1018AD Amsterdam  -  The Netherlands
>>
>>
>>
>> On 6 Jun, 2013, at 14:10, Brecht Van Lommel wrote:
>>
>> > I can't find good info on it either, maybe it was only ever used for
>> > OpenGL color index mode or displays with less than 8 bits per color
>> > channel?
>> >
>> > The dither implementation is not specified by the OpenGL
>> > specification, and it's valid to not do any dithering at all.
>> >
>> > On Thu, Jun 6, 2013 at 12:58 PM, Ton Roosendaal <ton at blender.org>
>> wrote:
>> >> Hi all,
>> >>
>> >> Someone pointed me at the banding, visible in shaded 3d viewports with
>> greyscales.
>> >> None of the systems I tried (mac nvidia, mac ati, linux nvidia) shows
>> any dither in the viewport... and there's nothing in the code pointing at
>> being disabled.
>> >>
>> >> I checked it with a print in the graded backdrop drawing:
>> >> printf("dither is %d\n", glIsEnabled(GL_DITHER));
>> >>
>> >> And it says it's on.
>> >>
>> >> Screenie, with expanded color range to see the banding:
>> >> http://www.pasteall.org/pic/52953
>> >>
>> >> Shouldn't it show a nice stipple pattern? I recall this, but more like
>> from 10 years ago or so :)
>> >>
>> >> Googling about it didn't give me info about this feature being dropped
>> in drivers nowadays.
>> >>
>> >> -Ton-
>>
>
>
> --
> Mike Erwin
> musician, naturalist, pixel pusher, hacker extraordinaire
>


More information about the Bf-committers mailing list