feat(vk): Anisotropic filtering option, 16x by default, and the upscalers' texture LOD bias #1898
No reviewers
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!1898
Loading…
Reference in a new issue
No description provided.
Delete branch "anisotropic-filtering"
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?
Paths and floors in front of Link go muddy a short way ahead: the game asks for 2x anisotropic filtering at most (1x on some samplers), and nothing raised it unless
RX_VK_ANISOwas set by hand. This adds an Anisotropic filtering option, 16x by default, and a small extra texture LOD bias while DLSS or FSR renders below the game's own 3/4.Kokiri Forest path, same view at 2560x1440. Top: the game's anisotropy. Middle: 16x. Bottom: 16x plus the upscaler bias.
The upscaler bias with DLSS (off, then on)
DLSS Performance:
DLSS Quality (barely visible, as expected at 67%):
What the game asks for
A new log line records each sampler kind the game makes:
The -0.5 is the game compensating for its own 3D, which it draws at 3/4 of the output.
Anisotropic filtering row
A Graphics row after Sharpness:
anisotropy=.RX_VK_ANISOonly touched linear-mip samplers.samplers_changed()(vk_bank.cpp) drops the outer sampler table and reused descriptors.RX_VK_ANISO=<n>still overrides the row for a run (0: the game's).Upscaler LOD bias
While DLSS, FSR 3.1 or FSR 4 renders at a fixed share below 3/4, the samplers the game already biases below 0 get an extra
log2(share / 0.75):Nothing changes with the game's own upscaler, DLAA, FSR 4 Native AA, Auto, or 75% and up.
RX_VK_UPSCALE_LOD_BIAS=0.Cost
On an RTX 3090 at 2560x1440 (two alternating rounds, the game's GPU-time log line), 16x costs nothing measurable:
Tests
tests/test_sampler_admission.py: all three routes pass, 135 cases. New cases cover:test_framegen_preset.pyandtest_rumble_menu.pyget asamplers_changedstub.tests/run_all.pyon Linux gives the same results asmain.Not changed here
DLSS's own output is clearly softer than the game's upscaler at the same 67%: edge energy on the path is about 10 against 17. That's the bigger part of a soft picture with DLSS, and it's left for a separate look.