Skip to content

refactor(wallpaper): split the baked tables out of worldmap and globe - #176

Merged
gapul merged 1 commit into
mainfrom
feat/shader-includes
Aug 9, 2026
Merged

refactor(wallpaper): split the baked tables out of worldmap and globe#176
gapul merged 1 commit into
mainfrom
feat/shader-includes

Conversation

@gapul

@gapul gapul commented Aug 9, 2026

Copy link
Copy Markdown
Owner

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, and 4.3 MB of this repo.

The tables move to worldmap-tables.metal and globe-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 worldmap as a live wallpaper.

🤖 Generated with Claude Code

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.
@gapul
gapul marked this pull request as ready for review August 9, 2026 14:02
@gapul
gapul merged commit ff04dff into main Aug 9, 2026
3 checks passed
@gapul
gapul deleted the feat/shader-includes branch August 9, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant