Fundamentals & Structure
Modules, declarations, entry points, attributes, dispatch, UVs, and debugging loops.
Read chapterCompiler-backed WGSL learning
Original lessons for people writing real WebGPU shaders. Read the concept, open the module in Studio, then inspect diagnostics, reflection, invocations, memory layout, and execution without leaving the browser.
Reference path
Modules, declarations, entry points, attributes, dispatch, UVs, and debugging loops.
Read chapterScalars, vectors, matrices, arrays, structs, address spaces, and texture types.
Read chapterValues, variables, expressions, operators, references, pointers, and const evaluation.
Read chapterControl flow, loops, functions, assertions, and how diagnostics point back to source.
Read chapterBindings, buffer layouts, entry-point IO, host code, and data movement.
Read chapterWorkgroups, lanes, barriers, shared memory, uniformity, and race-aware thinking.
Read chapterAtomic types, histogram bins, barriers, scratch memory, and layout habits.
Read chapterConstructors, numeric helpers, textures, atomics, synchronization, subgroups, and grammar notes.
Read chapterInteractive stations
Longer chapters explain the mental model without dumping syntax tables. Each section gives you a module, a prediction, and a compiler surface to inspect.
Open the lesson module in Studio and check diagnostics, reflection JSON, binding layout, uniformity, and host code.
Use WebGPU execution, compute readback, invocation tracing, and profiling to connect WGSL syntax to GPU behavior.
Every lesson keeps one concrete WGSL file at the center instead of explaining syntax in the abstract.
Studio turns the same source into diagnostics, resources, entry points, layouts, and generated host code.
The final check is executable: dispatch the kernel, inspect the readback, and trace one invocation.
Practice library
Comments, numeric suffixes, identifier rules, keyword collisions, scope, structs, and a complete shader.
Scalars, explicit conversion, vector swizzles, matrix multiplication, arrays, struct layout, and aliases.
Color, UV, time, SDF, smoothstep, noise, transforms, raymarching, compute, and workgroup memory.
A compact reference path runs alongside the hands-on lessons for quick lookup.