From b3c69d188943269769b7fee305f135faadcc60f2 Mon Sep 17 00:00:00 2001 From: skal Date: Sun, 22 Mar 2026 16:23:25 +0100 Subject: fix(cnn_v3/tools): remove unused sampler binding from FULL_PACK_SHADER MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WebGPU auto-reflects the BGL from the shader; a declared-but-unused sampler binding is omitted from the layout, causing CreateBindGroup to reject it. Removed binding 6 (sampler) entirely — all reads use textureLoad(). Renumbered f0/f1 from 7/8 to 6/7 to match. --- cnn_v3/docs/HOWTO.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cnn_v3/docs') diff --git a/cnn_v3/docs/HOWTO.md b/cnn_v3/docs/HOWTO.md index c6f306b..08979e7 100644 --- a/cnn_v3/docs/HOWTO.md +++ b/cnn_v3/docs/HOWTO.md @@ -444,9 +444,10 @@ WebGPU compute shader (`@workgroup_size(8,8)`) with 9 bindings: | Binding | Resource | Format | |---------|----------|--------| | 0–5 | albedo, normal, depth, matid, shadow, transp | `texture_2d` (rgba8unorm, R channel for single-channel maps) | -| 6 | linear sampler | `sampler` | -| 7 | feat_tex0 output | `texture_storage_2d` | -| 8 | feat_tex1 output | `texture_storage_2d` | +| 6 | feat_tex0 output | `texture_storage_2d` | +| 7 | feat_tex1 output | `texture_storage_2d` | + +No sampler — all reads use `textureLoad()` (integer texel coordinates). Packs channels identically to `gbuf_pack.wgsl`: - `feat_tex0`: `pack2x16float(alb.rg)`, `pack2x16float(alb.b, nrm.x)`, `pack2x16float(nrm.y, depth)`, `pack2x16float(dzdx, dzdy)` -- cgit v1.2.3