Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove WebGL1 support #5892

Closed
mvaligursky opened this issue Dec 12, 2023 · 14 comments
Closed

Remove WebGL1 support #5892

mvaligursky opened this issue Dec 12, 2023 · 14 comments
Assignees
Labels
area: graphics Graphics related issue feature request

Comments

@mvaligursky
Copy link
Contributor

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
@mvaligursky mvaligursky self-assigned this Dec 12, 2023
@willeastcott
Copy link
Contributor

@LeXXik
Copy link
Contributor

LeXXik commented Dec 12, 2023

The time has come!
cheerful noises in the background

@Maksims
Copy link
Contributor

Maksims commented Dec 12, 2023

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?

@mvaligursky
Copy link
Contributor Author

mvaligursky commented Jan 19, 2024

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.

@mvaligursky
Copy link
Contributor Author

related: #5957

@erikdubbelboer
Copy link
Contributor

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/

@liamdon
Copy link
Contributor

liamdon commented Mar 1, 2024

Looks like Three.js is dropping WebGL1 support in their next release: mrdoob/three.js#27836

@mvaligursky
Copy link
Contributor Author

Yep, the timing is ticking here as well .. I suspect we won't have it for too long either.

@Maksims
Copy link
Contributor

Maksims commented Mar 1, 2024

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.

@mvaligursky
Copy link
Contributor Author

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.

@mvaligursky
Copy link
Contributor Author

Calling this done. RIP WebGL1.

@Maksims
Copy link
Contributor

Maksims commented May 3, 2024

Wandering how many KB (%) this shaved of engine.
And also in relative measure how much easier is rendering implementation now?

@willeastcott
Copy link
Contributor

@Maksims I would be very surprised if it was >5KB (compressed). It's definitely more interesting from an architectural simplicity point of view.

@mvaligursky
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue feature request
Projects
None yet
Development

No branches or pull requests

6 participants