Remove WebGL1 support
As WebGL2 support is almost on all devices (that can run PlayCanvas content): https://web3dsurvey.com/webgl2, it's time to consider removal of WebGL1 support.
There are two stages to this:
- add a deprecated warning
- remove the actual support in some future release
Because why not: https://twitter.com/willeastcott/status/1734574645871771931
The time has come! cheerful noises in the background
In recent year, the only cases of WebGL 1 I've seen in production is a combination of old hardware and outdated software. The performance of basic content on these devices is really bad, and would require application developer to reduce the quality of the app drastically.
There are various platforms with their stats, biased based on the audience (gaming websites, caniuse, etc).
I believe it is time to go for WebGL 1.
What would a major benefits would be for the engine by removing WebGL1? e.g. Transform Feedback (does WebGPU have alternative, Compute Shaders?), download size reduction, stability, some GLSL features, what else?
What would a major benefits would be for the engine by removing WebGL1
We could use Uniform buffers on WebGL2 (to match WebGPU). We could add it now, but we'd have two systems.
related: https://github.com/playcanvas/engine/pull/5957
As mentioned as a response to the above tweet as well, Poki is still seeing around 5% of it's users using WebGL1: https://developers.poki.com/player-device-report/
Looks like Three.js is dropping WebGL1 support in their next release: https://github.com/mrdoob/three.js/pull/27836
Yep, the timing is ticking here as well .. I suspect we won't have it for too long either.
Looks like Three.js is dropping WebGL1 support in their next release: mrdoob/three.js#27836
Bear in mind that updating three.js version in your project is optional, while with PlayCanvas Editor it will be enforced. This makes significant difference.
The plan to phase out WebGL1 support from the PlayCanvas engine is following:
- Removal from Engine: We'll eliminate WebGL1 support from the engine. Existing engine-only users can choose to use any engine version that still supports WebGL1.
- Editor Compatibility: We'll ensure that the Editor remains compatible in the long term with the final engine version supporting WebGL1. Users who rely on WebGL1 will need to remain on this version. While no new features will be released for this engine version, critical bug fixes can still be backported.
Calling this done. RIP WebGL1.
Wandering how many KB (%) this shaved of engine. And also in relative measure how much easier is rendering implementation now?
@Maksims I would be very surprised if it was >5KB (compressed). It's definitely more interesting from an architectural simplicity point of view.
Yep the size is not that important. But I can implement uniform buffers / refactor materials across the board. This can be a large win. And many other things.