fix(postfx): drop duplicate VertexOutput in outline_shader (#48)#52
Merged
proggeramlug merged 1 commit intomainfrom May 1, 2026
Merged
fix(postfx): drop duplicate VertexOutput in outline_shader (#48)#52proggeramlug merged 1 commit intomainfrom
proggeramlug merged 1 commit intomainfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #51. After that PR landed, @adevart re-tested and the bind-group validation error in `test-gltf-watch` was replaced by a shader compile error:
```
Shader 'outline_shader' parsing error: redefinition of `VertexOutput`
```
Both `FULLSCREEN_VERT` and `OUTLINE_FRAG` declared `struct VertexOutput`, which becomes a redefinition once `format!("{}\n{}", ...)` concatenates them in `PostFxPipeline::new`. This was a latent bug — naga was previously masking it behind the earlier bind-group filterable validation error that #51 fixed. Now that the bind-group error is gone, the shader-parse error surfaces and breaks the entire post-FX pipeline init on every example, which is why `sponza` started crashing on load and several others regressed.
Fix: remove the duplicate from `OUTLINE_FRAG`. The fragment shader picks up `VertexOutput` from the concatenated vertex shader prefix.
Test plan