diff options
Diffstat (limited to 'cnn_v3/tools/shaders.js')
| -rw-r--r-- | cnn_v3/tools/shaders.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cnn_v3/tools/shaders.js b/cnn_v3/tools/shaders.js index d5b1fb4..a1b2929 100644 --- a/cnn_v3/tools/shaders.js +++ b/cnn_v3/tools/shaders.js @@ -252,9 +252,9 @@ const VIZ_U32=` }`; // Full G-buffer pack: assembles feat_tex0/feat_tex1 from individual G-buffer images. -// Bindings: albedo(0) normal(1) depth(2) matid(3) shadow(4) transp(5) sampler(6) f0(7) f1(8) +// Bindings: albedo(0) normal(1) depth(2) matid(3) shadow(4) transp(5) f0(6) f1(7) // All source textures are rgba8unorm (browser-loaded images, R channel for depth/matid/shadow/transp). -// Matches gbuf_pack.wgsl packing exactly so the CNN sees the same layout. +// Uses textureLoad() only (no sampler needed). Matches gbuf_pack.wgsl packing exactly. const FULL_PACK_SHADER=` @group(0) @binding(0) var albedo: texture_2d<f32>; @group(0) @binding(1) var normal: texture_2d<f32>; @@ -262,9 +262,8 @@ const FULL_PACK_SHADER=` @group(0) @binding(3) var matid: texture_2d<f32>; @group(0) @binding(4) var shadow: texture_2d<f32>; @group(0) @binding(5) var transp: texture_2d<f32>; -@group(0) @binding(6) var smp: sampler; -@group(0) @binding(7) var f0: texture_storage_2d<rgba32uint,write>; -@group(0) @binding(8) var f1: texture_storage_2d<rgba32uint,write>; +@group(0) @binding(6) var f0: texture_storage_2d<rgba32uint,write>; +@group(0) @binding(7) var f1: texture_storage_2d<rgba32uint,write>; fn ld(c:vec2i,d:vec2i)->f32{return textureLoad(depth,clamp(c,vec2i(0),d-vec2i(1)),0).r;} fn b2(tl:vec2i,d:vec2i)->vec3f{ var s=vec3f(0.); |
