We need to reduce the number of buffer bindings to 8 so it can run on
all WebGPU devices. The best candidate was to combine info and bin_data,
which are written by two different stages (draw_leaf and binning,
respectively), both read by coarse, and are unstructured, so the only
real shader change needed is to add the offset for the binning data.
I thought I was going to have to do a blit to make it fit, but
fortunately that wasn't needed.
Progress to #202
This commit reduces the workgroup shared memory of binning to fit in
16k (by packing two u16's in a u32), and moves the config binding to
uniform, from readonly storage.
Progress toward #202
Now that wgsl-analyzer 0.6 is released, most explicit type annotations on vec can be dropped (the exception being when it is a type conversion).
Also changes mix to select when the selector is actually boolean.
As stated by the README, the intention is for the shaders to be
provided under the terms of the Unlicense in addition to the MIT
and Apache-2.0 licenses.
While here, add a self-contained UNLICENSE file to replace the
external reference to unlicense.org.
The bones of coarse rasterization are in place (so far, fills only). Still not suitable for end-to-end (need to generate bounding boxes, among other things), but getting closer.