Search Unity

WebGL and linear color space

Discussion in 'Web' started by Xilinnilix, Jan 3, 2019.

  1. Xilinnilix

    Xilinnilix

    Joined:
    Nov 19, 2018
    Posts:
    9
    I am using Unity 2018.3 and my platform of choice is WebGL.

    I would like to use the linear color space in my project so I can get a better visual quality and also use the post processing stack and PBR materials correctly. The linear color space for WebGL requires at least WebGL 2.
    WebGL 1 is supported pretty much everywhere, but sadly that's not the case for WebGL 2.
    The support of WebGL versions makes me want to use WebGL 1, but then I can't use the linear color space.

    Is there a way to "fake" the look of linear color space (by using color grading for example) while I'm actually using gamma color space? If so, could someone point me to some resources talking about how to implement this?

    I have tried out to patch the WebGL1 build myself. I made a WebGL1 build with linear color space, but as expected, that didn't really work well. Everything on the screen had a white color. Did anyone try something like this before and got it to work?
    Does someone know what feature of WebGL2 is used to support linear color space, maybe I could emulate it in WebGL1 somehow?

    Thanks in advance