shadow icon indicating copy to clipboard operation
shadow copied to clipboard

WebGPU rendering backend

Open CanadaHonk opened this issue 2 years ago • 5 comments

This would be interesting. I have no idea how to webgpu, if you are reading this and know and want to help reply?

CanadaHonk avatar Oct 27 '23 22:10 CanadaHonk

i kinda know some webgpu (i did some stuff in rust) but i also know some vulkan stuff and graphics in general this would be super interesting indeed

im not sure how other browsers do rendering though. do they have a fragment shader for css's linear-gradient or something? do they just render quads with textures generated on the cpu? compute? no idea

maybe someone more knowledgeable about this than me can reply and clarify this stuff :)

monomere avatar Oct 30 '23 22:10 monomere

Interesting post about rendering UIs: https://zed.dev/blog/videogame

coinconclusive avatar Oct 31 '23 13:10 coinconclusive

We could basically reimplement the canvas 2d API via webgpu (any gain from this?) or create our own API using a render queue/etc?

CanadaHonk avatar Oct 31 '23 13:10 CanadaHonk

i dont think reimplementing the canvas api would give any gains, it might even be slower.

a completely custom renderer is the way to go i think. i'll take a look at how ff does it today probably.

coinconclusive avatar Nov 02 '23 05:11 coinconclusive

servo's webrender looks promising, although it looks like its using opengl instead of wpgu, but that shouldn't be much of a problem. im going to try to understand how it works in the next couple of days.

coinconclusive avatar Nov 02 '23 22:11 coinconclusive