Skip to content

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
seedds:mainfrom
dontpokethebear3893:upstream/botw-shadow-resolution
Open

dontpokethebear3893 wants to merge 3 commits into
seedds:mainfrom
dontpokethebear3893:upstream/botw-shadow-resolution

Conversation

@dontpokethebear3893

@dontpokethebear3893 dontpokethebear3893 commented Nov 12, 2026 •

Copy link
Copy Markdown

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%.

  • The game's profile (game.tsv): a new key, shadow_maps <w>x<h>[,...], lists the sizes of the game's shadow maps (896x896). game.py turns it into DM_GAME_SHADOW_MAPS.
  • The renderer (nvn_mtl.m): with DM_SHADOW_SCALE=150 or 200 (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.
  • At 100%, or for a game without the key, nothing changes.

Conflict with #2418 (Anisotropic filtering): both add a line at the same place in the game's README, in settings.tsv, and in docs/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 has shadow_maps).

Checked

Docs

  • docs/settings.md (Shadow resolution), the switch in docs/env_switches.tsv, the profile key in dm/games/README.md, and the finding in the game's README (dm/games/01007EF00011E000/README.md); docs_symptoms.py was run and changes nothing
  • A chain tool changed: n/a
  • No game files, keys or data extracted from a game in the change or the attachments

🤖 Generated with Claude Code

…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>
@github-actions github-actions Bot added nvn NVN on Metal and its tests (dm/gfx/nvn, dm/gfx/tests) docs Documentation game: 01007EF00011E000 The Legend of Zelda: Breath of the Wild labels Nov 12, 2026
tedkoniszewski and others added 2 commits November 12, 2026 15:08
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation game: 01007EF00011E000 The Legend of Zelda: Breath of the Wild nvn NVN on Metal and its tests (dm/gfx/nvn, dm/gfx/tests)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant