#WebGPU
I’ve been working on a proof-of-concept in #Rust to check if my dream #GameEngine is feasible for me to put together. You know, the one that’s supposed to support multiplayer runtime modding of the game you’re playing?
I mean, ideally, I’d get some help and input, because I’m really not that experienced in the end.
Putting together a document of “here’s what I want to achieve and what I feel like are open questions” to get people interested is really not my strong part, so the PoC is currently my way of pushing my ideas forward.
For now I decided using #Zig as the scripting language running in a #Wasmtime powered sandbox, for two reasons:
- There’s a good chance the compiler itself will be able to run in the #WASM sandbox itself in the future. Which I feel like will be important.
- Its meta-programming really helps with writing a clean API where some heavy-lifting is done by the compiler. Such as analyzing the script file and deciding whether to register a component and/or system for a particular script entity.
I feel like it would be nice to compile this for the web too. #WebGPU sounds interesting, gotta look into it more. Imagine inviting friends to games by just linking them to a web page?
I’m not sure if there’s a lot to share yet, but you could go over to @copygirl to check screenshots. (Or heck, even catch one of my streams.)
2000 non instanced #webgpu meshes. Not too bad for my poor mid-tier 2018 laptop.

Since I think I reached the point where I can no longer manually calculate my struct/uniforms, I decided to try incorporate
@greggman's webgpu-utils into my code because why not but after checking out his code and other dependencies (WgslReflect) the code is 3560 of extra lines, while my library is around 1682.
I honestly thought this would just be like a couple of functions and not a behemoth 😂
I've already made a change that as always, it means it breaks every example and I have to fix them all. This after I decided to not use a branch that had a lot of changes related to uniforms that I made months ago. My uniforms are f32 only and I want to make them work with more data types, but I can't recall anything, so I have to review the storage creation process to understand what's going on.
#webgpu #javascript

Trying to remember what I've done in my library after 3 months is like looking at someone else's code 🙂 🦈

Happy (US) Thanksgiving, y'all! I prepared a tasty article all about using #WebGPU Render Bundles, just for you! https://toji.dev/webgpu-best-practices/render-bundles
Heyo, Unity has added early access to a WebGPU backend.
https://forum.unity.com/threads/early-access-to-the-new-webgpu-backend-in-unity-2023-3.1516621/
#Development #Showcases
The web can do what!? · A showcase of the incredible capabilities of the modern web https://ilo.im/15ha8z
_____
#WebDev #WebPerf #WebTechnologies #PassKeys #WebAssembly #WebGPU #API #Frontend #HTML #CSS #JavaScript
"However, WebGPU transcends the boundaries of a mere JavaScript API; it is a fundamental building block akin to WebAssembly" https://developer.chrome.com/blog/webgpu-ecosystem/ #webassembly #webgpu
WebGPU: ecosystem that extends beyond JavaScript
@DaKangz
https://developer.chrome.com/blog/webgpu-ecosystem/
Mandelbrot in #WebGPU
from an old demo made in the previous version of my library, I just ported it to WebGPU. Actually a very easy port.
#generativeart #creativecoding #genart #webgl
#abstract #abstractart #digitalart #vaporwave #vaporwaveart
#animation #80s #90s #math #mathart #javascript #surrealism #surrealart
#shader #glsl #p5js #processing
#wgsl #computeshader #cgi #mandelbrot #fractal

