Probably to approximate gamma correction without getting too involved.
Probably to approximate gamma correction without getting too involved.
Incidentally, I didn't know to do gamma correction until I came across [3], which explained why the output from my raytracers always looked a little off ;)
[0] http://stackoverflow.com/questions/10843321/should-webgl-sha...
[1] https://www.khronos.org/webgl/public-mailing-list/archives/1...
[2] https://www.shadertoy.com/view/Xdl3WM
[3] http://blog.johnnovak.net/2016/09/21/what-every-coder-should...
GL does have the capability to handle linear color space buffers correctly, but you have to enable SRGB, and initialize the framebuffer correctly with SRGB color space, and I'm not sure if GLES (WebGL) can do this.
I realize now that I can't fully answer your question, because I'm unsure whether WebGL implementations are supposed to respect color correction information in the image file format. But I'm pretty sure that the color space in WebGL "shader land" is always linear.