[x3d-public] Color differences between X3DOM and X_ITE

Andreas Plesch andreasplesch at gmail.com
Sun Apr 19 07:29:02 PDT 2020


I also believe the observed color differences are due to gamma
correction being applied by default in x3dom:

https://doc.x3dom.org/tutorials/lighting/gamma/index.html

For x3dom try to disable gamma correction with:

<Environment gammaCorrectionDefault="none"></Environment>

The frag shader in x3dom does encode gamma at the end:

https://github.com/x3dom/x3dom/blob/master/src/shader/ShaderDynamic.js#L1270

which means unapplying gamma correction after it has been applied for
color computation in the shader:

https://github.com/x3dom/x3dom/blob/master/src/shader/ShaderParts.js#L173

-Andreas

> Date: Sun, 19 Apr 2020 06:47:19 -0600
> From: GPU Group <gpugroup at gmail.com>
> To: John Carlson <yottzumm at gmail.com>
> Cc: X3D Graphics public mailing list <x3d-public at web3d.org>
> Subject: Re: [x3d-public] Color differences between X3DOM and X_ITE
>
> H: (inverse) gamma correction applied (at end of frag shader) in x3dom?
> In freewrl if I apply gamma like a khronos sample does for physical
> material, I get washed-out look.
> -Dioug Sanden
>
> On Sun, Apr 19, 2020 at 1:19 AM John Carlson <yottzumm at gmail.com> wrote:
>
> > [image: image.png]
> > I believe this is the most recent dev version of X3DOM,
> > and latest X_ITE build.   I will try to get an online version.
> >
> > See color difference between X3DOM (upper) and X_ITE (lower) for both JSON
> > and XML encodings.
> > _______________________________________________
> > x3d-public mailing list
> > x3d-public at web3d.org
> > http://web3d.org/mailman/listinfo/x3d-public_web3d.org
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20200419/7c3e0ceb/attachment.html>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: image.png
> Type: image/png
> Size: 81994 bytes
> Desc: not available
> URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20200419/7c3e0ceb/attachment.png>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
>
> ------------------------------
>
> End of x3d-public Digest, Vol 133, Issue 75
> *******************************************



-- 
Andreas Plesch
Waltham, MA 02453



More information about the x3d-public mailing list