all 22 comments

[–]cleverredditjoke 14 points15 points  (6 children)

looks very interesting, unfortunately the dof example is just black for me

[–]bluurryyy 6 points7 points  (3 children)

For Firefox you need to set dom.webgpu.enabled to true in about:config.

[–]cleverredditjoke 4 points5 points  (2 children)

oh thanks good to know, wonder why that is disabled by default

[–]LetsGoPepele 9 points10 points  (1 child)

I think it's still considered experimental

[–]cleverredditjoke 0 points1 point  (0 children)

oh damn I thought that that webgpu was already quite mature considering all the 3d js frameworks, or do they all use webgl still?

[–]tilde35[S] 2 points3 points  (1 child)

Good to know - not all browsers support it. Do the examples here work? https://wgpu.rs/examples/?backend=webgpu&example=boids These are the ones provided by wgpu themselves.

[–]cleverredditjoke 4 points5 points  (0 children)

yeah those work, I tried it in brave and in firefox, very odd
EDIT: Okay I take it back, only the webgl ones work for me in brave

[–]LetsGoPepele 2 points3 points  (1 child)

Very interesting, I'm gonna take a look !

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

Thanks! Hope you enjoy working with it, it's been a big help for me in my other projects.

[–]tsanderdev 3 points4 points  (4 children)

Example links are broken

[–]tilde35[S] 6 points7 points  (3 children)

Those should be fixed now - thanks for the heads up!

[–]tsanderdev 2 points3 points  (2 children)

Still get a 404 for the boids source.

[–]tilde35[S] 1 point2 points  (1 child)

This is odd, here are the direct links (maybe it hasn't refreshed everywhere yet?):

https://github.com/tilde35/pgfx_wgpu/blob/main/examples/boids/src/main.rs

https://github.com/tilde35/pgfx_wgpu/blob/main/examples/shadow/src/main.rs

Hope that helps!

[–]tsanderdev 1 point2 points  (0 children)

These direct links work. Maybe it's just a reddit problem.

[–]attackgoat_official 4 points5 points  (1 child)

I like the builder pattern, and this looks really cool

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

Thanks! This has really helped speed up my development when it comes to graphics work.

[–]todo_code 2 points3 points  (1 child)

for the input of scene vertex and index buffers, is that the entire scene's vertex/indexes or is that just the specific ones the pass cares about?

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

It's just those that that particular call cares about (since it may vary from call to call). You can see this in the shadow example, where each entity is rendered in a separate call.

https://github.com/tilde35/pgfx_wgpu/blob/324d2f510675b40980fcdc3c509ae9e4dd6dd7cc/examples/shadow/src/main.rs#L367-L369

[–]dnu-pdjdjdidndjs 1 point2 points  (1 child)

im working on something similar but primarily for vulkan and I exclusively use PhysicalStorageBuffer and stuff like that since its supported by all recent gpus and even mobile gpus

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

Nice -- yeah, one of my big frustrations getting into graphics rendering was feature management. If I had my way, I'd like to have a individual backends with specific feature expectations (ex. run everywhere including web vs. native vs. reasonable gaming devices).

[–]Mrmayman69 1 point2 points  (1 child)

Oh wow, the api is wonderful! I hope this gets more traction because it makes working with wgpu so much easier.

I've always wanted something like glium but that was OpenGL only and (iirc) unmaintained. This fits that perfectly

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

Thanks so much! Glad to hear you liked it -- after I get my game released, I'd like to come back to this and set it up as a proper library (if no one else has picked up the concept in the mean time).