Discuss Scratch
- ajskateboarder
-
1000+ posts
Migrate to WebGPU
TL;DR for the non-tech-savvy: Scratch does not support rendering things with modern GPU interfaces*, so using WebGPU will let Scratch leverage modern GPU interfaces, such as DirectX 12+
WebGPU is a newly announced graphics interface that can outperform WebGL 1 - the technology scratch-vm uses - by a wide margin.
This is possible due to WebGPU being able to access the GPU directly with modern APIs like DirectX 12 to run graphic computations, as compared to WebGL which is just a wrapper around a single graphics layer with no specific optimizations. As a result, Scratch may experience a massive performance boost in intensive things like raycasting while using WebGPU
Some current issues (which might resolve over time):
To solve possible compatibility issues, here's a good test:
WebGPU is a newly announced graphics interface that can outperform WebGL 1 - the technology scratch-vm uses - by a wide margin.
This is possible due to WebGPU being able to access the GPU directly with modern APIs like DirectX 12 to run graphic computations, as compared to WebGL which is just a wrapper around a single graphics layer with no specific optimizations. As a result, Scratch may experience a massive performance boost in intensive things like raycasting while using WebGPU
Some current issues (which might resolve over time):
- Only supported by desktop browsers
- Breaks compatibility with considerably old mobile/desktop GPUs (WebGL could be used as a fallback until such GPUs are truly dead)
To solve possible compatibility issues, here's a good test:
My solution to that is to make a browser test to see if the client browser can support WebGPU; if not, then test if it can support WebGL 2, and if not that, then test it for WebGL 1 support. If all of the tests fail, then that browser can't run Scratch at all.
Last edited by ajskateboarder (April 16, 2024 20:59:55)
- cs3868895
-
1000+ posts
Migrate to WebGPU
Will that lead to Scratch idk, 3.5-ish?
Probably idk 3.01?
Idk but that has to be in maintenance for a long time.
Probably idk 3.01?
Idk but that has to be in maintenance for a long time.
- ajskateboarder
-
1000+ posts
Migrate to WebGPU
Will that lead to Scratch idk, 3.5-ish?Goodness god, three IDKs?
Probably idk 3.01?
Idk but that has to be in maintenance for a long time.
I think Scratch would schedule this for version 4.0 development
Last edited by ajskateboarder (May 17, 2023 21:25:41)
- cs3868895
-
1000+ posts
Migrate to WebGPU
3.0 isn't even out yet LolWill that lead to Scratch idk, 3.5-ish?Goodness god, three IDKs?
Probably idk 3.01?
Idk but that has to be in maintenance for a long time.
I think Scratch would schedule this for version 4.0 development
- PaperMarioFan2022
-
1000+ posts
Migrate to WebGPU
3.0 isn't even out yet LolWill that lead to Scratch idk, 3.5-ish?Goodness god, three IDKs?
Probably idk 3.01?
Idk but that has to be in maintenance for a long time.
I think Scratch would schedule this for version 4.0 development
Well, not technically lol, ST we’re behind schedule with 3.0 since Adobe Flash died out.
- -Valtren-
-
1000+ posts
Migrate to WebGPU
Support, I often work with GPU intensive projects. And if this was implemented, it would likely be cause for 4.0.
- -ElectronicArts-
-
1000+ posts
Migrate to WebGPU
Very cool! it can perform better and drastically for projects.
- OhOkSir12345
-
1000+ posts
Migrate to WebGPU
support because of the reasons above however there could be a new bug called your web browser does not support WebGPU (unlikely) but still
- -ElectronicArts-
-
1000+ posts
Migrate to WebGPU
Yeah it probably will be some problems with webgpu on older browsers.
https://caniuse.com/webgpu
https://caniuse.com/webgpu
- IceCreamTub
-
1000+ posts
Migrate to WebGPU
HeII yeah! Support!
Due to the reasons the OP has already stated
Due to the reasons the OP has already stated
- Vadik1
-
500+ posts
Migrate to WebGPU
This is wrong. WebGPU will only be supported on modern GPUs. … WebGPU also supports more GPUs, …



WebGL 1 is very basic and limited in terms of what it can do and how it can do it, and as a result it can run on almost anything. Scratch is still using WebGL 1 for compatibility reasons, despite WebGL 2 also being widely supported and having new features that could speed up rendering. WebGPU will have higher GPU minimum specs and feature requirements than even WebGL 2.
- ajskateboarder
-
1000+ posts
Migrate to WebGPU
I meant to say WebGPU will provide better support for newer GPUs, as outlined by current documentation.This is wrong. WebGPU will only be supported on modern GPUs. … WebGPU also supports more GPUs, …
WebGL 1 is very basic and limited in terms of what it can do and how it can do it, and as a result it can run on almost anything. Scratch is still using WebGL 1 for compatibility reasons, despite WebGL 2 also being widely supported and having new features that could speed up rendering. WebGPU will have higher GPU minimum specs and feature requirements than even WebGL 2.That's why I suggested this as a future priority, for when such GPUs become deprecated. Thanks for informing me though, I'll put this in the OP
- me_on_a_gopro
-
36 posts
Migrate to WebGPU
No support, not everyone has a gpu, https://www.youtube.com/watch?v=oca_eiI9VnA
- ajskateboarder
-
1000+ posts
Migrate to WebGPU
https://www.youtube.com/watch?v=oca_eiI9VnAYou need a GPU to access Scratch already. Plus, there are different types of graphic rendering: No support, not everyone has a gpu,
- Using a CPU
- Integrated GPUs
- Discrete GPUs
Last edited by ajskateboarder (May 20, 2023 16:04:05)