Open norbert-gaulia opened 2 years ago
Thanks @norbertas-gaulia, this looks really interesting. We'll consider adding CanvasKit WebGPU example to the comparison unless you want to make a PR. 😄
For Webgpu i guess need a bit to wait it's still buggy as hell, but same method will work on webgl2 api just as good, ill try to make PR when i have more time. Btw there is DeckGL fork managing 1M quads which is pretty much the same approach.
latest
canvaskit-wasm ^0.35.0
has a beast webGPU surface and newCanvasKit.RuntimeEffect
by using custom vertices array and a single uniform color it can spin 1M quads of varying size and positions no problem,
Varying color quads (change color every quad) spins 50k-100k comfortably even if you recompile shader every few hundred passes.
It goes something like this:
Not to mention that this way you will have all skia infrastructure along with font manager.
Canvaskit source has a lot of great examples;