Add a test switch that lets a new depth image take the live one's depth.

A contributor traced the one-frame dark shadowing at the castle town gate to depth targets the game remakes at other sizes about a thousand times a minute: the new image started cleared, so everything near the camera read as in shadow for a frame. With depth_alias = 1 a depth-only image of the same format copies the live one's depth for the region both cover. Their three runs each way showed 6, 4 and 0 dark frames without it and none with it; the cost of the copies and other scenes are not measured yet, so it is off by default.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-10 13:19:51 -05:00
parent 0a502ecf65
commit df0db643ed
3 changed files with 50 additions and 7 deletions

View File

@@ -188,6 +188,11 @@
# memory = auto
# A new texture created over a live texture's memory starts with that content instead of empty.
# tex_alias = 1
# Test, off by default: a new depth image made over a live one of the same format at the same address takes its depth
# for the region both cover, instead of starting cleared. The game remakes its depth targets at other sizes many times a
# minute in some places, and a cleared one shows everything near the camera as in shadow for one frame. ab switches it
# in blocks of game time for comparisons; depth_alias_log = 1 logs each such image with its frame.
# depth_alias = 0
# Small texture uploads stage in ranges of a few kept buffers instead of a new buffer each (0 = a buffer each).
# stg_arena = 1
# With astc = gpu: the compute shader reads the blocks in the game's tiled layout, so the CPU only copies the