4 ms·
Show HN: WebGPU Particles Simulation
This is a small particles simulation that can run either with WebGPU (GPU Compute) or with the CPU, and it can be changed in real time
- westurner 3y ago"WebGL Water" (2023) https://news.ycombinator.com/item?id=38370118 https://news.ycombinator.com/item?id=38370118 : > Three.js interactive webgl particle wave simulator: https://threejs.org/examples/webgl_points_waves.html https://threejs.org/examples/webgl_points_waves.html > [Curl, Vorticity,] From https://news.ycombinator.com/item?id=31049970 https://news.ycombinator.com/item?id=31049970 re: Deep Learning / CFS: Computational Fluid Dynamics: > google/jax-cfd https://github.com/google/jax-cfd#other-awesome-projects https://github.com/google/jax-cfd#other-awesome-projects lists "Other differentiable CFD codes compatible with deep learning"
- zamadatix 3y agoWebGL Water is from 2010. Interestingly the author went on to make esbuild. Also one of my favorite utilities "diskitude" (just because it's 10 kb, not necessarily because it's the best disk analyzer).
- westurner 3y agoMust've copied the year from the cited HN post. Geiss (1998; now on GitHub) and Smoke (2002) https://www.geisswerks.com/ https://www.geisswerks.com/ Smoke does 2D Navier-Stokes optionally as a wallpaper or a screensaver. There are current mobile apps that work as wallpapers. ProjectM is an open source MilkDrop implementation, which supports input [audio] waveforms for music data visualization; IIRC it's already ported to WebGL but not yet WebGPU. IDK how slow Navier-Stokes or Gross-Pitaevski would be in WASM with WebGL and or WebGPU
- westurner 3y ago"Machine Learning for Fluid Dynamics Playlist" by Steve Brunton https://news.ycombinator.com/item?id=34574514 https://news.ycombinator.com/item?id=34574514
- infinite8s 3y agoThe author (Ean Wallace) also went on to co-found Figma, which was just sold to Adobe for 20B - https://madebyevan.com/ https://madebyevan.com/
- speps 3y agoNot so fast! https://news.ycombinator.com/item?id=38681861 https://news.ycombinator.com/item?id=38681861
- chrisweekly 3y ago"error: WebGPU not supported" iOS 17.1.2, iPhone 13 pro. no option to try cpu instead, just the error message.
- chrisweekly 3y agoI thought Apple came up w/ WebGPU, and also that it had worked on iPhones in the past..? Maybe I misremembered. Caniuse shows it as red /unsupported in iOS, and further searching led me to this huge list of webgl bugs in webkit: https://bugs.webkit.org/buglist.cgi?bug_status=__open__&component=WebGPU&product=WebKit https://bugs.webkit.org/buglist.cgi?bug_status=__open__&comp...
- modeless 3y agoApple made a proposal for WebGPU that was kind of WebMetal with a dialect of HLSL. The final WebGPU standard has little in common and is not supported by Safari yet. My belief is that a big part of Apple's reason for proposing a new standard at all was to force a venue change to W3C instead of Khronos, due to legal disputes they had (maybe still have?) with Nvidia.
- pixelpoet 3y agoApple also created the OpenCL standard; they love nothing more than setting up cross vendor standards to fail. I absolutely hate them for that one in particular.
- pjmlp 3y agoActually the blame lies on Khronos side, alongside Google, Intel and AMD ineptude to do anything of value with OpenCL. For a very long time Apple's platforms were the only ones with a proper OpenCL support, until they gave up and went their own merry way, without Khronos politics.
- pixelpoet 3y ago> For a very long time Apple's platforms were the only ones with a proper OpenCL support I'm curious about this, since I never had a problem with OpenCL on Intel, AMD, Nvidia and am pretty sure I did with Apple in the beginning. Shipping two commercial OpenCL apps since 2010 (and they still work excellently on all of them).
- Uptrenda 3y agoI love these simulations, they're beautiful. Anyone else find that WebGPU is always glitchy for them? I must have tried the tech on countless different laptops now. But there's always problems with it like: latency, tearing, flicking, crashes. Is the tech just very unstable?
- fngjdflmdflg 3y agoIIRC it was delayed multiple times. I think the first intent to ship from chrome was before 100 but they kept pushing it off. Firefox still does not support it. There are projects like wgpu[0] that provide a higher level API for WebGPU and I have used some projects using it with no issues. WFIW I didn't see any issue with OP's demo either. [0] https://github.com/gfx-rs/wgpu https://github.com/gfx-rs/wgpu
- quickthrower2 3y agoSmooth as a baby's bottom for me.
- psincf 3y agoYes it is still a bit new. WebGPU is not finished and is still being worked on: https://webgpu.io/ https://webgpu.io/ And it is supported by very few browser also: https://caniuse.com/webgpu https://caniuse.com/webgpu
- pkstn 3y agoI'm just seeing single frame of white noise (Chrome 120, macOS 14.2, MBP 14" M1 Pro)
- quickthrower2 3y agoClick somewhere in the noise
- abainbridge 3y agoI'm just seeing a white frame - no noise. Clicking on the white frame doesn't help. (Chrome 119, Windows 10, Intel NUC6i3).
- batterylow 3y agoIt doesn't work for me on Safari, macOS, M1: "Error: WebGPU not supported". WebGL pixels works in the same browser, e.g.: https://plotapi.com/docs/visualizations/terminus/#default-visualization https://plotapi.com/docs/visualizations/terminus/#default-vi...
- csjh 3y agowebgpu is only available on chromium atm
- fulafel 3y ago.. on some platforms - not on Android, desktop Linux or iOS.
- psincf 3y agoYeah WebGPU is very new and still not finished. It's apparently not supported by Safari. https://caniuse.com/webgpu https://caniuse.com/webgpu I don't know if it's working on chrome on MacOS ?
- robin_reala 3y agoWebGL[1] is a different spec to WebGPU.[2] [1] https://registry.khronos.org/webgl/specs/latest/2.0/ https://registry.khronos.org/webgl/specs/latest/2.0/ [2] https://www.w3.org/TR/webgpu/ https://www.w3.org/TR/webgpu/
- robin_reala 3y agoHmm. Even with WebGPU enabled in Firefox I get shader compilation errors and nothing on screen. Oh well.
- wkjagt 3y agoFor those just seeing noise: click somewhere in the noise.
- dannyw 3y agoLink in case anyone missed it on the sidebar: https://web-gpu-particles.vercel.app https://web-gpu-particles.vercel.app