r/webgpu • u/cos4ni2s • Oct 15 '26
Help with WebGPU concepts
I'm learning WebGPU and I'm struggling to grasp concepts like "pipeline", "renderpass", "shader module", ... AI doesn't help either, it is itself confused ("you are right to push back" zone). I'm a very slow learner. Can you recommend some good educational material that applies to WebGPU?
0
Upvotes
View all comments
1
u/mentria-ai Oct 16 '26
One thing that helped me: learn compute first, because it skips render passes, vertex formats and attachments entirely.
A mental model for the words:
- Shader module: your WGSL code, compiled. Just code, no data.
- Pipeline: a frozen recipe. Which shader entry point runs, and what kinds of resources it expects (the layout). You create it once, up front, because it's expensive to validate.
- Bind group: the actual buffers and textures you plug into that recipe.
- Command encoder: a recording of work.
- Pass: a section of that recording. A compute pass says "run this pipeline with these bind groups over N workgroups". A render pass adds "and draw into these textures".
- queue.submit(): hand the recording to the GPU.
So each frame or job is: record, then submit. Pipelines and bind groups are set up ahead of time and reused.