Hello, Is linear color space supported by WebGL? If not, is it going to be supported in near future? Or is there any workaround to force gamma color space to look as linear? Thanks in advance.
It doesn't work currently because webGL uses openGL ES2, IIRC. It'll work when the next version of webGL hits browsers probably. For the time being, any technique that allows it on mobile currently should probably work on weBGL - I think there's a linear lighting package on the asset store that might work?
There is no extension in WebGL (AFAIK, not even in WebGL 2.0) to support compressed textures in sRGB format, so we cannot support linear color space on WebGL so far.
https://www.khronos.org/registry/webgl/extensions/EXT_sRGB/ As it says, it support EXT with sRGB. Hope they will support other formats
Yes, this exists. But it does not support compressed textures, as I wrote. EXT is not a texture format, it stands for "Extension".
Where are we at now on linear lighting for WebGL2? I checked the other day and I did see some discussion about supporting SRGB compressed textures in the chrome bugs mailing list, but I'm not sure if there was any progress. Are you guys aware of any movement on this - as we move to full WebGL2 rollout for Firefox/Chrome? It seems that WebGL is the last platform that we're looking at to support linear now, as we seem to have a good bit of mobile.
Yes, we are aware of it. WEBGL_compressed_texture_s3tc_srgb extension is one piece of the puzzle we need to support linear color space. This is currently in a draft state in Canary. So currently it's still a work-in-progress. Hopefully we will have an experimental build with linear color support at some point in the next few months.
That's terrific. Publishing a single piece of content using two different lighting models is a real thorn in our side right now. Linear in webgl can't come soon enough.
Just an FYI for anyone else following the progress on this: The Chromium Bug (for google Chrome) is here: Status: FIXED - will be in next release behind a flag as far as I know. https://bugs.chromium.org/p/chromium/issues/detail?id=630498 The Firefox Bug https://bugzilla.mozilla.org/show_bug.cgi?id=1325113 Short story, full support (Angle/webgl platforms) was pushed to the latest chrome build yesterday (10th Jan 2016). Firefox is not started yet, but the bug is filed and prioritized.
Just thought I'd bring this up. Now that this is in Canary in Chrome, would it be possible to enable linear as "(Experimental)" in 5.6 beta?
We can't yet. We also need webgl context support for sRGB which is still being worked on. Hopefully we will have it in the next few months.
Not at this time. Once we have something it'll show up in the beta of whatever Unity version it is then.
The good news is that in the future it will be supported. The bad news is that we don't know yet when that future will be. As I said, once we have something it'll be in a beta for you to try out and give feedback.
Based off of @jonas-echterhoff original reply - is there a workflow to 'mimic' linear space when building for WebGL? Planely speaking our exe looks perfect matching the editor display and outputting as expected based on our settings, with all the right colors from textures and lights, while the webgl build is - just not right. Does webgl support uncompressed textures OR a different format other than sRGB for our texture? We are building for mobile but deploying demos via webgl and the entire game is being created using 1 (one) 256x256 texture map, and we have 1 (one) light in the scene which has a minimal yellow color (255,253,225). When we build to webgl it seems the color space change is affecting all texture colors by applying an overly saturated representation of the soft yellow light. If I can change the texture to uncompressed when building for webgl or to a different format other than sRGB to keep the lighting consistent I will, instead of changing the light to unrealistic white. Thanks all for keeping this topic ongoing.
https://bugzilla.mozilla.org/show_bug.cgi?id=1325113 SRGB compressed texture support now in Firefox beta. Will be coming with 55. Already supported in Chrome. Status: NEW → RESOLVED Last Resolved: 3 days ago status-firefox55: --- → fixed Resolution: --- → FIXED Target Milestone: --- → mozilla55 Do you know the tracking bugs for WebGL context support? Always reasonable to mention why this matters though I know you guys are aware. Linear mode on cross platform content that needs to be on the web still gated by this. Looking forward to potentially having an experimental switch in the near future when everything is ready. Keep up the good work.
Just a quick update on this: At the moment it looks like linear color rendering support is due to ship in 2017.2 and that it's going to require WebGL2.0. We will make sure this is included in our roadmap.
Hi! I saw a news slip, https://blogs.unity3d.com/ru/2017/06/22/linear-rendering-support-with-webgl-2-0/ , but it somehow deleted