Gamma correct rendering with Wayland and Weston
Pekka Paalanen
ppaalanen at gmail.com
Mon Oct 1 00:33:25 PDT 2012
On Sun, 30 Sep 2012 16:10:42 +0200 (CEST)
Kai-Uwe Behrmann <ku.b at gmx.de> wrote:
> In reply to John Kåre Alsaker Fri Sep 28 08:52:17 PDT 2012
>
> > - srgb:
> > Rendering in linear gamma:
> > If the hardware supports sRGB textures:
> > EGL: Use sRGB textures and present it as linear gamma to shaders.
> > If the hardware doesn't support sRGB textures:
> > Shader: Convert from sRGB to linear gamma.
> > - rgb:
> > Rendering in sRGB gamma:
> > Shader: Convert from linear to sRGB gamma.
>
> "sRGB textures" implies supporting the sRGB colour space on textures.
> Is such a texture meant to tell the display system to do final colour
> conversion from sRGB to monitor colour space? Are non sRGB colour spaces
> still possible like CIE*XYZ or LStar-RGB.icc for "sRGB textures"?
>
> However you write only about gamma. That is confusing.
> sRGB is defined with colour primaries inside the CIE*XYZ space + gamma
> encoding, that is what you appear to be referring to, and exact viewing
> conditions [1]. Gamma is only one part of the sRGB standard. If you realy
> refere to just gamma, then your functions can not be standard compliant
> and logical you should avoid sRGB or make clear that you only refere to a
> subset of that standard. The term "sRGB texture" would be highly
> inappropriate for gamma encoding.
>
> Gamma, including the sRGB gamma flavor, belongs to a logical layer called
> gamma correction [2]. On the opposite, colour management needs proper
> knowledge of the used gamma, in order to work properly.
Note, that this proposal does *not* discuss color spaces. It only
discusses gamma, as defined for sRGB.
The term "sRGB" is used, because it defines the gamma function, and the
same term is used in EGL and GL specifications, where it refers to
gamma, not color space in general. You can go and shoot the GL spec
writers for that.
Color management with proper color space handling and conversions is
outside of this proposal, and a subject to different, new protocol.
Thanks,
pq
More information about the wayland-devel
mailing list