3D + 2D:测试我的跨平台 WASM 图形引擎
3D + 2D: Testing out my cross-platform WASM graphics engine

原始链接: https://news.ycombinator.com/item?id=39907845

一位软件工程师曾在 Adob​​e 工作,管理 Photoshop 和 Acrobat 等应用程序的复杂代码库。 他们的主要挑战是在不进行大量重写的情况下使这些代码适用于桌面、网络、移动设备和云。 他们尝试了 JavaScript、Google 的 PNaCl、asm.js 等技术,并最终尝试了 Web 版本的 WebAssembly,并相应地调整了 GPU 架构。 尽管今天取得了成功,但它需要十年的历程。 意识到 WebAssembly 的潜力后,他们离开 Adob​​e 创建“Renderlet”,这是一个可移植、可嵌入的基于 WebAssembly 的图形框架。 Renderlet 以易用性和高效性而闻名,它允许独立的图形模块和跨平台的无缝集成。 尽管尚未公开发布,但进展包括实现 WebAssembly 以支持流行的 2D 矢量 Rive 渲染器,从而扩展了框架的多功能性。

一名软件工程师曾在 Adob​​e 工作,负责管理 Photoshop 和 Acrobat 等应用程序背后的复杂代码库。 他们面临的挑战是在不进行大量重写的情况下使它们适应各种平台,包括桌面、网站、移动设备和云。 他们使用 JavaScript、Google 的 PNaCl、asm.js 等技术,以及最终使用用于浏览器图形处理的 WebAssembly 等技术,走过了多种路径。 这段旅程持续了十年,最终以出色的网络构建成果告终。 然而,这位工程师认为 WebAssembly 是解决图形瓶颈问题的关键。 受到这一发现的启发,他们辞去工作,创建了“Renderlet”,这是一个基于 WebAssembly 的可移植、可嵌入的图形框架。 目标是为开发人员提供高级工具来生成所需的图形并有效利用 GPU 来实现卓越的性能。 尽管仍在开发中,Renderlet 已经使用其 GPU 后端集成了 Rive 的 2D 矢量引擎,使任何 3D 应用程序都能够合并 2D 矢量后端。 请密切关注 Renderlet 的未来更新。
相关文章

原文
I used to work at Adobe on the infrastructure powering big applications like Photoshop and Acrobat. One of our worst headaches was making these really powerful codebases work on desktop, web, mobile, and the cloud without having to completely rewrite them. For example, to get Lightroom and Photoshop working on the web we took a winding path through JavaScript, Google’s PNaCl, asm.js, and finally WebAssembly, all while having to rethink our GPU architecture around these devices. We even had to get single-threaded builds working and rebuild the UI around Web Components. Today the web builds work great, but it was a decade-long journey to get there!

The graphics stack continues to be one of the biggest bottlenecks in portability. One day I realized that WebAssembly (Wasm) actually held the solution to the madness. It’s runnable anywhere, embeddable into anything, and performant enough for real-time graphics. So I quit my job and dove into the adventure of creating a portable, embeddable WASM-based graphics framework from the ground up: high-level enough for app developers to easily make whatever graphics they want, and low-level enough to take full advantage of the GPU and everything else needed for a high-performance application.

I call it Renderlet to emphasize the embeddable aspect — you can make self-contained graphics modules that do just what you want, connect them together, and make them run on anything or in anything with trivial interop.

If you think of how Unity made it easy for devs to build cross-platform games, the idea is to do the same thing for all visual applications.

Somewhere along the way I got into YC as a solo founder (!) but mostly I’ve been heads-down building this thing for the last 6 months. It’s not quite ready for an open alpha release, but it’s close—close enough that I’m ready to write about it, show it off, and start getting feedback. This is the thing I dreamed of as an application developer, and I want to know what you think!

When Rive open-sourced their 2D vector engine and made a splash on HN a couple weeks ago (https://news.ycombinator.com/item?id=39766893), I was intrigued. Rive’s renderer is built as a higher-level 2D API similar to SVG, whereas the Wander renderer (the open-source runtime part of Renderlet) exposes a lower-level 3D API over the GPU. Could Renderlet use its GPU backend to run the Rive Renderer library, enabling any 3D app to have a 2D vector backend? Yes it can - I implemented it!

You can see it working here: https://vimeo.com/929416955 and there’s a deep technical dive here: https://github.com/renderlet/wander/wiki/Using-renderlet-wit.... The code for my runtime Wasm Renderer (a.k.a. Wander) is here: https://github.com/renderlet/wander.

I’ll come back and do a proper Show HN or Launch HN when the compiler is ready for anyone to use and I have the integration working on all platforms, but I hope this is interesting enough to take a look at now. I want to hear what you think of this!

联系我们 contact @ memedata.com