loader: add opt-in RAGE 9 shadow, volumetric, foliage, and world LOD distance switches #211

Manually merged
github merged 1 commit from github-bot/gh-211 into main 2026-12-02 20:24:18 +00:00 AGit
Owner

@⁠luniiya on GitHub · 2026-12-02 17:09 UTC · original
luniiya:pr/engine-quality-switches → main · +433 −1 · 2 files · 1 commits · merged 2026-12-02 20:19 UTC

Summary

Extends crates/victory-loader/src/detail.rs with 13 opt-in RAGE 9 engine-level graphics switches for game_scarlett_master.exe (1.0.2.1), all OFF by default and byte-for-byte verified before patching (using the same resolution::write mechanism as VICTORY_LOD_SCALE / VICTORY_SMALL_CULL / VICTORY_VEHICLE_LOD_BIAS). RVAs and patch sites are credited to ToLIManl/VIctory-Hydra (engine.rs) and HSgod/ps5-fpsunlocker-gta6, independently verified against game_scarlett_master.exe 1.0.2.1.

Switches added (all opt-in, off by default)

  • VICTORY_LOW_SHADOWS=512|768|1024|1280|1536|2048 — patches GetShadowMapResolution (+0x1ce8bb0)
  • VICTORY_SHADOW_CASCADES=1..=3 — caps active shadow cascades vs stock 4 (+0x5705b63)
  • VICTORY_SHADOW_DIST=low — zeroes extended + 4-cascade shadow distance overrides (+0x5ad09fd, +0x5ad0a66)
  • VICTORY_GRASS_SHADOWS=0 — disables grass shadows (+0x22436f4)
  • VICTORY_SHADOW_EXTRAS=0 — disables alpha-tinted & particle shadows (+0x5ad0a73)
  • VICTORY_LOW_VOLUMETRIC=1 — forces 128px / 7 mips volumetric/reflection map (+0x1c9bea0)
  • VICTORY_VOLUMETRIC_QUALITY=0..=3 — overrides raymarch + lighting quality tiers (+0x22436c7, +0x22436d5)
  • VICTORY_TREE_QUALITY=0..=3 & VICTORY_TREE_TESS=0 — tree LOD & tessellation overrides (+0x22436ff, +0x2243715, +0x22436e9)
  • VICTORY_FOLIAGE_TIER=0 — foliage distance tier override (+0x224370a)
  • VICTORY_TESS_LOW=1 — forces tessellation & deepsurfaceQuality to Low (+0x2243738)
  • VICTORY_ITER_TIER=0 — forces subsystem iteration-count tier to Low (+0x2243767)
  • VICTORY_WORLD_DIST_SCALE=0.05..1.0 — scales squared LOD0/LOD1/LOD2 distances (+0x4fd06cb)
  • Widens VICTORY_SMALL_CULL upper bound from 16.0 to 128.0.

Also includes tools/bench-run.sh, the automated in-world benchmark + Wayland screenshot verification script used to collect the numbers below.

Measured Results (RX 7800 XT RDNA 3 + Ryzen 7 5800X, Arch Linux, 1080p fullscreen, outdoor SARC0015 spawn, RT off)

Config Avg FPS Frame ms 1% low Worst ms Draws/f
Stock series-x (RT on, default LOD) 20.45 48.9 — — 9,362
RT off + LOD=0.35 / CULL=2.5 / VEH=0.5 31.87 31.4 15.9 34.3 6,942
+ LOD=0.10 / CULL=12.0 / VEH=2.5 / RENDER_SCALE=0.5 38.70 25.8 22.9 52.2 5,077
+ Balanced engine stack (SHADOWS=1024, CASCADES=2, WORLD_DIST=0.45) 38.50 26.0 33.7 26.9 5,240
+ Max engine stack (SHADOWS=512, CASCADES=1, WORLD_DIST=0.25, LOD=0.05/16/4) 40.22–40.6 24.6–24.9 28.9 27.4 4,423–4,457

Every run was visually verified in-world with zero rendering artifacts or hitches.

