Basemark has just released Basemark Web 3.0, which includes WebGL 2.0 tests for supporting browsers. No browsers support the standard by default yet, although it can be enabled on Firefox and Chrome with a command-line flag.
WebGL 1.0 has become ubiquitous, but it is based on quite an old version of OpenGL. OpenGL ES 2.0 was specified all the way back in March 2007. While it simplified development by forcing everyone down a programmable shader pipeline, it has quite a few limitations. OpenGL ES 3.0 remedied many of these, such as allowing multiple render targets and texture compression. OpenGL ES 3.1 added compute shaders, which brings us pretty much to today. In fact, Vulkan targets OpenGL ES 3.1 hardware (should the hardware vendor provide a driver).
WebGL targeted OpenGL ES 2.0. WebGL 2 targets OpenGL ES 3.0.
Of course, this means that the WebGL 2.0 base standard does not support compute shaders, which is a bit of a drag. It's something that they really want to incorporate, though, but they still can't seem to decide whether it will align with a new version of WebGL (such as WebGL 2.1) or be incorporated in a multi-vendor extension.
So where are we today?
Well, WebGL 2.0 is still a little ways off from being everywhere. As we mentioned, only Firefox and Chrome support the standard, although WebKit is working on it, too. Microsoft has WebGL 2.0 listed as “Under Consideration” with a “Roadmap Priority” of Medium, “Development is likely for a future release.” One major hold up was its shader support. Again, OpenGL ES 3.0 shaders are much more complex than OpenGL ES 2.0 ones, and many WebGL browsers convert OpenGL ES 2.0 shaders to HLSL for DirectX on Windows. This circumvents lackluster graphics drivers, and it adds an extra, huge layer of complexity for someone who wants to write malware. It's not sufficient to know of a driver bug with a specific shader string — you need to trick the transpiler into outputting it, too.
But, again, we're slowly inching our way there.
Unsurprisingly, firefox did a
Unsurprisingly, firefox did a crap job with default settings. I know there scommand line options you have to enable but jesus christ when will they stop being behind in every way? I’d wish they would focus on actually making the browser perform well and meet the expectations of a modern browser rather than implement crap like addon signing and Telefonico Hello. I like firefox for being the generally at least attempting to be free and privacy-oriented option, at least moreso than Edge and Chrome but they seem to answer so much to investors and big business, and as a result they’re falling behind and compromising their principles in so many ways. This is the shit you get under capitalism. :/ If they stop being privacy-focused, they’ll have totally lost their niche, too, because it’s becoming hard to deal with the poor performance version after version, and I doubt electrolysis is going to solve it.
Overall, they really need to get their goals together and do something to focus on making it a good browser again.
Well, in these cases, all
Well, in these cases, all browser vendors have agreed to not use vendor prefixes (almost) ever again (ex: -moz- or -webkit-). Instead, they lock down new features behind developer settings until the spec is settled and the implementation is QA-certified.
As for making a good browser? They're trying a lot harder than you realize. Probably the major problem is that everyone has their own view of what a good browser is. There's at least a dozen different "top priorities", some of which are mutually exclusive, and chaos theory takes over when you start accounting for second, third, and fourth-level priorities.
Some want perfect security. Some want browsers to devolve back to document readers. Some want browsers to be a complete app platform. What is a complete app platform? Should it have direct access to graphics and compute APIs? Does the document reader UI map well to apps? Does the app UI map well to documents? How do we make all of these easier for developers? How do we prevent decades-old content from being unsupported? How do we reconcile decades-old single-threaded behaviour? Etc. etc. etc.
They are also working on a whole new browser engine, called Servo. This one should be interesting when it comes out of the labs. It pushes the structure away from "main loop" into batches of tasks that are grabbed, executed, and released, which can be mapped to any number of cores (although you'll only be as fast as your slowest block). It's also designed in a way that memory leaks are really difficult, because the Rust compiler is a jerk. Should be a whole new level of performance when it comes out.