loader: LOD and cull switches that stay (VICTORY_LOD_SCALE, VICTORY_SMALL_CULL, VICTORY_VEHICLE_LOD_BIAS) #133

Manually merged
github merged 1 commit from github-bot/gh-133 into gh-pr/133/base 2026-12-02 01:45:47 +00:00 AGit
Owner

@⁠itsachudknocklife on GitHub · 2026-12-01 23:43 UTC · original
itsachudknocklife:pr-lod-switches → main · +398 −0 · 4 files · 1 commits · merged 2026-12-02 01:43 UTC

What

Three opt-in launch switches (each off without it), next to the output-size ones:

Switch Title's own Range
VICTORY_LOD_SCALE 1.0 (detailed models to 1,000 m; s * 950 + 50) 0.05 to 1.0
VICTORY_SMALL_CULL 1.0 0.25 to 16
VICTORY_VEHICLE_LOD_BIAS 0.0 -2 to 4

They change the three places in ApplySettings that copy the value into the engine's global. Each place is compared byte for byte first and left alone, with a log line, if it differs. No frame generation, resolution or shader change.

Where it comes from

The places and globals are ToLIManl/VIctory-Hydra's (ecbd78be7). The code is American Victory's (c573c523), by way of anoyarou/VIctory-RDNA4-linux.

New here: the values are kept. Something stores 1.0 into the LOD scale later. The title's LOD start-up at +0x1df5040 does that, though I did not trace which store it was. The distance made from it stays. Logged once, some 40 s into a run:

put back to what was asked key="lod_scale" offset=0xa15e200 was=1.0 now=0.1

So a small thread looks at the globals twice a second and puts them back. It starts only if a switch is set and its place matched.

Measured

RX 9070 XT, Ryzen 7 5800X3D, Wine 11.22, Series S profile, 1080p output, ray tracing off. Camera turned continuously on one spot, values swapped live every 4 s (13 turns), each turn against its neighbours:

lod_scale 0.1 vs 0.6 change (95% interval)
mean frame -6.3 ms (+-0.9), 30.5 -> 24.3
p90 frame -10.0 ms (+-1.6)
draws -1,225 (+-33), 4,140 -> 2,918
submitting thread -1.8 ms (+-0.3)

small_cull 8 vs 2.5: -0.7 ms (+-0.7). vehicle_lod 3 vs 0.5: +0.4 (+-1.3), no gain seen. Less detail is visible: models pop in much nearer.

Not checked

  • The A/B set the globals live (from a local build), not through these launch switches. The same patch plus hold was played once from a local branch. This exact branch was built and its 3 unit tests pass, but it has not been run in the title.
  • One machine, one spot. Not measured while driving, or on Series X.
  • What holding the scale does in scenes where the title changes it on purpose, if any do.

🤖 Generated with Claude Code

**@⁠itsachudknocklife** on GitHub · 2026-12-01 23:43 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/133) `itsachudknocklife:pr-lod-switches` → `main` · +398 −0 · 4 files · 1 commits · merged 2026-12-02 01:43 UTC ## What Three opt-in launch switches (each off without it), next to the output-size ones: | Switch | Title's own | Range | |---|---|---| | `VICTORY_LOD_SCALE` | 1.0 (detailed models to 1,000 m; `s * 950 + 50`) | 0.05 to 1.0 | | `VICTORY_SMALL_CULL` | 1.0 | 0.25 to 16 | | `VICTORY_VEHICLE_LOD_BIAS` | 0.0 | -2 to 4 | They change the three places in `ApplySettings` that copy the value into the engine's global. Each place is compared byte for byte first and left alone, with a log line, if it differs. No frame generation, resolution or shader change. ## Where it comes from The places and globals are ToLIManl/VIctory-Hydra's (ecbd78be7). The code is American Victory's (c573c523), by way of anoyarou/VIctory-RDNA4-linux. New here: **the values are kept**. Something stores 1.0 into the LOD scale later. The title's LOD start-up at +0x1df5040 does that, though I did not trace which store it was. The distance made from it stays. Logged once, some 40 s into a run: ``` put back to what was asked key="lod_scale" offset=0xa15e200 was=1.0 now=0.1 ``` So a small thread looks at the globals twice a second and puts them back. It starts only if a switch is set and its place matched. ## Measured RX 9070 XT, Ryzen 7 5800X3D, Wine 11.22, Series S profile, 1080p output, ray tracing off. Camera turned continuously on one spot, values swapped live every 4 s (13 turns), each turn against its neighbours: | `lod_scale` 0.1 vs 0.6 | change (95% interval) | |---|---| | mean frame | -6.3 ms (+-0.9), 30.5 -> 24.3 | | p90 frame | -10.0 ms (+-1.6) | | draws | -1,225 (+-33), 4,140 -> 2,918 | | submitting thread | -1.8 ms (+-0.3) | `small_cull` 8 vs 2.5: -0.7 ms (+-0.7). `vehicle_lod` 3 vs 0.5: +0.4 (+-1.3), no gain seen. Less detail is visible: models pop in much nearer. ## Not checked - The A/B set the globals live (from a local build), not through these launch switches. The same patch plus hold was played once from a local branch. **This exact branch was built and its 3 unit tests pass, but it has not been run in the title.** - One machine, one spot. Not measured while driving, or on Series X. - What holding the scale does in scenes where the title changes it on purpose, if any do. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Each off without it. They change where the title's ApplySettings copies the
value into the engine's global, byte for byte compared first; the places are
ToLIManl/VIctory-Hydra's (ecbd78be7), the code American Victory's
(c573c523), by way of anoyarou/VIctory-RDNA4-linux.

New here: the values are kept. Something stores 1.0 into the LOD scale later
(the title's LOD start-up, +0x1df5040, does), while the distance made of it
stays: seen once, some 40 s into a run. The globals are looked at twice a
second and put back, said in the log.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 23:48:51 +00:00
github-bot referenced this pull request from a commit 2026-12-02 01:45:44 +00:00
github-bot changed target branch from main to gh-pr/133/base 2026-12-02 01:45:46 +00:00
github manually merged commit df5e80893b into gh-pr/133/base 2026-12-02 01:45:47 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.