fix(examples): outline post-FX + missing Color export (#48)#51
Merged
proggeramlug merged 1 commit intomainfrom May 1, 2026
Merged
fix(examples): outline post-FX + missing Color export (#48)#51proggeramlug merged 1 commit intomainfrom
proggeramlug merged 1 commit intomainfrom
Conversation
Two unrelated bugs surfaced together when @adevart tried the example projects on macOS: 1. `outline_bg` bind group failed validation on Apple GPUs because the R32Float object-ID texture was declared `Float { filterable: true }`, which requires the FLOAT32_FILTERABLE wgpu feature (not advertised by Metal). Switch the binding to `filterable: false` and use textureLoad instead of textureSample for the ID lookup — semantically correct anyway, since IDs should never be interpolated. 2. The `export { ColorConstants as Color } from './colors'` rename in src/core/index.ts produced no Perry FFI symbol for `Color`, so any example importing `Color` from `bloom/core` (pong, dungeon-crawl, kart-racer, isometric-rpg, space-blaster, voxel-sandbox) failed to link with `Undefined symbol _perry_fn_src_core_colors_ts__Color`. Make `Color` a real top-level binding in colors.ts and keep `ColorConstants` as an aliased export.
4 tasks
proggeramlug
added a commit
that referenced
this pull request
May 1, 2026
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
Fixes two confirmed bugs from #48 that broke most of the example projects on macOS.
outline_bgbind group validation error. The R32Float object-ID texture was declaredFloat { filterable: true }inpostfx.rs, which requires the wgpuFLOAT32_FILTERABLEfeature — not advertised by Apple GPUs. Switched the binding tofilterable: falseand the shader totextureLoad(semantically correct, since IDs shouldn't be interpolated). This is the cause of thetest-gltf-watchcrash and likely cascades into several of the other macOS rendering failures._perry_fn_src_core_colors_ts__Colorsymbol. Theexport { ColorConstants as Color } from './colors'rename re-export insrc/core/index.tsproduces no FFI symbol under Perry. MadeColora real top-level binding incolors.tsand keptColorConstantsas an aliased export for backward compat. Unblockspong,dungeon-crawl,kart-racer,isometric-rpg,space-blaster,voxel-sandbox.Does not address the other items in #48 (
scene_node_ibdivisible-by-3, thebistro/sponzablack screens,pbr-spheresflat lighting) — those need more diagnosis and probably hardware info from the reporter.Test plan
cargo check—native/macoscargo check—native/shared(wasm32 target with--features web)examples/test-gltf-watchon macOS and confirm it no longer crashes with theoutline_bgvalidation errorexamples/pongon macOS and confirm the linker no longer reportsUndefined symbol _perry_fn_src_core_colors_ts__ColorFLOAT32_FILTERABLEis typically advertised) — the textureLoad path should produce identical results since IDs are integer-valued