I've been playing around with Chrome's experimental HTML-in-Canvas API (I use it to create my videos), and I wanted to see if I could make text-selection work on a curved surface by moving the underlying element around on pointermove. It works pretty well!

Live demo: https://random-stuff.jakearchibald.com/apps/curved-markup/ (needs Chrome Canary with the canvas-draw-element flag.

Source: https://github.com/jakearchibald/random-stuff/blob/main/apps/curved-markup/src/App/index.tsx#L113

Of course, this means you can add shaders https://random-stuff.jakearchibald.com/apps/curved-markup/?vhs (again, Chrome Canary with canvas-draw-element flag)
@jaffathecake Holy shitballs that slider at the bottom is cool! Can you still read pixels from the canvas, or does it get tainted? I've been looking for a way to include html content within webgl/webgpu games for so long.

@Jespertheend in Chrome, you can read the pixels back. It's how I make these videos https://mastodon.social/@firefoxwebdevs/116295985768415581 - it's mostly web content, captured with canvas, and piped to the video encoder API.

However, at Firefox, we're a little unsure about the readback stuff. What's your use-case for that in particular?

@jaffathecake We make a bunch of web games (https://pelicanparty.games/) and every once in a while we want to render some UI within the world as opposed to as an overlay. Right now the only way to do this is using a 2d canvas, but that's pretty painful to work with. Even something as simple as multi line text is very difficult to do without a third party library. Being able to style and layout the UI using regular CSS would be a complete game changer.
@Jespertheend nice! But it sounds like you don't need pixel read-back in this case? The new API lets you use elements inside the canvas element as textures.
@jaffathecake Ohh it was my understanding that you were calling toDataURL() or toBlob() on the canvas and then passing that on to the WebGL side of things. But after checking the source code just now I see you're literally passing the entire canvas element, I forgot that this was a thing you can do.
@Jespertheend well it's only a thing with this experimental feature. But yeah, you can upload any child of the <canvas layoutsubtree> as a texture (or draw it, in 2d canvas)
@jaffathecake Ah I see, well it's very cool regardless!