[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Promote WEBGL_compressed_texture_s3tc_srgb to community approved



On Sat, Jan 14, 2017 at 1:11 PM, Christophe Riccio <christophe.riccio@unity3d.com> wrote:
 (storing color in linear directly)
sRGB stores nonlinear color. You write linear into gl_FragColor, but stored is nonlinear. You just don't do the conversion. Performance impact of a gamma conversion prior to writing to gl_FragColor is neglible. What isn't neglible is the effects of blending, which you don't mention. Blending in nonlinear space produces incorrect results. However the conversion with the sRGB format is done inside the blending stage, and therefore blending is done in linear space and only after blending it's serialized to nonlinear space.