Masthash

#WebGPU

copygirl
2 days ago

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:

  1. 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.
  2. 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.)

Martin Laxenaire
2 days ago

500k #webgpu particles and I'm barely hearing my fan 😍

Martin Laxenaire
4 days ago

2000 non instanced #webgpu meshes. Not too bad for my poor mid-tier 2018 laptop.

webgpu scene with 2000 non instanced mesh with the stats indicating it's running at ~35fps
absulit
6 days ago

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 😂

#webgpu

absulit
1 week ago

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

webgpu storage added via my library methods
absulit
1 week ago

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

#webgpu #javascript

just a bunch of storage items
David Neto
1 week ago

@tojiro
Get your hashtag #webgpu render bundles sample code and blog post here ^^^

Brandon Jones
1 week ago

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

David Neto
2 weeks ago
Inautilo
2 weeks ago

#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

Sébastien Deleuze
3 weeks ago

"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

ECMAScript News
3 weeks ago
mighdoll
3 weeks ago

Been benchmarking some #WebGPU shaders:

bar chart that shows details of shader timing measurements within each benchmark run and between runs.
absulit
4 weeks ago
Don McCurdy
1 month ago

Is there anything I could read to learn more about practical uses of WebGPU “render bundles” or their equivalent in other graphics APIs?

#webgpu #webgl #gamedev

Brandon Jones
1 month ago

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!

munrocket
1 month ago
Corentin Wallez
1 month ago

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 :)

Martin Laxenaire
1 month ago

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/

Az
1 month ago

@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!

#rust #webgpu #simulation

A thousand circle particles behaving fluid-like, constrained in a circle, sometimes erupting before stabilizing again.
\x1b orhun 👾
1 month ago

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

David Neto
1 month ago

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!

Timo ⚡️
1 month ago

Playing around with mass spring systems.

Of course I had to do it with #rust and #webgpu for peak performance :)

munrocket
1 month ago

galaxy collider #webgpu #shader

Timo ⚡️
2 months ago

It finally works! #webgpu #gaussiansplatting

Martin Laxenaire
2 months ago

Same concept, in the style of a famous #threejs example

#webgpu

Martin Laxenaire
2 months ago

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.

#webgpu

Anisse
2 months ago

Max Ammann is now sharing his experience building Map rendering using WebGPU and WASM.

#EuroRust #EuroRust23 #wasm #webgpu

mighdoll
2 months ago

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.

mighdoll
2 months ago

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.

https://github.com/stoneberry-webgpu/stoneberry/blob/main/packages/stoneberry/src/reduce-texture/ReduceTexture.wgsl

munrocket
2 months ago
David Neto
2 months ago

@tojiro

And an exceptionally good Q&A

#webgpu

Martin Laxenaire
2 months ago

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

Yaryna Nowak
2 months ago

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

https://developer.chrome.com/blog/from-webgl-to-webgpu/

#WebGPU #WebGL #webdev

Corentin Wallez
2 months ago

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!

Jonas
2 months ago

wgpu with indexed, instanced drawing of a quad. Finally feel like I have a more or less complete, minimal boilerplate going. All in just ... 350 lines of Rust! 🥴 Onto z index next, I guess?

#wgpu #rust #webgpu

Michael
2 months ago

@tojiro When do you think webXR will be able to take advantage of #WebGPU? I’ve seen proposed bindings but nothing in terms of the road map.

Chris Biscardi
2 months ago

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.

#rustlang

absulit
2 months ago

As soon as I finish with my current #astrophotography obsession I will continue with #webgpu. Right after the #Eclipse.

#sun #sunspots

Sun photo showing sunspots I took a few days ago.
Timo ⚡️
2 months ago

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

Timo ⚡️
2 months ago

@bleuje Thanks for the cool projects! Here I tried my hand at copying your effect using wgpu with a couple of vertex and fragment shaders and instancing.

#webgpu

A grid where dots rotate as if they were cubes
Jure Triglav
2 months ago

Alright, making a new digital home. Who should I follow around here to get the latest and greatest in #webgl, #webxr, #threejs, #r3f, #webgpu any _anything_ in between?

David Neto
2 months ago

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.

#WebGPU #WebGL

https://developer.chrome.com/blog/from-webgl-to-webgpu/

Michael
2 months ago

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

https://volumetrics.io/careers/

acowley
3 months ago

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.

dana :blobhaj_witch:
3 months ago
David Neto
3 months ago

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.

https://webgpu.github.io/webgpu-samples/samples/worker

munrocket
3 months ago

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

Bernie
3 months ago

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

David Neto
3 months ago

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.

Corentin Wallez
3 months ago

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)

Brianna Townsend
3 months ago

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?

#gamedev #cpp #wasm #sdl #webgpu

Brandon Jones
3 months ago

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.

Brandon Jones
4 months ago

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

Brandon Jones
4 months ago

My colleague François Beaufort just published a good article about building #WebGPU apps targeting native C++ and the web with a single codebase.

https://developer.chrome.com/blog/webgpu-cross-platform/

Axel Rauschmayer
4 months ago

“[…] 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/

Ivan Enderlin 🦀
4 months ago

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.

#map #RustLang #WebGPU #WebAssembly #SwiftLang #kotlin

Demonstration of maplibre-rs rendering a vector map in Firefox.