https://toji.dev/webgpu-best-practices/bind-groups.html Treasure trove of useful info #wgpu #webgpu
Small update on my #wgpu and #rust pet project. Now, I have begun implementing curves from Freya Holmér's awesome curve video. I also had to make my vertex buffer dynamic, or COPY_DST to allow updating the curve. There is however, no line width as far as I see, so at some point I should write my own tesselation to get more curve-rendering control.
So, I have followed this excellent #rust #wgpu tutorial https://sotrh.github.io/learn-wgpu/, and I have now set up a pipeline that is rendering a fullscreen quad, with shaders that have uniforms - and I have a smooth shader-defined circle animating across the screen. Next up, is rendering to offscreen buffers so that I can ping-pong around.
Using #wgpu with #rust was just super more pleasant than #vulkan for a newbie like me. Maybe I can get a little framework up an running again #demoscene
#wgpu #rust #vulkan #demoscene
Implemented Physically Based Shading ^^ I guess it works? 😅 ngl looks a bit disappointing compared to reference material, I hope it's just a lack of reflection/IBL, and maybe adding an env map would improve it a lot... so I suppose that's next.
The pic shows increasing roughness left->right and metalness bottom->top.
Other stuff implemented:
- depth reading & linearisation, calculating world pos from it (probably works?)
- ACES and Reinhard tonemapping
Baby's first deferred renderer ^^ (no pbr yet)
The first mayor feature I've implemented by myself, not following The WGPU Tutorial :3
Lessons learned:
- when textures are resized (due to window resizing) the texture bindings also have to be updated, otherwise the lighting pass will use outdated (or even blank) gbuffer textures
- you have to wait until resources are no longer used by in-flight draws before deleting them, otherwise the gpu will likely crash ^^"
#wgpu #rust #graphicsprogramming
Mesh loading implemented :3
Instancing go brrr
Next up depth buffering, model loading, and then attempting to write my first deferred renderer ^^
I tried some low-lvl gpu programming this weekend for lols and it's gotten so much better over the years. I'm using #rust + #wgpu + #winit and I feel pampered. I get error messages for bad shader bindings!! And the APIs almost make sense to me! And my program works in the browser!
Did some refactoring on my #wgpu renderer: separated the so far monolithic renderer struct into an engine part (managing resources and wgpu state) and an application part, calling the engine to create resources and do the drawing.
The refactoring wasn't too difficult, which reassures me that I managed to design the codebase in a way that supports this architecture; but it also revealed some deficiencies which will need more refactoring... but I suppose better sooner than later ^^
Added some greenery to the caverns and changed to tiled block voxel rendering. Using #rust and #wgpu.
#rust #wgpu #screenshotsaturday
I wrote a build script that validates the wgsl shader as a build step, using the naga library... maybe I'll be able to live with wgsl after all ^^
#wgpu #webgpu #rust #graphicsprogramming
Getting a triangle on the screen is way easier with #WebGPU than with e.g. Vulkan ^^
It still gives a lot of control over the gpu, but there’s much less noisy stuff to care about (no pools, no queues from different families, no swapchain management, etc).
Tho at least in its current state i loathe wgsl… can’t index arrays, can’t compare integers 🤯 I’ll have to figure out how to use Spir-V until it’s improved.
#webgpu #graphicsprogramming #rust #wgpu
Yay! WebGPU is out stable in Chrome now for real, rolling out to everyone.
We got up a WebGPU version up here https://app.rerun.io/webgpu/
So far we used #wgpu's WebGL backend. With the latest version WebGPU mostly just worked .. minus a few Naga bugreports and two extra fix PRs we needed on wgpu 😅