“At one point Microsoft was noncommittal what GLSL format to support and also wanted to left the language wholly undefined. This would've harmed the web platform a lot.”
I’m surprised by this statement. Our goals for WebGL have always been to have interoperable and well-defined implementations and specifications.
From: email@example.com [mailto:firstname.lastname@example.org]
On Behalf Of Florian Bösch
On Mon, Nov 14, 2016 at 3:11 PM, Maksims Mihejevs <email@example.com> wrote:
Precompiled shaders are quite a huge problem. There's two main scenarios to consider:
D3D bytecode shaders
Supplying your shaders are precompiled D3D bytecode has a number of problems, these are:
This presents a substantial problem for the web, we don't want to make "Windows only WebGL". We've fought long and hard to not end up exactly there. At one point Microsoft was noncomittal what GLSL format to support and also wanted to left the language wholly undefined. This would've harmed the web platform a lot.
Besides the above issues are also a considerable maintenance nightmare, as you now need to be aware against which backend you run your code, and which version of which backend, and cross-compile shaders for those, and supply those shaders, and so forth. Dragons live there.
OpenGL shader binary
The unsurmountable problem with this format is that it's GPU, driver and OS specific. You'd have to precompile your shaders for every conceivable combination of those. It's not intended to be used as a transport format, but rather a format to cache shaders on the local machine that that machine has compiled.
Since both these options are extremely bad, that's why I said precompiled shaders (short of WebVulkan) are a complete nogo, for any developer, in any scenario, in WebGL.