Grass texture issue in hyrule field #107
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot#107
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I think is happening: to save time, Hookshot doesn’t upload a texture from game memory if the GPU was the last thing to draw into that memory. It assumes the GPU’s copy is the newest.
Coming from Castle Town: the game reuses memory that held Castle Town’s render targets for Hyrule Field’s ground textures. Hookshot sees “the GPU drew here last” and skips the upload, so the ground is drawn with leftover data. That’s the streaks.
Loading straight into the field: that memory was never drawn into by the GPU, so the textures upload normally and the grass looks right.
The cause is most likely incorrect, testing currently to see what the issue is
CPU:AMD Ryzen 7 5700G with Radeon Graphics (3.80 GHz)
GPU:NVIDIA GeForce RTX 3060 (12 GB)
RAM: 48.0 GB
Thanks, that's a good lead. The renderer does keep its own GPU copy of memory the GPU last wrote, and only re-reads the game's copy when the CPU has written to it. If the game reuses that memory for textures through a path the renderer doesn't see as a CPU write, the old data would stay, which is what you describe. I'll test going into Hyrule Field from another area. If you find a reliable way to reproduce it, please post it here.
EDIT: When I load into the save where it is broken, it looks and works fine, but loading into castletown and walking out towards the ranch, this is when it is broken
I compared two frame dumps (RX_VK_DUMP_KEY) at the same spot, one loaded on the field (clean) and one after walking from Castle Town (broken):
abdd8ace9d7b8824drawing from cube#175at0x112a47f000(128x128x6, format 122), averages about 0.17–0.22 in the clean frame and about 0.017–0.04 in the broken one, roughly 10x darker. It's the same program and the same source texture, so only the cube's contents differ.edd4d7c51103645dalso differs (0.95/1.015 clean vs 0.21/0.12 broken).1e2fcee33a0c7209outputs are brighter in the broken frame.My guess is that the cube at
0x112a47f000is GPU-written in Castle Town, then the game puts the field's data into the same memory, and the texture cache keeps the GPU's copy. That would explain why loading straight into the field is fine.Result with
RX_VK_CPU_OVER_GPU=1: [FILL IN: fixed / not fixed / other glitches](
RX_VK_UPLOAD_ALL=1did not fix it.)this also happens on some parts of kokiri forest
Tracked in #993, follow there. That issue collects every report of garbled or rainbow textures that get worse over play time, and this one is linked from it with its GPU, version and log details. It is a known issue in v2.0.6 and not fixed yet. If it still happens on v2.0.6 (https://github.com/NotRexed/Hookshot/releases/tag/v2.0.6; Update next to Play in the launcher), please add a comment there with your
hookshot_log.txt.