Compute shader
Related terms: GPGPU, GPU compute
A shader that is not tied to drawing. It reads and writes plain buffers and textures, running the same small program on thousands of items at once.
It suits any job made of many independent pieces: particles, cloth, crowd movement, culling, terrain generation. A CPU has a few fast cores. A GPU has thousands of simple ones.
- Further reading
- Khronos: Vulkan compute shader tutorial
p′ = p + vΔt and Δt = 1 s. Positions are in meters and velocities in m/s. Each global ID writes one output; this dispatch needs no padding. Many invocations can run in parallel, without a guaranteed execution order.