tetrio / issues

Report issues and discuss improvements / feature requests around TETR.IO
https://tetr.io
386 stars 21 forks source link

Support WebGPU #837

Open PeterNjeim opened 2 years ago

PeterNjeim commented 2 years ago

Checklist

Is your feature request related to a problem? Please describe.

It is not a problem I face, but for those with lower-end GPU's, it will (not could, will) help them, or if you desire adding high-end graphics effects, it will help that as well. WebGPU is remarkably faster than WebGL 2, and is under active development. It can be enabled in Canary Chromium browsers (Edge and Chrome will work), Safari technology preview, and nightly Firefox in the browser flags. Obviously no one other than those who enable the flag in a nightly browser build can use this feature for the time being, but it is indeed the future of browser graphics, and so supporting it early wouldn't hurt (unless the API changes before launch lol).

Describe the solution you'd like

Implement WebGPU instead of WebGL 2.

Describe alternatives you've considered

N/A

Additional context

WebGPU, contrary to its name, can also work off the web, and so you could ditch the Electron version and run it at a lower level, unlocking even more performance.

wooster0 commented 2 years ago

I believe Tetrio depends on PixiJS for its graphics backends so it will probably have to wait for PixiJS to support WebGPU. Related: https://github.com/pixijs/pixijs/search?q=webgpu&type=discussions

PeterNjeim commented 4 months ago

PixiJS v8 is going to support WebGPU: https://pixijs.com/blog/pixi-v8-beta