﻿The Witcher 3: Wild Hunt - graphics optimization mod for Steam Deck: what was changed
Game version: 5.0.16 (Steam, DirectX 12), witcher3.exe 5.0.16.41566, Steam Build ID 26238013

HOW IT WAS TUNED
- Goal: more frames on Steam Deck without a visible loss in image quality. Expensive work (geometry, shadows, grass,
  ambient occlusion) is cut inside menu levels and below the menu minimum; cheap quality (textures, anisotropy,
  sharpening) stays.
- Measurements: static scene, 20-25 seconds (mangoapp), controls at the start and end of every series. Most hidden
  settings were compared "before/after" directly in the memory of the running game, with no menu and no restart.
- Bottlenecks: in the Novigrad market - the render thread and the GPU under the shared 18 W limit; in the forest - the GPU only.

1. bin\config\r4game\user_config_matrix\pc\graphics.xml (menu option levels)
- Detail level, all levels: object draw distance (MeshRenderingDistanceScale) 1.5 -> 1.0.
  Novigrad: +1.7-2.0 fps. 1.0 is the engine minimum.
- Number of background characters (SpawnedLimit): 75/100/130/150/160 -> 30/50/75/100/130.
  75 -> 50: +1.4 fps and +5 to 1% low. The main lever in cities.
- Shadow quality: High - map 2048 -> 1536 and filtering (CascadeShadowQuality) 1 -> 0. Cost of High over Medium
  1.9 ms -> 0.65 ms. Ultra 3072 -> 2048, Ultra+ 4096 -> 3072.
- Grass density (GrassDensity): 1400/2400/3500/4750/6000 -> 1000/1400/2400/3500/4750.
- Foliage visibility range Low: grass distance (GrassDistanceScale) 1.0 -> 0.8.
  Together with grass density: forest +2.2 fps and +2 to 1% low.
- Sharpening: no longer blocked with FSR (disableIfFSR tag removed).

2. bin\config\platform\pc\rendering.ini (hidden settings, not in the menu)
Some engine settings are not read from the user settings file, but the game accepts them from this file. Added:
- [Rendering/Shadows] ScreenShadowsSampleDensity 80 -> 40, ScreenShadowsSampleDensityCharacters 120 -> 60:
  screen space shadows are lightened, not disabled. +0.5 fps, no visible difference.
- [Physics] LODDistanceLimit 75 -> 30: full object physics only within 30 m. +0.5-0.7 fps.
- [Rendering/DRS] DynamicResolutionPercentage -1 -> 0.25: with FSR Quality and Dynamic resolution on, the internal
  resolution is held at 1004x624 (see 3).

3. FSR and resolution
- The game ships FSR 3.1.5. Stock Quality renders 853x533: in Novigrad the frame hits the CPU limit and 33-40 ms
  stutters appear (1% low 26). The game has no intermediate modes.
- Dynamic resolution can use any step from 936x584 to 1280x800, but in automatic mode on the Deck it stutters on every
  resolution change. The mod locks one step.
- Novigrad (fps / 1% low): native 1280x800 + FXAA 47.9 / 44.9; 1036x648 48.8 / 44.1; 1004x624 49.8 / 40.5-43.8;
  968x604 50.9 / 37.9; 936x584 52.2 / 37.2. 1004x624 is the fastest without stutter.
- FSR sharpening is controlled by the Sharpening option.

4. Menu settings that are part of the preset
- GTAO Medium instead of High: +1.0 fps.
- Screen space reflections: off. In the forest they cost 13 ms (45.8 -> 28.5 fps) and have no quality settings.
- mod.io: off. +0.5 fps, smoother frame times.

5. Tested and not included (no effect, or not worth the image loss)
1200 MB texture pool, simpler character and object LOD, character shadow fallback distance, off-screen particle
simulation, parallel shadow collection and culling, Umbra culling batches, small-object hide distances, entity
precache distance, entity pool limit, reflection probe samples, tree shadows, decal distance, texture MipBias,
GTAO settings (radius, denoise), intermediate GTAO levels, shadow cascade count and distances, terrain tessellation,
light shafts, bloom.

6. Found in the exe but not included
- FSR frame generation is blocked by the game itself under Proton: it checks whether it runs under Wine. With the block
  removed, frame generation turns on, but Geralt's hair becomes a white blob and the FSR threads take power away from
  the GPU: fewer frames and more stutter.
- GTAO quality levels are a "slices x steps" table in the exe (1x2, 2x2, 3x3, 9x3).
- Patching the FSR resolution divisor in the exe breaks the image: the sizes are computed in several places.

AUTHOR
Made by Not_Oleg.
