Game: DLSS/DLAA ghosting when camera clips inside Link #1370
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot#1370
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?
Reported on Discord
Longshot version
v3.0.0-rc.7, built from source with personal additions; also reproduced on source builds of rc.4, rc.5 and rc.6. Not tested with a release binary.
Channel
Built from source (release candidate source).
What happened
With DLSS or DLAA, when the camera is pushed inside Link, the background smears and repeats while he moves. Examples include fence rails appearing duplicated, a duplicate sprout, and the tunnel wall seeming to move with Link. It gets worse with faster movement and is worse with DLSS Quality than DLAA. Expected the room behind Link to remain clean while he is invisible.
Frame generation off, a 60 fps cap,
RX_VK_NO_A2C=1, andRX_VK_REACTIVE=1made no difference. Using the game's own upscaler makes the artifact almost disappear. No injected frame generation or ReShade.The reporter's renderer measurements suggest that when the camera is inside Link, the game omits his colour draws but retains roughly 30 depth-only draws. Their hypothesis is that this leaves moving body depth/motion data for DLSS in front of the visible room. They report
RX_VK_DLSS_DEBUG=motionshows large solid shapes at the camera. Their proposed workaround skips hidden-mesh depth-only draws under conditions described in their patch; they report it removed the artifact in both locations without new smearing.Proposed patch excerpt from the reporter:
On rc.7, the reporter says this skips 30 draws per frame while the camera is in Link and the ghosting disappears. They report it does not skip draws with an occlusion query, draws into another target, or meshes that never showed colour; depth returns one frame after the colour draw. Their patch covers four files under
gpu/vk(269 lines, mostly diagnostic recorder) and addsRX_VK_DLSS_FADED=0to disable it.Where in the game
Crawl tunnel in Kokiri Forest; top of a vine wall in the Deku Tree, with the camera turned until it clips into Link.
How often
Every time.
Graphics card and driver version
NVIDIA RTX 5090, driver 621.14.
CPU, RAM and operating system
Ryzen 9 9950X3D, 64 GB RAM, Windows 11 build 26300.
Graphics settings
4K, 240 Hz HDR; DLSS Quality and DLAA. Frame generation disabled for testing.
Logs and videos
The reporter says
longshot_log.txtand clips were attached to the original post; those files could not be copied here. Please attach the log, video and proposed patch (dlss-hidden-body-depth-v3.0.0-rc.7.patch) to this issue.Related issue
Longshot #242 proposes shared pose motion vectors for Link and attached equipment; it is related to upscaler motion data but does not track this specific hidden-body depth artifact.
Files as requested
Log attached, as asked: the game's log from a run of about 7 minutes of v3.0.0-rc.7 built from source with the patch in (rule on, no switch set, DLSS Quality 2560x1440 to 3840x2160). The camera was pushed into Link twice in that run.
One thing in the file is obfuscated: my Windows account name is replaced by
accountin four paths, soC:\Users\account\...stands for my own user folder. Nothing else is changed.Lines of that log (they start
vk: upscaler: faded:and come from the patch's recorder):So Link is 30 skinned meshes with one depth-only draw each. While the camera is inside him none of them gets a colour draw, and all 30 depth-only draws are still submitted. Longshot's own counter agrees:
vk: skips a frame by vk_draw.cpp line: 8191: 30.0in those periods, and no skipped draw in the other 326 of the run's 339 periods.Three things the summary above does not have:
skin_check()anddraw()ingpu/vk/vk_draw.cpp(the skip sits right afterreactive_scene_draw), and the switch ingpu/vk/vk_temporal.cpp. The upscaler's depth and motion are made ingpu/vk/shaders/dlss_prep.compand byactor_motion(dlss_actor.frag), which is why a body that only writes depth matters to DLSS.drawn because the game asks about them with a query, or no depth draw in the next frame).Thank you for finding this and for the patch. We made it into a PR, with your credit in the code and the commit:
#1447. It works the same way, with these changes: it waits 3 frames before it leaves a mesh's depth out (the colour
pass tests depth EQUAL against those draws, so with 1 frame a mesh that blinks would be lost), it decides before actor
motion takes the draw, it keeps draws the game uses for occlusion queries, and it is one table for all of the game's
drawing threads. On an RTX 5090 with DLAA and frame generation, the smear at the top of the Deku Tree vine wall is gone in
both runs and present in both runs of main.
Two questions: is it OK for you that your patch goes into Longshot under its licence (GPL-3.0-or-later)? And do you want a
Co-Authored-By:line on the commit? If yes, please give the name and email to put there. If you can, please also try thePR's build with DLSS Quality at your spot.
Thanks for picking this up, and for the credit.
Licence: yes, it is fine for the patch to go into Longshot under GPL-3.0-or-later. As noted above, it was written with an AI assistant and tested by me.
Co-Authored-By: no thanks. No line and no email for me, please. The credit in the code and the commit is plenty.
Trying #1447: I can't run the PR's build. I only run what I build myself, from the released source with my own changes worked into it, so I will meet your version when it is in a release. I'll go back to both spots then (the crawl tunnel in Kokiri Forest and the top of the vine wall in the Deku Tree, at DLSS Quality and at DLAA) and say here if anything is off.
Until then, three things from my own build that bear on your changes (rc.7 with the patch as posted and a few unrelated local changes; RTX 5090, driver 621.14, frame generation off):