From 4911c9040cf189eb3507d4b31a8c6d73ce675d23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ralph=20K=C3=BCpper?= Date: Fri, 1 May 2026 22:30:50 +0200 Subject: [PATCH] fix(postfx): drop duplicate VertexOutput in outline_shader (#48) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FULLSCREEN_VERT and OUTLINE_FRAG both declared `struct VertexOutput`, which becomes a redefinition once `format!("{}\n{}", ...)` concatenates them. Naga used to mask this behind the earlier bind-group filterable validation error; now that #51 fixed that, the shader-parse error surfaces and breaks the entire post-FX pipeline init on every example. Validated by parsing the concatenated source with naga 29.0.0 — passes. --- native/shared/src/postfx.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/native/shared/src/postfx.rs b/native/shared/src/postfx.rs index 4cf3fa6..460c2d4 100644 --- a/native/shared/src/postfx.rs +++ b/native/shared/src/postfx.rs @@ -43,10 +43,8 @@ struct OutlineParams { @group(0) @binding(2) var tex_sampler: sampler; @group(0) @binding(3) var params: OutlineParams; -struct VertexOutput { - @builtin(position) position: vec4, - @location(0) uv: vec2, -}; +// VertexOutput is defined in FULLSCREEN_VERT — this string is concatenated +// after it, so redefining here would be a WGSL parser error. @fragment fn fs_outline(in: VertexOutput) -> @location(0) vec4 {