Repository navigation
Conversation
Compare effective channel selection when textures share the same backing storage. This preserves BOTW layout capture descriptor replacements and lets the profile drop the obsolete alpha-from-red shader workaround. Add public API coverage for default/explicit identity and A8/RGB10A2 capture channel changes, with the host stack entry linked into t_nvn. Co-authored-by: Codex <[email protected]>
seedds
pushed a commit
that referenced
this pull request
Oct 18, 2026
…ure fix nvnTextureCompare and nvnTextureGetSwizzle share tex_swz. The BotW docs keep the capture investigation, now told from the cause (#6). Odyssey's layouts go through the same compare-and-replace code (main+0x982320): with the fix its alpha_from_red list converts no texture on the Mac smoke route to frame 20,100 (main's host did from frame 4129) and the HUD is pixel-identical; the list stays until an iPhone run.
Owner
|
感谢这个 PR!问题已修复,已合并到 main(合并提交 7d3f884)。 根因分析很准确:我对照反汇编核对了你给出的地址( 合并时我补了几处(5e18a4c):
|
seedds
added a commit
that referenced
this pull request
Oct 21, 2026
…texture-compare Breath of the Wild: black stamina bar and black System menu background. nvnTextureCompare now compares the channel mapping, so the game's capture textures rebuilt on the same storage with a new mapping replace the registered descriptor. Conflicts with main resolved in the BotW profile (gpu_timestamps kept) and docs/agents/04-graphics.md (main's BC entry kept).
seedds
added a commit
that referenced
this pull request
Oct 21, 2026
…ure fix nvnTextureCompare and nvnTextureGetSwizzle share tex_swz. The BotW docs keep the capture investigation, now told from the cause (#6). Odyssey's layouts go through the same compare-and-replace code (main+0x982320): with the fix its alpha_from_red list converts no texture on the Mac smoke route to frame 20,100 (main's host did from frame 4129) and the HUD is pixel-identical; the list stays until an iPhone run.
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.
问题与修复结果
在 BOTW 1.9.0 中,冲刺时精力条的填充呈黑色,System(系统)菜单背景也会完全变黑。修复后,精力条恢复绿色,系统菜单恢复游戏自身的模糊场景背景,声音计的紫色也恢复正常。
这两个问题已在未修改的上游
90d2992上重新复现。对照使用同一份存档快照、相同的原始游戏重写模块和相同的新版着色器缓存,输出为标准 1920×1080,未使用本地 4K、内存扩展或草的修复。根因
nvnTextureCompare只比较贴图描述和内存地址,遗漏了通道映射(swizzle)。游戏会在同一块存储上重建布局捕获贴图、改变通道选择;旧实现把新旧贴图误判为相同,导致引擎丢弃新的描述符。(1,1,1,R):保留材质的 RGB 颜色,使用红通道中的遮罩作为透明度。CaptureOutputAlpha=255的 RGB10A2 捕获需要(R,G,B,1),使菜单背景正常参与合成。这些更新丢失后,旧的
alpha_from_red补偿只能掩盖部分阴影问题;其(R,0,0,R)映射还会丢掉绿色、蓝色通道,造成黑色精力条。改动
nvnTextureCompare,并将未显式设置的映射与显式恒等映射视为相同。alpha_from_red着色器白名单。t_nvn链接现有的hle_bigstack.c入口,并更新图形排查文档。修复前后截图
左侧:未修改的上游版本;右侧:仅应用本 PR 的修复。 上方为精力条局部,下方为系统菜单。
查看原始 1920×1080 截图
截图存放在个人 fork 的独立证据提交中,通过固定提交链接引用,不进入本 PR 的源码差异。
验证
428aef474fa8构建并校验 19,592 个主着色器;修复前后使用相同的库文件,没有修改着色器翻译或编译产物。make -C dm/gfx/tests GAME=01007EF00011E000 t_nvn (cd dm/gfx/tests && ./t_nvn)范围
本 PR 仅包含颜色根因修复、旧补偿配置移除、测试和文档,共 5 个文件,新增 44 行、删除 9 行。不包含分辨率、内存布局、手柄、FPS、草渲染改动,也不包含游戏文件、密钥、着色器缓存或二进制产物。
目前完成的是 macOS 上的 BOTW 实机验证;尚未对 iOS 或其他游戏进行运行验证。