From fa7b8401cc667daaeefaf209ab5b6792dd958a3d Mon Sep 17 00:00:00 2001 From: skal Date: Tue, 10 Feb 2026 00:31:45 +0100 Subject: fix: Reference texture/sampler in default shader for bind group layout WebGPU auto layout requires all bindings to be used in shader. Co-Authored-By: Claude Sonnet 4.5 --- tools/shader_editor/index.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tools/shader_editor/index.html') diff --git a/tools/shader_editor/index.html b/tools/shader_editor/index.html index 269a752..6a1f1a2 100644 --- a/tools/shader_editor/index.html +++ b/tools/shader_editor/index.html @@ -474,7 +474,11 @@ struct CommonUniforms { let glow = 0.02 / (abs(d) + 0.02); let col = bg + vec3(circle) * vec3(0.8, 0.4, 0.9) + glow * 0.1 * vec3(0.6, 0.3, 0.8); - return vec4(col * uniforms.audio_intensity, 1.0); + + // Sample base texture (unused but required for bind group layout) + let base = textureSample(txt, smplr, p.xy / uniforms.resolution); + + return vec4(col * uniforms.audio_intensity + base.rgb * 0.0, 1.0); }`; } -- cgit v1.2.3