Repository navigation
Breath of the Wild: a Shadow resolution choice (150%, 200%) for sharper sun shadows at 4K and 5K - #2419
Open
dontpokethebear3893 wants to merge 3 commits into
Conversation
…e key shadow_maps, launcher: Shadow resolution) The game renders its sun shadows into three 896x896 depth maps (one cascade each, a 2D array). At 4K and 5K output their texels are large on screen and shadow edges look soft and blocky. With the profile's shadow_maps key and DM_SHADOW_SCALE=150 / 200 (up to 400), a 2D-array depth texture of a listed size is made at that percentage of its size, and a depth-only pass into it has its viewport and scissor scaled by the same factor, so the cascades fill the larger maps. The passes that read the maps sample them by normalised coordinates through the game's comparison sampler and need no change. 100% (the default) changes nothing. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2 of 3 tasks
Brings the branch up to date with main (fixes for the t_save_sync cloud device check and the clang-tidy fixture findings, among others) and resolves the conflicts with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Breath of the Wild renders its sun shadows into three 896x896 depth maps (one cascade each, in a 2D array). At 4K and 5K output, their texels are large on screen and shadow edges look soft and blocky. This adds a Shadow resolution choice to the launcher (Game): 100% (the default, the game's own), 150%, 200%.
game.tsv): a new key,shadow_maps <w>x<h>[,...], lists the sizes of the game's shadow maps (896x896).game.pyturns it intoDM_GAME_SHADOW_MAPS.nvn_mtl.m): withDM_SHADOW_SCALE=150or200(up to 400 by hand), a 2D-array depth texture of a listed size is made at that percentage of its size. A depth-only pass into such a texture has its viewport and scissor scaled by the same factor, so the game's cascades fill the larger maps. The passes that read the maps sample them by normalised coordinates through the game's comparison sampler, so they need no change.Conflict with #2418 (Anisotropic filtering): both add a line at the same place in the game's README, in
settings.tsv, and indocs/settings.md(the contents line and a new section). Whichever goes in second keeps both sides; I will rebase it.Front ends
Front-ends: none (one more choice row in
launcher.json, shown only for a game whose profile hasshadow_maps).Checked
kIOGPUCommandBufferCallbackErrorHang). This Mac's fault reports show the same kind of lockup the day before, without this change, and the on-screen run above did not repeat it. A 100 s run at 200% beside it had none.mainc24ab14): a build ofmainwith this change and Anisotropic filtering: a launcher choice of 2x to 16x for NVN games, checked in Breath of the Wild #2418, the game's default 1080p, the Mac's screen locked:1344x1344 instead of 896x896,1792x1792 instead of 896x896), and a screenshot at frame 3000 shows the scene and Link's shadow as they should be.dm/gfx/testscheck_t_borderpasses (113 checks).dm/tools/testspasses:test_docs,test_env_switches,test_settings,test_launcher_settings,test_game_profile,test_patches,test_player_env,test_fps_target,test_nsp_mac_app,test_lint_candtest_gfx_tests_makefile.make -k -C dm/host/tests GAME=01007EF00011E000 run:t_hidandt_codec_videodo not build, here and onmain(c24ab14) itself; the others ran without a failure.lint_python.py --against origin/main: no new findings.regress.py check --games: not run. Without the profile key (every other game) and at 100% no texture or pass is changed, and I have only this game.Docs
docs/settings.md(Shadow resolution), the switch indocs/env_switches.tsv, the profile key indm/games/README.md, and the finding in the game's README (dm/games/01007EF00011E000/README.md);docs_symptoms.pywas run and changes nothing🤖 Generated with Claude Code