2D antialiased graphics using OpenGL

Martijn Sipkema msipkema@sipkema-digital.com
Thu, 11 Dec 2003 23:24:13 +0100


[...]
> > I think windows doesn't use a corrected framebuffer normally, I'm not
> > sure though, but that doesn't mean we should not either...
> 
>   You're trying to politicize gamma correction?

Well, yes! :)

> > > > If you need to display an image that is in the sRGB color space on
> > > > a gamma corrected framebuffer you'd need to convert it to linear
> > > > RGB color space.
> > > > 
> > > > That's the way I understand it, please correct me if I'm wrong...
> > > 
> > > Sounds reasonable, but I don't think you should assume that people
> > > set up their framebuffers to be linear.  That's just nonsensical.
> > > All images from digital cameras, images on the web, etc, are almost
> > > always corrected for a gamma of about 2.2 and assuming that only
> > > more minor corrections will be done from then on in.
> > 
> > Well, those images can easily be converted to linear gamma, but when
> > rendering in the framebuffer using OpenGL the result will only be
> > correct when the framebuffer uses linear color values...
> > 
> > Also, IIRC most workstation _do_ set up the framebuffer to be (nearly)
> > linear, i.e. somewhere between 1 and 1.5 (instead of 2.2).
> 
>   As has been mentioned before, using a linear framebuffer causes
> visible banding.

Then the framebuffer resolution should be increased if this is a problem...
There already is consumer hardware that can do more than 8 bits per
channel.

> Furthermore, modern graphics cards can do gamma
> correct compositing and other colour interpolation operations, this is
> part of DX9 (I think needed for DX9) and is in GDI+.

Nice. But it wouldn't be needed if the framebuffer used linear color
values. The fact remains that rendering needs to be done in linear color
space and AFAIK OpenGL expects this. You wouldn't be able to just
add to a pixel value in a nonlinear color space since the result depends
on what value you are adding to. I feel that if 8 bits per channel is not
good enough, then one should use more, but I doubt it is really _that_
bad...

> Finally, most
> references about SGIs that I have seen use gamma values of like 1.7,
> I've never heard of an OS API using less than 1.4, which is still
> something that you compensate for.

I think a slightly too high gamma value is also used to compensate for
the room lighting conditions.

--ms