Re: Gamma correct rendering with Wayland and Weston

2012-10-01 Thread Bill Spitzak
Pekka Paalanen wrote: And you would like to kill all innovative uses like: http://www.youtube.com/watch?v=_FjuPn7MXMs right? And spherical VR displays, too? No, this is not yet the reason to expose transformations to clients. You are only suggesting to make the protocol a huge deal more complex

Re: Gamma correct rendering with Wayland and Weston

2012-10-01 Thread Pekka Paalanen
On Sun, 30 Sep 2012 16:10:42 +0200 (CEST) Kai-Uwe Behrmann 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

Re: Gamma correct rendering with Wayland and Weston

2012-10-01 Thread Pekka Paalanen
On Sun, 30 Sep 2012 08:45:55 -0700 Bill Spitzak wrote: > On 09/29/2012 01:28 AM, John Kåre Alsaker wrote: > > >> Wayland also does scaling and rotations but the difference between linear > >> and srgb is much smaller for these. I think the real solution for this is > >> to > >> allow clients to

Re: Gamma correct rendering with Wayland and Weston

2012-09-30 Thread Bill Spitzak
On 09/29/2012 01:28 AM, John Kåre Alsaker wrote: Wayland also does scaling and rotations but the difference between linear and srgb is much smaller for these. I think the real solution for this is to allow clients to know the actual transform of their surfaces to the screen and be allowed to dra

Re: Gamma correct rendering with Wayland and Weston

2012-09-30 Thread Bill Spitzak
On 09/29/2012 01:28 AM, John Kåre Alsaker wrote: You seemed to have gotten the impression that I suggested we blend each surface in either sRGB or linear depending on it's encoding. That's not what I was suggesting. The compositor won't pick it's blending gamma space per surface. It's either com

Re: Gamma correct rendering with Wayland and Weston

2012-09-30 Thread Fred .
Can we have a tool like 'xgamma' now? On Sun, Sep 30, 2012 at 4:10 PM, Kai-Uwe Behrmann 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:

Re: Gamma correct rendering with Wayland and Weston

2012-09-30 Thread Kai-Uwe Behrmann
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

Re: Gamma correct rendering with Wayland and Weston

2012-09-29 Thread John Kåre Alsaker
On Fri, Sep 28, 2012 at 5:52 PM, John Kåre Alsaker wrote: > - srgb_a: > Rendering in linear gamma: > Shader: Undo the alpha premultiplying, convert from sRGB to > linear > gamma and premultiply the alpha after. When rendering srgb_a in linear gamma, we can use sRGB hardwar

Re: Gamma correct rendering with Wayland and Weston

2012-09-29 Thread John Kåre Alsaker
On Fri, Sep 28, 2012 at 10:51 PM, Bill Spitzak wrote: > Actual rendering of window contents is not done by Wayland so it should not > effect this. However wayland and the shells do some compositing, and gamma > changes how any partially-transparent pixels work. In current shells these > are: > > 1

Re: Gamma correct rendering with Wayland and Weston

2012-09-28 Thread Bill Spitzak
Actual rendering of window contents is not done by Wayland so it should not effect this. However wayland and the shells do some compositing, and gamma changes how any partially-transparent pixels work. In current shells these are: 1. "shadows", which are typically drawn by the client as parti

Gamma correct rendering with Wayland and Weston

2012-09-28 Thread John Kåre Alsaker
Currently most applications are blissfully unaware of the concept of gamma which affects pretty much all rendering operations. Resizing, alpha-blending, blurring, anti-aliasing, etc. are all operations that should be done on physical or linear luminance values. However if we stored linear values in