<div dir="ltr"><div>It's a great explanation of how and why gamma works in X3DOM :)</div><div><br></div><div>It was an inspiration for my own reading about gamma (results on <a href="https://github.com/michaliskambi/x3d-tests/wiki/Gamma-correction-in-X3D-and-glTF">https://github.com/michaliskambi/x3d-tests/wiki/Gamma-correction-in-X3D-and-glTF</a> ) and finally implementation of gamma correction in Castle Game Engine ( <a href="https://castle-engine.io/manual_gamma_correction.php">https://castle-engine.io/manual_gamma_correction.php</a> ).</div><div><br></div><div>Note that in CGE I made a bit different decisions than X3DOM:</div><div><br></div><div>- In CGE, the default is different. We apply gamma by default only on PhysicalMaterial, and we don't apply it on Material and UnlitMaterial. Of course it can be changed (to apply gamma always -- compatible with X3DOM, or never). The explanation how and why is on <a href="https://castle-engine.io/manual_gamma_correction.php">https://castle-engine.io/manual_gamma_correction.php</a> . I made such default behaviour to keep backward compatibility, otherwise introducing gamma in CGE would change the look of almost all existing models.</div><div><br></div><div>    So, long story short: if you set in CGE "GammaCorrection := gcPhysicalMaterial" (using code, or using view3dscene menu item) than CGE and X3DOM make 100% compatible gamma handling.<br></div><div><br></div><div>- We don't yet support X3DOM "Environment" node (with "gammaCorrectionDefault" field) because there wasn't much need for it. CGE developers have a simple global variable to adjust it from Pascal. One day I'll add "Environment.gammaCorrectionDefault" support, but it's lower priority now.</div><div><br></div><div>Regards,</div><div>Michalis<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">pon., 31 sie 2020 o 22:22 Don Brutzman <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>> napisał(a):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Michalis, wondering what you thought about this?<br>
<br>
<a href="https://doc.x3dom.org/tutorials/lighting/gamma" rel="noreferrer" target="_blank">https://doc.x3dom.org/tutorials/lighting/gamma</a><br>
<br>
"If you know what gamma correction is, you may just want to know that: Lighting in X3DOM can be gamma-correct or not, depending on the Environment node’s gammaCorrectionDefault field. RGB Colors and textures are assumed to be gamma coded. Intensities of all sorts are assumed to be linear. You can use gamma correction with the "gammaCorrectionDefault" attribute:" [...]<br>
<br>
all the best, Don<br>
-- <br>
Don Brutzman  Naval Postgraduate School, Code USW/Br       <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<br>
X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">http://faculty.nps.edu/brutzman</a><br>
</blockquote></div>