The mip-generation blit's WGSL: a full-surface triangle sampling the level
above.
@group(0) here and @group(1) in the unlit shader, from one bind-group
layout object (createTextureBindGroupLayout): the layout describes the
shape, the pipeline layout assigns the index, and a blit that binds nothing
else has no reason to leave group 0 empty.
The uv is derived from the clip-space corner rather than carried in a vertex
buffer, so the blit binds no geometry at all — (x + 1) / 2 and
(1 - y) / 2, the second flipped because WebGPU's framebuffer origin is
top-left while its uv origin is the top of the image.
The mip-generation blit's WGSL: a full-surface triangle sampling the level above.
@group(0)here and@group(1)in the unlit shader, from one bind-group layout object (createTextureBindGroupLayout): the layout describes the shape, the pipeline layout assigns the index, and a blit that binds nothing else has no reason to leave group 0 empty.The uv is derived from the clip-space corner rather than carried in a vertex buffer, so the blit binds no geometry at all —
(x + 1) / 2and(1 - y) / 2, the second flipped because WebGPU's framebuffer origin is top-left while its uv origin is the top of the image.