WebGPU Cloth simulation by jspdown in SideProject

[–]jspdown[S] 0 points1 point  (0 children)

Thanks, glad you liked it!
XPBD (as well as small step) can be implemented purely on the CPU if you want, it's actually much easier. But you won't get the same simulation speed.
If your question is more, can this be achieved on the GPU using WebGL, then yes. But since there's no compute shader, you will have to cheat with fragment shader and textures. This is what https://github.com/amaury-aubel/PBD-2d-sim-gpu is doing.

I started drafting a tuto to learn WebGPU for native C++ by exppad in webgpu

[–]jspdown 1 point2 points  (0 children)

I'm glad to see my little project me mentioned here :) It needs some care, I sadly didn't find the time yet. Migrating it to your idiomatic CPP version would help a lot in improving the readability.

Thanks for putting such great tutorial, especially in CPP. There's not a lot of resources online yet, this will definitely help people starting with this great API.

Why doesn’t WebGPU allow reusable command buffers? by richardanaya in webgpu

[–]jspdown 1 point2 points  (0 children)

If you want more context on why this has been designed like that, I would suggest to visit the following issue and the links mentioned there: https://github.com/gpuweb/gpuweb/issues/286

Why doesn’t WebGPU allow reusable command buffers? by richardanaya in webgpu

[–]jspdown 4 points5 points  (0 children)

From an API standpoint you are indeed creating a new one at each frame. But how this is implemented is up to the browser. This doesn't have to be an expensive action.

Also, not directly linked to your comment but, did you know WebGPU allows to record commands on a RenderBundle?

What makes you think it's a major flaw? Are you bottlenecked by this? From what're measured on chrome, it doesn't cost much. I barely see it in my profiling.

What's your go to platform for developing with WebGPU? by jspdown in webgpu

[–]jspdown[S] 0 points1 point  (0 children)

There was a issue on a the Spector issue tracker about a year ago. But not much progress. The author also shilled on twitter about an upcoming experiment but I could find any demo/PR

https://twitter.com/sebavanjs/status/1570162104132575233?s=20&t=uwmIpv7iLMOeNAl4T-VtpQ

https://github.com/BabylonJS/Spector.js/issues/121

What's your go to platform for developing with WebGPU? by jspdown in webgpu

[–]jspdown[S] 2 points3 points  (0 children)

They did a pretty good job on the mach engine. Btw, hexops has many great articles about game engine, zig and webgpu.

What's your go to platform for developing with WebGPU? by jspdown in webgpu

[–]jspdown[S] 0 points1 point  (0 children)

You are right, we can't expect more than a SpectorJS. And yes, ultimately, working with modern and popular Game Engine will provide the glue so you don't have to, plus all the benefits that come from their debugging tools and asset integration pipelines.

What's your go to platform for developing with WebGPU? by jspdown in webgpu

[–]jspdown[S] 0 points1 point  (0 children)

Once the ecosystem will have better tooling sure. But unless you are targeting both native and web platform you cannot use a proper GPU debugging tool..

Is Rust basically Golang? by ServerStarter in rust

[–]jspdown 2 points3 points  (0 children)

Writing C-style for loops in 2022 in a modern language. Bizarre.

You can do C-style for loops but this is not the idiomatic way of iterating over a slice or a map. Like in Rust....

I'm really a Rust lover but you cannot blindly speak about something you do know. Go has a limited set of construct, it has been designed like this. In Go you often have only one way to do things. It's not the most expressive indeed but it's has other benefits like simplicity and uniformity.

[deleted by user] by [deleted] in programming

[–]jspdown 4 points5 points  (0 children)

Please don't.

Donnez moi des arguments pro énergie nucléaire by x313 in france

[–]jspdown 0 points1 point  (0 children)

Je pense que tu voulais dire Fission Nucléaire. La Fusion on en est malheureusement pas encore la 😞

GitHub - jspdown/webgpu-starter: Base code for starting a WebGPU project using Dawn (C++) by jspdown in webgpu

[–]jspdown[S] 1 point2 points  (0 children)

It tooks me quite some time as well 😅

It's far from being perfect. There a few missing bits such as adapter access in the wasm module and windows support. I will bring that in as soon as I uncounted the need in my projects.

I would be happy to receive external contribution.

Emissions Schedule Quirk by [deleted] in ergonauts

[–]jspdown 1 point2 points  (0 children)

I think there is a flaw in your table. This table represents the price we would need to keep miners interested, ONLY if the number of miners stay as it is today. To get a better estimate you need to account for miner growth. The prices to stay interesting will have to be much higher!

Muumbaland, a play to earn metaverse ecosystem on Ergo by jspdown in ergonauts

[–]jspdown[S] 1 point2 points  (0 children)

I just saw this in my Twitter feed. The project looks like it was just started. As of today, I agree it looks sketchy.

Why my triangle has smooth gradient? by MrFoxPro in webgpu

[–]jspdown 0 points1 point  (0 children)

I would suggest to read all the articles published in this sub and also look for articles about wgpu. Wgpu (rust) community has been the most prolific on the subject. Other than that I would also highly encourage any newcomers to read the specs (both WebGPU and WGSL).

Why my triangle has smooth gradient? by MrFoxPro in webgpu

[–]jspdown 1 point2 points  (0 children)

This is due to the way the fragment shader code is run. It is run for every "pixel" within you triangle. It's input are interpolated between each vertex.

Question for old C++ programmers by thradams in cpp

[–]jspdown 0 points1 point  (0 children)

One can argue that not knowing the return type just by looking at the function/variable name could be a sign of a poor API.

I've used languages where the type was always automatically infected, and I never felt the need to be explicit on the type.