refactor(wallpaper): split the baked tables out of worldmap and globe - #176
Merged
Conversation
worldmap.metal was 20,813 lines, of which 333 were the shader and the rest a baked distance field. globe.metal is the same shape. Between them they were 97% of every shader line here. The tables move to their own files, spliced back in with #include, so the shaders are readable again and regenerating the tables no longer touches them. Depends on Puddle resolving quoted includes itself — Metal's runtime compiler has no include search path.
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.
worldmap.metalwas 20,813 lines, of which 333 were the shader and the rest a baked distance field.globe.metalis the same shape. Between them they were 97% of every shader line here, and 4.3 MB of this repo.The tables move to
worldmap-tables.metalandglobe-tables.metal, spliced back in with#include. The shaders are 258 and 272 lines now, and regenerating the tables no longer touches them.Draft: do not merge until Puddle ships shader includes. Metal's runtime compiler has no include search path, so this depends on Puddle resolving quoted includes itself (Puddle commit 37d0b59, not yet released). Merging first would leave both wallpapers failing to compile.
Verified by compiling both split shaders exactly as Puddle does — contract preamble prepended, includes spliced — and by running the split
worldmapas a live wallpaper.🤖 Generated with Claude Code