Live data from Hacker News

WebGPU-Based WiFi Simulator

wifi-solver.com

21–30 of 95 posts

Re: WebGPU-Based WiFi Simulator

#21
post #3

It's so frustrating that WebGPU support was released 1.5 years ago on Chrome, and yet is still unavailable on all other browsers. This is a real killer feature that will dramatically slow adoption of non-Chromium browsers, even with Google defanging ad blockers.

WebGL 2 took almost 5 years to come to Safari after Chrome. It will not take as long for WebGPU; development is active now.

It is also a bit frustrating that Chrome has not enabled WebGPU on all platforms by default yet.

Re: WebGPU-Based WiFi Simulator

#22

Earlier quoted context omitted.

Good question! This is actually a numerical solver for a few coupled partial differential equations - the method in this context (electromagnetism) is called FDTD. It's implemented as a WebGPU compute shader. You absolutely could do this using WebGL2 compute shaders too, but I thought it would be fun to try this newer API.

Annoyingly WebGL2 doesn't have compute shaders even though GLES3.x that it is based on does.

[deleted]

Re: WebGPU-Based WiFi Simulator

#24
Bugs:

#1 if you spam the "add a new source" button you eventually get a JavaScript exception logged to the screen due to an array with a fixed max size of 128 elements overflowing.

#2 this could be graphics card or driver specific (I have an AMD card), but scrolling just right can can break the simulation due the the text boxes; for example by quickly paging up and down, or scrolling all the way to the bottom and then wiggling the scroll position up and down. Once this happens the bad data propagates until the entire thing is filled with noise, solid black, or solid white. If you then scroll up to 3D mode the screen will be filled with a mess of polygons.

Re: WebGPU-Based WiFi Simulator

#26
post #12

Earlier quoted context omitted.

Why do you need webgpu? It's unfortunate that people use technology that is "state-of-the-art techniques to run simulations at interactive speeds" without fully understanding what it's for. General compute on GPU is what webgpu is for.. To simulate basic waves like in this demo you absolutely do not need that, in fact it's an indication the author implemented the solution in a non-optimal way. WebGL is fully supporte…

Good question! This is actually a numerical solver for a few coupled partial differential equations - the method in this context (electromagnetism) is called FDTD. It's implemented as a WebGPU compute shader. You absolutely could do this using WebGL2 compute shaders too, but I thought it would be fun to try this newer API.

I don't understand what other type of solution is there to render on a gpu other than a numeric one?

Here is a very basic shader for what you want:

  float freq1 = 2.0;
  float freq2 = 3.0;
  float amp = 0.5;

  pos.z += sin(pos.x * freq1 + uTime) * amp;
  pos.z += cos(pos.y * freq2 + uTime) * amp;

  gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);

Re: WebGPU-Based WiFi Simulator

#28
Cool visualization but it focuses so much on the ``'-.,_,.-'`waves`'-.,_,.='`` and not on the actual coverage pattern of 6-12.5cm waves, so not as actually useful for showing coverage as other tools, but fun as an art project.

And of course, I can't mention that without shouting out projectM (open-source Milkdrop) that supports WebGL https://github.com/projectM-visualizer/projectm/blob/master/... and one of the OGs, Geisswerks https://www.geisswerks.com/

If you like that, you might also love NestDrop for music visualization tailored for VJs and with special features to support projecting inside domed surfaces https://nestimmersion.ca/nestdrop.php

Re: WebGPU-Based WiFi Simulator

#29
post #17

Earlier quoted context omitted.

Runs great on my ChromeBook.

ChromeOS is not a Linux distribution, change my mind.

ChromeOS is a Linux kernel with some software bundled on top to make a usable system; it is by definition a Linux distro. Curiously, it's even a GNU/Linux distro, as it uses glibc and GNU coreutils, unlike ex Android which is a non-GNU distro.

I will grant that it's a slightly odd distro, but is it any weirder than NixOS or Fedora Silverblue?

Re: WebGPU-Based WiFi Simulator

#30
When I run the Waveguide Simulator demo on my Alienware M15 Ryzen Ed. R5 (has a RTX 3070; Windows 11 Pro, Chrome v129), I hear a distinct high pitched flutter noise emanating from my laptop. I thought it was from the speakers, but no, with my volume down it was still present as long as the simulator was playing. Weird, but very cool demo (probably my hardware, never hear this during games or other WebGPU demos). The realistic house simulation yields a different signature in the sound.
Post reply on HN