Comment

Comment by wokwokwok

There is (surprisingly) no high level commentary on what this actually is, but people banging on about how nice it would be to have a high level cross platform GPU accelerated library.

...but this..?

> Graphics data and code can be developed together in the same environment, packaged together into a WebAssembly module called a renderlet, and rendered onto any canvas. With WebAssembly, we compile graphics code to portable bytecode that allows it to safely run on any processor and GPU

So what is a renderlet?

> The renderlet compiler is currently in closed preview - please contact us for more information.

Hm... what this seems to be is a C++ library that lets you take compiled WASM and run it to generate and render graphics.

Which, I think it is fair to say, it's surprising, because you can already render graphics using C++.

Only here, you can render graphics using an external WASM binary.

So, why?

Specifically, if you're already using C++:

1) Why use WASM?

2) Why use renderlet instead of webGPU, which is already a high level cross platform abstraction including shader definitions?

What is this even for?

> wander is designed to be a rendering engine for any high-performance application. It primarily is designed as the runtime to run renderlet bundles

...but, why would I use a renderlet, if I already need to be writing C++?

I. Get. It. A cross platform GPU accelerated rendering library you can use from any platform / browser / app would be great. ...but that is not what this is.

This is a C++ library runtime that you can use to run graphics in any circumstance where you you can currently use C++.

...but, in circumstances where I can use C++, I have many other options for rendering graphics.

Look at the workflow:

    Rendering code -> Renderlet compiler -> renderlet binary
    App -> load renderlet binary -> start renderlet runtime -> execute binary on runtime -> rendered
vs.

    App -> rendering code (WebGPU) -> rendered
or, if you writing a new cross platform API over the top of webGPU

    App -> Fancy api -> WebGPU -> rendered
    
I had a good read of the docs, but I honestly fail to see how this is more useful than just having a C++ library that renders graphics cross platform like SDL.

Shaders? Well, we also already have a good cross platform rendering library in webGPU; it already runs on desktop and browsers (maybe even some mobile devices); it already has a cross platform shader pipeline; it's already usable from C++.

I'm not going to deny the webGPU API is kind of frustrating to use, and the tooling for building WASM binaries is too, but... it does actually exist.

Is this like a 'alternative to webGPU' with a different API / easy mode tooling?

...or, have I missed it completely and there's something more to this?

parent wokwokwok 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton