Repository navigation
Conversation
…o#12) Pokémon Legends: Z-A built from this fork draws Lumiose's building walls and the walkways beside its ladders invisible, while their window frames and ladders float and the walkways' collision still holds. Two upstream fixes made after the fork's last sync (2026-10-27) are missing: - seedds/nxnative 8fa9b2d: GLSLC's vertex shaders read the draw's base instance from c0 + 0x644, which the host fills from the draw command; an indirect draw's base instance is in GPU memory, so it was 0 and every GPU-culled instance took the first one's transform. dmsh_build.py's vs_base_instance now reads Metal's [[base_instance]]. - seedds/nxnative e4e5ff6: translated shaders compile with -fwrapv, as signed overflow wraps on the Switch's GPUs and Metal's front end folded around it (dmsh_build.py, ios_metal.py, vk_shaders.py, gl_shaders.py). Chain 764aff238713 -> 8a1b56655ae9 (dmsh_chain.py --header). Checked: 775 of Z-A's 28,603 translated shaders read c0 + 0x644 by the text vs_base_instance looks for; all 775, rewritten, compile with Metal Developer Tools for Windows (metal.exe, air64-apple-ios18.0, with -fwrapv), 0 failures. A full build made 28,603 of 28,603 iOS libraries, all 775 with the base instance from Metal and none on the old form. On an iPhone (A18 Pro, iOS 27.2), Z-A 2.0.2's walkways beside Lumiose's ladders, invisible on chain 764aff238713, are drawn on 8a1b56655ae9. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VDGHF5LyEKSqoK23EvYr6W
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.
What and why
Fixes #12.
Pokémon Legends: Z-A built from this fork leaves parts of Lumiose invisible: the walkways beside the buildings' ladders are not drawn, while the ladders float and the walkways' collision still holds (#12 reports building walls with floating window frames). Two upstream fixes made after the fork's last sync (2026-10-27) are missing, and this backports both:
8fa9b2d1, the base instance from Metal. GLSLC's vertex shaders read the draw's base instance fromc0 + 0x644, which the host fills from the draw command. An indirect draw's base instance is in GPU memory, so it was 0 and every GPU-culled instance took the first one's transform.dmsh_build.py'svs_base_instancenow reads Metal's[[base_instance]].e4e5ff6,-fwrapv. Translated shaders compile with-fwrapv, because signed overflow wraps on the Switch's GPUs and Metal's front end folded around it (dmsh_build.py,ios_metal.py,vk_shaders.py,gl_shaders.py).Chain
764aff238713→8a1b56655ae9(dmsh_chain.py --header).Checked
c0 + 0x644in the formvs_base_instancelooks for. Rewritten, all 775 compile with Metal Developer Tools for Windows (metal.exe,air64-apple-ios18.0, with-fwrapv), 0 failures. The full build then made 28,603 of 28,603 iOS libraries, and all 775 readas_type<float>(gl_BaseInstance)with none left on the old form.764aff238713, are drawn on8a1b56655ae9.-fwrapvpart was not checked on its own in Z-A.Docs
🤖 Generated with Claude Code
https://claude.ai/code/session_01VDGHF5LyEKSqoK23EvYr6W