[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Gamma correction and texImage2D/texSubImage2D
- To: Kenneth Russell <firstname.lastname@example.org>
- Subject: Re: [Public WebGL] Gamma correction and texImage2D/texSubImage2D
- From: Cedric Vivier <email@example.com>
- Date: Fri, 3 Sep 2010 10:34:37 +0800
- Cc: firstname.lastname@example.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type; bh=1IKTb+rNkllIiu/qjyGNtJhL6i3cvgBQoOICzqs07DQ=; b=wCnOazjq+BAIGXi1KXBMjDZ4LTHpotTFzpCuEuKW9lbC/2/FAgQRgCaTIwM5HNhFCo 44hmusbHSlIdZoRPchSMIQnmUbaJ5GRIlO8ZbQwVXsHDIsP98BwLJKr4oo/6M/M7tTGF n5G8L0NJWOzC1CrcorFKfl4db1JJ2BVDr/vmc=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=RBOJvJ3k0ax6LxjON+irc2hwiV489zR/fPneuXkNzp/z9NtDH4/yZgtWP9GFWLJCUT 5/qsx4FbBPyb3szKgVdxccfI/YPXCiL8eslO8lgKgMpawnM1FDJEkHs2fxcnauUlwLKn rTm5K+mIaFJKyNdv2vBrdbGXfJXpqsJwuAI8g=
- In-reply-to: <AANLkTi=znoW0T3_0XYaA=FWEzfPFBH2ez4tWfCCZY=LE@mail.gmail.com>
- References: <AANLkTi=znoW0T3_0XYaA=FWEzfPFBH2ez4tWfCCZY=LE@mail.gmail.com>
- Sender: email@example.com
On Fri, Sep 3, 2010 at 10:01, Kenneth Russell <firstname.lastname@example.org>
1. What should the name of the new (boolean) pixelStorei parameter be?
The name which would most closely match the other parameters would
probably be UNPACK_CORRECT_GAMMA_WEBGL, where "correct" is a verb.
However, this name is probably confusing (why would you ever want
"incorrect" gamma?). UNPACK_PERFORM_GAMMA_CORRECTION_WEBGL?
The latter certainly sounds less confusing.
2. What should the default value of this flag be? If it were false,
then for images uploaded from the browser to WebGL, the default
behavior would be for the pixels to be completely untouched. However,
this might be surprising behavior to applications displaying images on
screen with very simple shader code (no lighting) and expecting them
to look the same as surrounding browser content.
IMHO this use case would only be likely with WebGL-based image editing, in most other applications (games, object viewers, etc) the final pixels might be too transformed through perspective, filtering, mipmapping, lighting, normal maps, light maps and so on, for slight gamma correction to really matter, so default should be false for least surprise when using non-image data.
However how does the browser typically handle gamma correction? Does it perform it depending on image metadata? Display color profile? A mixture or both?