**@⁠luniiya** on GitHub · 2026-12-02 17:09 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/211) `luniiya:pr/engine-quality-switches` → `main` · +433 −1 · 2 files · 1 commits · merged 2026-12-02 20:19 UTC ## Summary Extends `crates/victory-loader/src/detail.rs` with 13 opt-in RAGE 9 engine-level graphics switches for `game_scarlett_master.exe` (1.0.2.1), all OFF by default and byte-for-byte verified before patching (using the same `resolution::write` mechanism as `VICTORY_LOD_SCALE` / `VICTORY_SMALL_CULL` / `VICTORY_VEHICLE_LOD_BIAS`). RVAs and patch sites are credited to `ToLIManl/VIctory-Hydra` (`engine.rs`) and `HSgod/ps5-fpsunlocker-gta6`, independently verified against `game_scarlett_master.exe` 1.0.2.1. ### Switches added (all opt-in, off by default) - `VICTORY_LOW_SHADOWS=512|768|1024|1280|1536|2048` — patches `GetShadowMapResolution` (`+0x1ce8bb0`) - `VICTORY_SHADOW_CASCADES=1..=3` — caps active shadow cascades vs stock 4 (`+0x5705b63`) - `VICTORY_SHADOW_DIST=low` — zeroes extended + 4-cascade shadow distance overrides (`+0x5ad09fd`, `+0x5ad0a66`) - `VICTORY_GRASS_SHADOWS=0` — disables grass shadows (`+0x22436f4`) - `VICTORY_SHADOW_EXTRAS=0` — disables alpha-tinted & particle shadows (`+0x5ad0a73`) - `VICTORY_LOW_VOLUMETRIC=1` — forces 128px / 7 mips volumetric/reflection map (`+0x1c9bea0`) - `VICTORY_VOLUMETRIC_QUALITY=0..=3` — overrides raymarch + lighting quality tiers (`+0x22436c7`, `+0x22436d5`) - `VICTORY_TREE_QUALITY=0..=3` & `VICTORY_TREE_TESS=0` — tree LOD & tessellation overrides (`+0x22436ff`, `+0x2243715`, `+0x22436e9`) - `VICTORY_FOLIAGE_TIER=0` — foliage distance tier override (`+0x224370a`) - `VICTORY_TESS_LOW=1` — forces tessellation & deepsurfaceQuality to Low (`+0x2243738`) - `VICTORY_ITER_TIER=0` — forces subsystem iteration-count tier to Low (`+0x2243767`) - `VICTORY_WORLD_DIST_SCALE=0.05..1.0` — scales squared LOD0/LOD1/LOD2 distances (`+0x4fd06cb`) - Widens `VICTORY_SMALL_CULL` upper bound from `16.0` to `128.0`. Also includes `tools/bench-run.sh`, the automated in-world benchmark + Wayland screenshot verification script used to collect the numbers below. ### Measured Results (RX 7800 XT RDNA 3 + Ryzen 7 5800X, Arch Linux, 1080p fullscreen, outdoor `SARC0015` spawn, RT off) | Config | Avg FPS | Frame ms | 1% low | Worst ms | Draws/f | |---|---:|---:|---:|---:|---:| | Stock `series-x` (RT on, default LOD) | 20.45 | 48.9 | — | — | 9,362 | | RT off + `LOD=0.35 / CULL=2.5 / VEH=0.5` | 31.87 | 31.4 | 15.9 | 34.3 | 6,942 | | + `LOD=0.10 / CULL=12.0 / VEH=2.5 / RENDER_SCALE=0.5` | 38.70 | 25.8 | 22.9 | 52.2 | 5,077 | | + Balanced engine stack (`SHADOWS=1024, CASCADES=2, WORLD_DIST=0.45`) | 38.50 | 26.0 | **33.7** | **26.9** | 5,240 | | + Max engine stack (`SHADOWS=512, CASCADES=1, WORLD_DIST=0.25, LOD=0.05/16/4`) | **40.22–40.6** | **24.6–24.9** | **28.9** | **27.4** | **4,423–4,457** | Every run was visually verified in-world with zero rendering artifacts or hitches.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 18:55:46 +00:00
Author
Owner

@⁠zocram4cc on GitHub · 2026-12-02 19:16 UTC · original

Confirming the uplift on another card and CPU.

Setup. RX 6900 XT 16 GB (RDNA 2, PCIe 3.0, Resizable BAR), Ryzen 7 5800X3D, Linux, Proton, patched Mesa 26.3.1. Series S profile, 1280x720 render, FidelityFX to 1920x1080, ray tracing off, a diagnostics build of a fork that carries this PR's commit unchanged. Every patch site reported Done (the byte checks passed).

Method. A scripted camera turn in place on a street (the right stick held from 80 s on), the same save for every run, one run per preset, 36 five-second frame-rate lines in the world (3 minutes). The presets are this PR's measured stacks, without the render-scale step. Stock is a separate run of the same build.

