diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-10 00:31:45 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-10 00:31:45 +0100 |
| commit | fa7b8401cc667daaeefaf209ab5b6792dd958a3d (patch) | |
| tree | e58172b91d192a514ac5dc33b7d85e2d272c012c | |
| parent | adbf0ba796c0d0706637936c9474a98947ee1114 (diff) | |
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 <noreply@anthropic.com>
| -rw-r--r-- | tools/shader_editor/index.html | 6 |
1 files changed, 5 insertions, 1 deletions
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<f32>(circle) * vec3<f32>(0.8, 0.4, 0.9) + glow * 0.1 * vec3<f32>(0.6, 0.3, 0.8); - return vec4<f32>(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<f32>(col * uniforms.audio_intensity + base.rgb * 0.0, 1.0); }`; } |
