Sampler switches: VICTORY_ANISO (forced anisotropy) and VICTORY_MIP_BIAS, off by default #1295

Closed
github-bot wants to merge 1 commit from github-bot/gh-1295 into main AGit
Owner

@⁠Mumogg on GitHub · 2026-11-28 17:02 UTC · original
Mumogg:feat/sampler-aniso-bias → main · +308 −14 · 3 files · 1 commits · closed without merging

What

This adds two host-side sampler switches. Both are off by default, and with neither one set every sampler descriptor is bit-for-bit the same as today (a test pins this).

  • VICTORY_ANISO=2..16 turns samplers that filter linearly in min, mag and mips into anisotropic ones. MaxAnisotropy is the larger of the console's value and N, capped at 16. Point, point-mip, no-mip, comparison and min/max-reduction samplers are left alone. Values below 2, or ones that don't parse, mean off.
  • VICTORY_MIP_BIAS=<lod> adds a bias to the LOD bias of every sampler that has mips (a NaN bias counts as 0), then clamps to the D3D12 range.

Each switch is read from the environment once. Static samplers use the adjusted values in both the root signature and the key of the kept static-sampler order, so the two can't disagree.

Why

At a 4K output with DLSS Quality, ground and walls seen at grazing angles are the softest part of the image. Forcing anisotropy on the host fixes that at no measurable cost.

Tested on Linux (Wine + GE vkd3d-proton), RTX 5070 Ti 16 GB, Series X profile, DLSS Quality with frame generation x2. Each run was 8 minutes on the same restored save with the world clock frozen (#1155):

Run World fps (median / p10) Notes
Baseline 15.6 / 13.2
VICTORY_ANISO=16 15.8 / 14.0 Same view, wooden floor: fine detail (variance of the Laplacian) +65 %
VICTORY_ANISO=16 VICTORY_MIP_BIAS=-0.5 13.1 / 10.9 Sharper, but shimmer between still frames doubled. Not recommended; it's kept only for anyone who wants to try it

Tests

  • sampler::: 7/7, including default unchanged, aniso applied only to linear-mip samplers, and bias added then clamped. All of them failed first against a stub that ignored the switches.
  • pipeline::samplers: 3/3, including tuned_words_carry_the_effective_values.
  • Both run on the Windows target under Wine.
  • Clippy on victory-gpu reports nothing new; its one warning, in shadow.rs, is already on main.

AI-assisted change and testing.

🤖 Generated with Claude Code

**@⁠Mumogg** on GitHub · 2026-11-28 17:02 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1295) `Mumogg:feat/sampler-aniso-bias` → `main` · +308 −14 · 3 files · 1 commits · closed without merging ## What This adds two host-side sampler switches. Both are off by default, and with neither one set every sampler descriptor is bit-for-bit the same as today (a test pins this). - **`VICTORY_ANISO=2..16`** turns samplers that filter linearly in min, mag and mips into anisotropic ones. `MaxAnisotropy` is the larger of the console's value and N, capped at 16. Point, point-mip, no-mip, comparison and min/max-reduction samplers are left alone. Values below 2, or ones that don't parse, mean off. - **`VICTORY_MIP_BIAS=<lod>`** adds a bias to the LOD bias of every sampler that has mips (a NaN bias counts as 0), then clamps to the D3D12 range. Each switch is read from the environment once. Static samplers use the adjusted values in both the root signature and the key of the kept static-sampler order, so the two can't disagree. ## Why At a 4K output with DLSS Quality, ground and walls seen at grazing angles are the softest part of the image. Forcing anisotropy on the host fixes that at no measurable cost. Tested on Linux (Wine + GE vkd3d-proton), RTX 5070 Ti 16 GB, Series X profile, DLSS Quality with frame generation x2. Each run was 8 minutes on the same restored save with the world clock frozen (#1155): | Run | World fps (median / p10) | Notes | |---|---|---| | Baseline | 15.6 / 13.2 | | | `VICTORY_ANISO=16` | 15.8 / 14.0 | Same view, wooden floor: fine detail (variance of the Laplacian) +65 % | | `VICTORY_ANISO=16 VICTORY_MIP_BIAS=-0.5` | 13.1 / 10.9 | Sharper, but shimmer between still frames doubled. Not recommended; it's kept only for anyone who wants to try it | ## Tests - `sampler::`: 7/7, including default unchanged, aniso applied only to linear-mip samplers, and bias added then clamped. All of them failed first against a stub that ignored the switches. - `pipeline::samplers`: 3/3, including `tuned_words_carry_the_effective_values`. - Both run on the Windows target under Wine. - Clippy on victory-gpu reports nothing new; its one warning, in `shadow.rs`, is already on main. AI-assisted change and testing. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Both off by default, and then every sampler (descriptor heap and static)
is the console's to the bit (tests pin it).

- VICTORY_ANISO=2..16: samplers that filter linearly in min, mag and mips
  (plain reduction, so not comparison or min/max) become anisotropic with
  at least that much anisotropy.
- VICTORY_MIP_BIAS=<lod>: added to the LOD bias of samplers with mips,
  clamped to D3D12's range (a sharper level for upscaled output).

Static samplers take the effective values in the words that key the
static-sampler list as well as in the root signature, so the list's order
stays the pipelines' own. Each switch is read once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit b2cbac8fdd2474ecd60b3e8893fd6557a641bcc8)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 17:03:39 +00:00
github-bot closed this pull request 2026-11-28 19:24:56 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-11-28 19:22 UTC · original

Thanks for this. I'm closing it without merging because it conflicts with the current main in several places (main has moved a lot since it was opened, with about 100 pull requests merged today), and I can't resolve that safely on your behalf. If you'd still like it in, please rebase it on the current main and open a new pull request.

**@⁠trustno1-coder** on GitHub · 2026-11-28 19:22 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1295#issuecomment-7244498555) Thanks for this. I'm closing it without merging because it conflicts with the current main in several places (main has moved a lot since it was opened, with about 100 pull requests merged today), and I can't resolve that safely on your behalf. If you'd still like it in, please rebase it on the current main and open a new pull request.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!1295
No description provided.