I think for next year I want to try setting up a realtime render version of the same effect (#WebGPU, naturally!) So that I can puppeteer them. I saw several little kids trying to talk to the pumpkins this year, and it would be a lot of fun if they could talk back!
Trying to get back to the #webgpu grind after a long time
#generativeart #creativecoding #genart #abstract #abstractart #digitalart #animation #mograph #motiongraphics #math #mathart #javascript #shader #glsl #loop #wgsl #computeshader

#webgpu strange attractors https://compute.toys/view/537
Here are the release notes for #WebGPU in Chromium 119: https://developer.chrome.com/blog/new-in-webgpu-119/
Filterable 32-bit float textures, unorm10-10-10-2 vertex format, and rgb10a2uint texture format and more! We have a much awaited extension that starts with an f and ends with a 16 in the next release :)
This was on my todo list for soooo long, I'm super excited to finally have a working #webgpu cloth simulation.
Running fully on the GPU thanks to compute passes.
(this is a port of
@Yuu6883
awesome example: https://github.com/Yuu6883/WebGPUDemo)

I'm currently experimenting with #webgpu and found this reference quite helpful: https://webgpu.rocks/
@sebastianlague latest video made me want to try his spatial grid algorithm. I've been wanting to try gpu-based spatial partitioning for quite a while and Sebastian's explanations are really nice to follow and wrap one's head around the concept.
But first, particles!

New version of **rio terminal** supports Alacritty's Vi mode! 🚀
🦀 A hardware-accelerated GPU terminal emulator powered by WebGPU. (written in Rust)
⭐ GitHub: https://github.com/raphamorim/rio
📚 Docs: https://raphamorim.io/rio/docs/features/alacritty-vi-mode/
#rustlang #terminal #commandline #alacritty #gpu #webgpu #vim
Chrome M120 (stable in late November) will turn on 'shader-f16' by default in #WebGPU, for hardware that supports it.
This includes all macOS and many Windows devices.
This was a great collaboration with the rest our WebGPU partners at W3C and particularly Intel, who championed its standardization, implementation, and conformance-test-writing.
W00t!

Working on adding all kind of examples to my incoming wip gpu-curtains lib.
This one is demonstrating the use of custom instanced geometries & attributes.

Max Ammann is now sharing his experience building Map rendering using WebGPU and WASM.
Having a benchmark sure seems key for #WebGPU work.
I was surprised when seemingly trivial wgsl changes caused things to slow down by 15%.. not sure why. But at least the benchmark caught it.
Tweaked the #WebGPU reduceTexture shader a bit.
It takes less than 1ms to find the maximum value for an 8K/8K image. So, fast enough that you can feel free to use min/max color as part of your video processing algorithm.
This doesn't look like much, but it took me quite some time to achieve. #webgpu compute pass + mesh instancing.
All done with my work in progress gpu-curtains lib.
Based on https://webgpu.github.io/webgpu-samples/samples/computeBoids by
@tojiro
François Beaufort discusses the transition from WebGL to WebGPU, highlighting key differences between the two technologies, including state management, asynchronous operations, the introduction of compute shaders, video frame processing capabilities, and more
Here are the release notes for #WebGPU in Chromium 118: https://developer.chrome.com/blog/new-in-webgpu-118/
We have easier uploads of ImageData and HTMLImageElement to textures, experimental support for the long awaited read-write storage textures, a DawnInfo program, and the usual slew of improvements and bugfixes!

I built a demo in #bevyengine . With all features enabled (the default) it came out to 30mb.With some light work it came down to 7mb. (wasm-bindgen, wasm-opt, some flags, only 2d-related features).
By comparison, wgpu starts out at 5.5mb and I can get down to 2mb with #webgl or 260kb with #webgpu only.
I'm looking to build some demos for blog posts, and its looking like webgpu-only wgpu is the best size-route forward.
As soon as I finish with my current #astrophotography obsession I will continue with #webgpu. Right after the #Eclipse.

I decided to post more of my personal projects on Mastodon. I really like working with computer graphics and #webgpu, so here's a program for plotting manifolds I made last year. I compiled it to wasm, so you can try it out yourself on https://plotf.xyz
Heyo, new blog post "From WebGL to WebGPU".
It highlights key differences between the to web graphics APIs. It's meant to give a flavour. I found it interesting. Take a look.
Hey folks! we’re hiring!
We’re an early stage startup working to build the #spatailweb
We understand that this is a new space, so we encourage everyone to apply regardless of #xr experience. We want a strong engineer first, XR experience is just a plus.
#hiring #jobs #webdevelopment #gamedevelopment #webxr #webgpu #webgl #spatailcomputing #mixedreality #virtualreality #extendedreality #AR #VR #MR #XR #web
Kind of perplexing how Apple has treated #WebGPU. To have it in Safari Technology Preview and then pull it without replacement for quite some time now both makes forward looking development harder, and sends a pretty negative signal regarding future availability.
Servo’s got #WebGPU working and some demos running now.
https://servo.org/blog/2023/09/15/upcoming-events-and-new-browser-ui/
FYI. The #WebGPU samples have been growing.
Yesterday a camera-control sample was added https://webgpu.github.io/webgpu-samples/samples/cameras
And before that an example showing how to use a web worker to render but then display the canvas on the main thread.
I am updated wgsl grammar, implemented shader removing, implemented alert for unsaved shader and jump to entrypoint in https://compute.toys. New DX become much better, waiting for merge ✨#webgpu #wgsl
vtebench results for #Konsole (left), #Wezterm (center) and #Alacritty (right).
All three were running full-screen and configured to use the same font and approximately the same point size (11.0).
Wezterm was built from sources using "cargo build --release". The other two are distro binaries from #Fedora Rawhide.
Note that Wezterm (the slowest of the three) has a gradient background). It's also a git snapshot that recently switched its default rendering backend to #WebGPU.
Really inspiring #WebGPU video by friend of my channel
Visionary 3D - Nice one Arya!
https://www.youtube.com/watch?v=YinfynTz77s
My team started looking at subgroup support for #WebGPU again. We pushed it out of the initial #WGSL feature set due to our staffing load and suspected non portability. Revisiting it now.
Sadly, and frustratingly, implementations don't do what programmers think should happen. We are seeing very very nonportable behavior.
Still collecting data across devices and platforms that we will share soon enough.
Here are the release notes for #WebGPU in Chromium 117: https://developer.chrome.com/en/blog/new-in-webgpu-117/
Standing out among the small features and fixes are a fix for the caching of pipeline with implicit layouts so that pages using them should now start much quicker! (after the first load)
Thnking about the list of things needed to get my game running on linux, it's a very short list and would probably just about work out of the box.
This got me thinking about WASM though... I think SDL2 can be compiled with Emscripten and ImGui has an experimental WebGPU backend already working. Might just work??
Anyone had any experience getting an OpenGL/SDL2 C++ app running in a browser?
Had some fun re-visiting an old #WebGL project over the weekend and updating it to #WebGPU (with some improvements).
Not sure if I'm going to take it any further, but I find it's therapeutic to take some small chunk of older code and redo it with all the accumulated tooling and experience you've gained since.
Added a page to the #WebGPU samples demonstrating use in a web worker. (Spoiler alert: It's basically the same as WebGPU on the main thread, with a couple of extra postMessage() calls) https://webgpu.github.io/webgpu-samples/samples/worker
My colleague François Beaufort just published a good article about building #WebGPU apps targeting native C++ and the web with a single codebase.
“[…] some [of its creators] realized that #WebGPU could be more than a JavaScript API but a cross-platform graphics API that could be used by developers across ecosystems other than the web.”
https://developer.chrome.com/en/blog/webgpu-cross-platform/
maplibre-rs, https://github.com/maplibre/maplibre-rs.
maplibre-rs is a portable and performant vector maps renderer, which aims to support Web, mobile and desktop applications. It is written in Rust, and uses WebGPU.
An academic paper has been published, https://isprs-archives.copernicus.org/articles/XLVIII-4-W1-2022/35/2022/ _maplibre-rs: toward portable map renderers_.
It targets the Web via WebAssembly, and other platforms via FFI. Rust is used as a Lingua-franka on all platforms.