Preset Switches Mean frame Median of 5-s p99 Frames >= 50 ms Frames >= 100 ms vs stock
stock none 44.7 ms 95.6 ms 1,138 43 -
high LOD_SCALE=0.35 SMALL_CULL=2.5 VEHICLE_LOD_BIAS=0.5 35.5 ms 74.2 ms 579 7 +26% fps
medium LOD_SCALE=0.10 SMALL_CULL=12 VEHICLE_LOD_BIAS=2.5 LOW_SHADOWS=1024 SHADOW_CASCADES=2 WORLD_DIST_SCALE=0.45 30.0 ms 58.9 ms 159 6 +49% fps
low LOD_SCALE=0.05 SMALL_CULL=16 VEHICLE_LOD_BIAS=4 LOW_SHADOWS=512 SHADOW_CASCADES=1 WORLD_DIST_SCALE=0.25 28.0 ms 48.5 ms 66 10 +60% fps

Draws per frame on the same stretch: 8,491 stock, 5,694 high, 4,867 medium, 4,451 low. The first minute alone (before the turn reaches the busier views) shows less: +11%, +23% and +26% fps.

Every switch at its minimum (all 13 here plus the three LOD switches at their limits), on a separate 3-minute sweep: 26.0 ms mean against about 46 ms stock, frames >= 100 ms 5 against 57.

Picture. At street level in our screenshots, high and medium look close to stock: fewer distant props and vehicles. At the minimum, distant detail is clearly reduced (a far tower drops to a simpler model, distant palms and cars and a nearby bush are gone, fewer shadows). No corruption or missing geometry seen up close, by eye on single screenshots only.

Caveats: one run per preset in a single scene; between two runs of the same settings we usually see about +-15 frames >= 100 ms, which is well below these differences.

**@⁠zocram4cc** on GitHub · 2026-12-02 19:16 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/211#issuecomment-7355911365) Confirming the uplift on another card and CPU. **Setup.** RX 6900 XT 16 GB (RDNA 2, PCIe 3.0, Resizable BAR), Ryzen 7 5800X3D, Linux, Proton, patched Mesa 26.3.1. Series S profile, 1280x720 render, FidelityFX to 1920x1080, ray tracing off, a diagnostics build of a fork that carries this PR's commit unchanged. Every patch site reported `Done` (the byte checks passed). **Method.** A scripted camera turn in place on a street (the right stick held from 80 s on), the same save for every run, one run per preset, 36 five-second frame-rate lines in the world (3 minutes). The presets are this PR's measured stacks, without the render-scale step. Stock is a separate run of the same build. | Preset | Switches | Mean frame | Median of 5-s p99 | Frames >= 50 ms | Frames >= 100 ms | vs stock | |---|---|---:|---:|---:|---:|---:| | stock | none | 44.7 ms | 95.6 ms | 1,138 | 43 | - | | high | `LOD_SCALE=0.35 SMALL_CULL=2.5 VEHICLE_LOD_BIAS=0.5` | 35.5 ms | 74.2 ms | 579 | 7 | +26% fps | | medium | `LOD_SCALE=0.10 SMALL_CULL=12 VEHICLE_LOD_BIAS=2.5 LOW_SHADOWS=1024 SHADOW_CASCADES=2 WORLD_DIST_SCALE=0.45` | 30.0 ms | 58.9 ms | 159 | 6 | +49% fps | | low | `LOD_SCALE=0.05 SMALL_CULL=16 VEHICLE_LOD_BIAS=4 LOW_SHADOWS=512 SHADOW_CASCADES=1 WORLD_DIST_SCALE=0.25` | 28.0 ms | 48.5 ms | 66 | 10 | +60% fps | Draws per frame on the same stretch: 8,491 stock, 5,694 high, 4,867 medium, 4,451 low. The first minute alone (before the turn reaches the busier views) shows less: +11%, +23% and +26% fps. Every switch at its minimum (all 13 here plus the three LOD switches at their limits), on a separate 3-minute sweep: 26.0 ms mean against about 46 ms stock, frames >= 100 ms 5 against 57. **Picture.** At street level in our screenshots, high and medium look close to stock: fewer distant props and vehicles. At the minimum, distant detail is clearly reduced (a far tower drops to a simpler model, distant palms and cars and a nearby bush are gone, fewer shadows). No corruption or missing geometry seen up close, by eye on single screenshots only. Caveats: one run per preset in a single scene; between two runs of the same settings we usually see about +-15 frames >= 100 ms, which is well below these differences.
github manually merged commit afa4b9b2f3 into main 2026-12-02 20:24:18 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.