WebGPU clip space maps the canvas to a fixed [-1, +1] range on both axes regardless of canvas pixel dimensions
Vertex positions returned from a vertex shader must be in clip space (Normalized Device Coordinates). The left canvas edge is always -1 on X, the right is +1; the bottom is -1 on Y and the top is +1. The center is (0,0). This mapping is independent of the canvas’s pixel size. A frequent mistake is assuming pixel coordinates map directly to shader positions — they do not. The clip-space range spans 2 units on each axis (from -1 to +1), so moving one grid cell of N requires 2/N clip-space units, not 1/N.
Examples
The four clip-space corners: bottom-left (-1,-1), bottom-right (1,-1), top-right (1,1), top-left (-1,1). A 512×512 canvas and a 256×256 canvas use identical clip-space coordinates.
Assessment
A vertex at clip-space (0.5, -0.5) — where is it on a 512×512 canvas in pixels? Why does a 1/4-canvas offset require moving 0.5 clip-space units rather than 0.25?