Shift Engine Docs

These docs follow the main branch and can describe changes newer than v0.3.2. Release archives and checksums are published on GitHub Releases.

Performance

Shift Engine is designed to scale from integrated GPUs, handhelds and Apple Silicon up to 4K high-refresh desktops using one Vulkan codebase. All numbers on this page are measured directly from Release builds using the built-in --bench harness and tools/benchmark.py.

Architecture#

  • GPU-driven world rendering (WorldGpu) & 4-tier PVS/LOD: Colorado geometry and billboard trees are resident in GPU arenas, filtered by the disc's visibility tables (PVSZLookup) and 4-tier LOD selection, and culled on the GPU via compute shaders (world_cull.comp, tree_cull.comp) against the frustum and a hierarchical depth pyramid (hiz_gen.comp), emitting indirect draws with minimal CPU recording overhead.
  • Discard-free opaque passes and Early-Z sky: Opaque world surfaces render with early_fragment_tests (world_opaque / world_gpu_opaque), cutout foliage alpha-tests early, and the sky dome and stars render after opaque geometry at far depth so covered sky pixels are rejected by Early-Z (cutting sky GPU time at 4K from 0.37 ms to 0.03 ms).
  • Lazy render targets and optional SOTA / RT passes: Bloom, XeGTAO, Hi-Z SSR, occluded volumetric shafts, McGuire motion blur, FXAA, motion-vector, temporal-history, upscaler (CAS / FSR1 / TAAU / Apple MetalFX), cockpit-mirror and optional Vulkan hardware ray-tracing / path-tracing (ReSTIR DI + SVGF) targets are allocated only when active. World arenas, texture LRU caches, UI4 atlases and dynamic cubemaps scale with the selected preset, and cubemap/mirror updates are amortized across frames.
  • Zero-hitch streaming and hot car swap: Traffic spawns and despawns avoid vkDeviceWaitIdle() via spare frame descriptor sets and multi-frame retirement rings; MoltenVK splits offscreen rendering from swapchain presentation so GPU work never stalls behind nextDrawable. Switching cars, changing paint, installing upgrades or entering/leaving races hot-swaps the car in place (Showroom::reload_car()) without tearing down the renderer or world.
  • Parallel CPU pipeline and SIMD kernels: Archive decompression, world/collision/prop gathering, texture decoding and multi-car AI physics run on worker pools alongside x86-64 AVX2 and ARM64 NEON assembly hot-path kernels and the dedicated allocation-free RT audio thread. Live frame diagnostics include a 12-phase hitch profiler on F3.

Split bindless and TBDR#

Earlier Vulkan bindless renderers commonly use COMBINED_IMAGE_SAMPLER[4096], which exceeds the per-stage sampler limits on Apple Silicon (MoltenVK / Metal 3 Argument Buffers) and many Android Adreno/Mali drivers, forcing a slow CPU draw fallback.

Shift Engine avoids that fallback with three portability optimizations:

  • Split bindless descriptors: WorldGpu binds 1× immutable VK_DESCRIPTOR_TYPE_SAMPLER alongside VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE[4096], qualifying Apple Silicon MoltenVK and Android Turnip/Vulkan 1.1+ devices for the full GPU-driven world culling and Hi-Z path.
  • Persistent VkPipelineCache: All 30+ graphics and compute pipelines share a vendor-, device- and UUID-validated on-disk pipeline cache (vk_pipeline_cache.bin), eliminating repeated SPIR-V-to-Metal (MSL/PSO) and mobile driver shader compilation stalls across launches.
  • TBDR-friendly MSAA and render passes: MSAA color and offscreen depth attachments use VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT / lazily allocated memory with DONT_CARE store ops, and empty particle splits are skipped so tile-based GPUs (Apple Silicon, Adreno, Mali) keep MSAA resolves on-chip instead of flushing full-resolution buffers to RAM.

Measured numbers#

Uncapped v0.3.0 vs. PinyonShift (same hardware)#

Uncapped FPS: Shift Engine v0.3.0 vs. PinyonShift (Same Hardware) Shift Engine v0.3.0 PinyonShift 0 200 400 600 800 fps multivac · RTX 4080 8-car race, 720p no MSAA 836.8 119 fps 7.0× multivac · RTX 4080 8-car race, 1440p 4× MSAA 574.0 118 fps 4.9× multivac · RTX 4080 8-car race, 4K 4× MSAA 437.6 102 fps (no MSAA) 4.3× minivac · Apple M4 Pro 1440p 4× MSAA (race / roam) 225.0 (211.2 roam) ~51 fps 4.4× Odin 2 Portal · Adreno 740 720p smooth-60 (roam / race) 134.1 (103.6 race) ~60 fps 2.2× blindvac · Intel UHD 620 8-car race, 720p low-power 79.5 19.7 fps 4.0×
Uncapped average FPS on Shift Engine v0.3.0 (carview --bench, full FX + audio + HUD) vs. PinyonShift's published numbers on the exact same physical machines.
Uncapped FPS Comparison (Shift Engine v0.3.0 carview --bench vs. PinyonShift on identical hardware):
- multivac (Ryzen 7 5800X + RTX 4080), 8-car race 720p no MSAA: 836.8 fps vs 119 fps (7.0x)
- multivac (Ryzen 7 5800X + RTX 4080), 8-car race 1440p 4x MSAA: 574.0 fps vs 118 fps (4.9x)
- multivac (Ryzen 7 5800X + RTX 4080), 8-car race 4K 4x MSAA: 437.6 fps vs 102 fps no MSAA (4.3x)
- minivac (Apple M4 Pro, MoltenVK), 1440p 4x MSAA: 225.0 fps race / 211.2 fps free roam vs ~51 fps (4.1-4.4x)
- Odin 2 Portal (Snapdragon 8 Gen 2 / Adreno 740), 720p smooth-60: 134.1 fps free roam / 103.6 fps race vs ~60 fps (1.7-2.2x)
- blindvac (Core i5-8250U / Intel UHD 620), 8-car race 720p low-power: 79.5 fps vs 19.7 fps (4.0x)

Uncapped headless carview --bench runs on Shift Engine v0.3.0 (--bench-full-fx + --bench-audio + HUD enabled, 8–10 s per scenario after warmup, zero FPS cap or VSync) compared against PinyonShift's published measurements on the exact same four physical machines (multivac, minivac, Odin 2 Portal, and blindvac). Note that Shift Engine's headless benchmark omits swapchain presentation overhead, whereas PinyonShift's numbers are windowed/fullscreen captures (with PinyonShift CPU-bound on its draw recorder thread on desktop and GPU-bound on macOS, handheld, and iGPU).

Device & hardwareWorkload & resolutionShift Engine v0.3.0 (uncapped)PinyonShift (same device)Speedup
Desktop (multivac) — Ryzen 7 5800X, RTX 4080 (Win 11)8-car race, 720p (1x) no MSAA836.8 fps avg (1.16 ms p50)119 fps (8.41 ms)7.0×
Desktop (multivac) — Ryzen 7 5800X, RTX 4080 (Win 11)8-car race, 1440p (2x) 4× MSAA574.0 fps avg (1.63 ms p50)118 fps (8.5 ms, 240 cap)4.9×
Desktop (multivac) — Ryzen 7 5800X, RTX 4080 (Win 11)8-car race, 4K (3x) 4× MSAA (retail)437.6 fps avg (2.27 ms p50)102 fps (9.82 ms, no MSAA)4.3×
Desktop (multivac) — Ryzen 7 5800X, RTX 4080 (Win 11)8-car race, 4K (3x) ultra (XeGTAO + SSR)153.9 fps avg (6.53 ms p50)——
macOS (minivac) — Apple M4 Pro, MoltenVKFree roam, 720p (1x) 4× MSAA (retail)396.5 fps avg (2.53 ms p50)120 fps (8.35 ms, display cap)3.3×+
macOS (minivac) — Apple M4 Pro, MoltenVKFree roam, 1440p (2x) no MSAA (low)261.6 fps avg (3.73 ms p50)~82 fps3.2×
macOS (minivac) — Apple M4 Pro, MoltenVKFree roam / 8-car race, 1440p (2x) 4× MSAA (retail)211.2 / 225.0 fps avg (4.64 / 4.38 ms)~51 fps (19.5 ms)4.1–4.4×
macOS (minivac) — Apple M4 Pro, MoltenVK8-car race, 4K (3x) 4× MSAA (retail)128.4 fps avg (7.20 ms p50)——
Android (Odin 2 Portal) — Snapdragon 8 Gen 2, Adreno 740Free roam, 720p smooth-60 (2× MSAA)134.1 fps avg (7.50 ms p50)~60 fps (SMOOTH 60, Turnip)2.2×
Android (Odin 2 Portal) — Snapdragon 8 Gen 2, Adreno 7408-car race, 720p smooth-60 (2× MSAA)103.6 fps avg (9.45 ms p50)~60 fps (SMOOTH 60, Turnip)1.7×
Android (Odin 2 Portal) — Snapdragon 8 Gen 2, Adreno 7408-car race, 720p retail (4× MSAA)73.0 fps avg (13.47 ms p50)~52 fps (4× MSAA, Turnip)1.4×
Laptop (blindvac) — Core i5-8250U, Intel UHD 620 (Win 11)8-car race, 720p low-power (no MSAA)79.5 fps avg (12.52 ms p50)19.7 fps (51 ms, Ultra Low 30)4.0×
Laptop (blindvac) — Core i5-8250U, Intel UHD 620 (Win 11)8-car race, 720p low (shadows on)42.8 fps avg (23.34 ms p50)12.5 fps (76 ms, Low-spec 60)3.4×

Desktop (multivac — Ryzen 7 5800X + NVIDIA GeForce RTX 4080)#

Windows 11, AMD Ryzen 7 5800X (8C/16T), 128 GB RAM, NVIDIA GeForce RTX 4080 (driver 621.14, Vulkan 1.4), Release build (v0.3.0), uncapped (10 s, 2 s warmup, full FX + audio):

ScenarioResolution & presetAvg FPSp50 FPS (ms)1% lowCPU p50GPU p50VRAM
race_pack (8 cars)1280×720 low (1× MSAA)836.8859.9 (1.16 ms)562.91.12 ms0.42 ms1,120 MiB
race_pack (8 cars)1280×720 retail (4× MSAA)571.4623.9 (1.60 ms)334.41.55 ms0.65 ms1,405 MiB
race_pack (8 cars)1920×1080 high (4× MSAA)526.5553.9 (1.81 ms)339.21.75 ms1.58 ms1,533 MiB
race_pack (8 cars)2560×1440 retail (4× MSAA)574.0615.2 (1.63 ms)267.91.58 ms1.24 ms1,600 MiB
race_pack (8 cars)3840×2160 retail (4× MSAA)437.6440.0 (2.27 ms)293.41.61 ms2.20 ms1,913 MiB
race_pack (8 cars)3840×2160 ultra (4× MSAA + XeGTAO + SSR)153.9153.1 (6.53 ms)132.72.36 ms6.50 ms2,225 MiB
noon_cruise (free roam)1280×720 retail (4× MSAA)668.0755.4 (1.32 ms)113.01.28 ms0.62 ms1,149 MiB
noon_cruise (free roam)2560×1440 retail (4× MSAA)666.8694.4 (1.44 ms)250.51.29 ms1.36 ms1,344 MiB
noon_cruise (free roam)3840×2160 ultra (4× MSAA + XeGTAO + SSR)153.2153.2 (6.53 ms)132.42.05 ms6.50 ms1,969 MiB
cockpit_mirrors1920×1080 high (4× MSAA, 3-band mirrors)554.5583.5 (1.71 ms)220.81.66 ms1.44 ms1,277 MiB

Android Handheld (Odin 2 Portal — Snapdragon 8 Gen 2 / Adreno 740)#

AYN Odin 2 Portal (Android arm64, stock Qualcomm Adreno Vulkan driver 0676.53 over adb shell with -DSHIFT_ANDROID_EXECUTABLE=ON, v0.3.0, uncapped 8 s, 1.5 s warmup, full FX + audio). Note that these numbers were measured on the stock Qualcomm driver (CPU-culled gpu_world=0); in the APK build, bundled Mesa Turnip additionally unlocks GPU-driven world culling.

ScenarioResolution & presetAvg FPSp50 FPS (ms)1% lowCPU p50GPU p50VRAM
race_pack (8 cars)1280×720 low-power (1× MSAA)138.3140.5 (7.12 ms)79.62.01 ms6.98 ms361 MiB
race_pack (8 cars)1280×720 smooth-60 (2× MSAA)103.6105.8 (9.45 ms)83.72.28 ms9.45 ms409 MiB
race_pack (8 cars)1280×720 performance-120 (2× MSAA)83.584.6 (11.83 ms)64.93.06 ms11.61 ms465 MiB
race_pack (8 cars)1280×720 retail (4× MSAA + shadows)73.074.2 (13.47 ms)43.63.47 ms13.38 ms509 MiB
race_pack (8 cars)1920×1080 quality-30 (4× MSAA)39.339.5 (25.30 ms)32.94.71 ms25.19 ms623 MiB
race_pack (8 cars)1920×1080 ultra (4× MSAA + XeGTAO + SSR)20.020.1 (49.81 ms)9.96.22 ms49.63 ms769 MiB
noon_cruise (free roam)1280×720 smooth-60 (2× MSAA)134.1133.3 (7.50 ms)101.91.42 ms7.51 ms262 MiB
noon_cruise (free roam)1280×720 retail (4× MSAA + shadows)116.3118.1 (8.47 ms)66.41.99 ms8.66 ms354 MiB
noon_cruise (free roam)1920×1080 quality-30 (4× MSAA)48.548.6 (20.59 ms)29.53.39 ms20.61 ms461 MiB

Low-Spec Integrated GPU Laptop (blindvac — Core i5-8250U / Intel UHD 620)#

2017 laptop: Windows 11, Intel Core i5-8250U (4C/8T), 16 GB RAM, Intel UHD Graphics 620 (Vulkan 1.3.215, GPU-driven gpu_world=1), Release build (v0.3.0), uncapped (8 s, 1.5 s warmup, full FX + audio, 100.0% hitch-free across all six runs):

ScenarioResolution & presetAvg FPSp50 FPS (ms)1% lowCPU p50GPU p50VRAM
race_pack (8 cars)1280×720 low-power (1× MSAA)79.579.8 (12.52 ms)72.62.15 ms12.40 ms1,248 MiB
race_pack (8 cars)1280×720 low (1× MSAA + shadows)42.842.8 (23.34 ms)40.22.94 ms23.31 ms1,248 MiB
race_pack (8 cars)1280×720 retail (4× MSAA + shadows)27.927.9 (35.82 ms)26.43.78 ms35.71 ms1,376 MiB
noon_cruise (free roam)1280×720 low-power (1× MSAA)69.370.1 (14.27 ms)59.41.81 ms14.25 ms992 MiB
noon_cruise (free roam)1280×720 low (1× MSAA + shadows)41.442.0 (23.82 ms)37.22.33 ms23.76 ms992 MiB
noon_cruise (free roam)1280×720 retail (4× MSAA + shadows)27.727.9 (35.89 ms)24.13.27 ms35.84 ms1,376 MiB

Apple Silicon (minivac — Mac mini M4 Pro / MoltenVK)#

Apple M4 Pro Mac mini (macOS, Vulkan on Metal via MoltenVK, Release build v0.3.0, uncapped 10 s, 2 s warmup, full FX + audio). On macOS, WorldGpu indirect draw is currently disabled (gpu_world=False) to work around MoltenVK indirect-buffer issues, yet direct CPU-culled submission holds 0.66–1.35 ms CPU p50 across every resolution up to 4K while TBDR transient MSAA and persistent VkPipelineCache keep 1440p 4× MSAA above 210 fps and 4K 4× MSAA above 128 fps under 1.32 GiB VRAM:

ScenarioResolution & presetAvg FPSp50 FPS (ms)1% lowCPU p50GPU p50VRAM
race_pack (8 cars)1280×720 low (1× MSAA)516.9519.5 (1.93 ms)275.30.76 ms1.89 ms730 MiB
race_pack (8 cars)1280×720 retail (4× MSAA)378.7387.4 (2.58 ms)96.70.87 ms2.56 ms804 MiB
race_pack (8 cars)1920×1080 high (4× MSAA)159.2160.5 (6.23 ms)103.31.21 ms6.22 ms932 MiB
race_pack (8 cars)2560×1440 low (1× MSAA)260.9264.2 (3.78 ms)121.51.10 ms3.78 ms780 MiB
race_pack (8 cars)2560×1440 retail (4× MSAA)225.0228.2 (4.38 ms)116.21.12 ms4.39 ms996 MiB
race_pack (8 cars)3840×2160 retail (4× MSAA)128.4138.9 (7.20 ms)15.91.35 ms7.17 ms1,315 MiB
noon_cruise (free roam)1280×720 retail (4× MSAA)396.5395.5 (2.53 ms)289.80.75 ms2.53 ms804 MiB
noon_cruise (free roam)2560×1440 low (1× MSAA)261.6268.1 (3.73 ms)141.10.66 ms3.78 ms524 MiB
noon_cruise (free roam)2560×1440 retail (4× MSAA)211.2215.6 (4.64 ms)88.80.80 ms4.69 ms996 MiB
cockpit_mirrors1920×1080 high (4× MSAA, 3-band mirrors)168.7170.0 (5.88 ms)87.90.94 ms5.91 ms934 MiB

Steam Deck (earlier baseline)#

Earlier 60-second 1280×720 free-roam cruise measurement (carview --drive --bench, 3,601 frames) on Steam Deck LCD (AMD Van Gogh, RADV, SteamOS 3.7, low preset at powersave clocks): GPU 2.9 / 3.6 / 13.8 ms (p50/p95/max), CPU 2.85 / 3.9–4.05 ms (p50/p99).

Historical desktop optimization baseline (aa0fb579 → e1400b72)#

Earlier single-pass optimization comparison on multivac (Ryzen 7 5800X + RTX 4080, MSVC Release, --render-scale 0):

ScenarioBefore (aa0fb579)After (e1400b72)Improvement
1080p low-powerCPU 1.14 / 6.71 ms, GPU 0.55 ms, VRAM 639 MiBCPU 0.41 / 0.84 ms, GPU 0.31 ms, VRAM 323 MiB2.8× CPU p50, 8.0× CPU p99, −49% VRAM
1080p high (4× MSAA)CPU 1.58 / 6.61 ms, GPU 0.90 ms, VRAM 749 MiBCPU 0.70 / 1.37 ms, GPU 0.68 ms, VRAM 553 MiB2.3× CPU p50, 4.8× CPU p99, −26% VRAM
4K high (3840×2160)CPU 1.54 / 4.40 ms, GPU 2.49 ms, VRAM 1,331 MiBCPU 0.73 / 2.69 ms, GPU 2.04 ms, VRAM 943 MiB2.1× CPU p50, −0.45 ms GPU, −29% VRAM
4K ultra (SSAO + FXAA)CPU 2.05 / 10.04 ms, GPU 3.28 ms, VRAM 1,331 MiBCPU 0.75 / 1.54 ms, GPU 2.69 ms, VRAM 1,045 MiB2.7× CPU p50, 6.5× CPU p99, −0.59 ms GPU
1080p cockpit (3-band mirrors)CPU 2.72 / 9.92 ms, GPU 1.22 / 21.30 ms, VRAM 749 MiBCPU 0.81 / 3.25 ms, GPU 1.00 / 1.80 ms, VRAM 556 MiB3.4× CPU p50, 11.8× GPU p99
1080p 8-car race (FR22)CPU 4.48 / 17.38 ms, GPU 1.49 / 26.07 ms, VRAM 864 MiBCPU 1.16 / 1.72 ms, GPU 0.97 / 2.47 ms, VRAM 667 MiB3.9× CPU p50, 10.1× CPU p99, 1.54× GPU
1080p 240 km/h streaming (20 s)CPU 1.73 / 8.49 ms (23.9 ms hitch), GPU 0.78 msCPU 0.74 / 1.29 ms (0 stream hitch), GPU 0.59 ms2.3× CPU p50, 6.6× CPU p99, 0 hitch
Cold / warm startup (Colorado)11.18 – 13.51 s3.91 s cold / 3.74 s warm (vk_pipeline_cache.bin)3.0–3.4× faster
Car switch (R34 → DBS)~11,500 – 12,600 ms212.8 ms (535 textures & 4,556 GPU draws kept)54–59× faster

Presets and scaling#

PresetIntended hardwareKey defaults
retailDefault on desktop & Steam Deck1:1 Xbox 360 parity: 4× MSAA, 4× AF, 2-cascade shadows, bloom on, SOTA overlays off
low-powerMobile / handheld low-wattage, integrated GPUs1× MSAA, 540p + VRS on Android, shadows and bloom off, compact world arena and LRU
performance-120High-refresh handhelds & Android 120 Hz2× MSAA, 540p CAS + VRS on Android, 120 Hz display pacing + ADPF, 1024 2-cascade PCF shadows, bloom on
smooth-60Default on Android handhelds; Steam Deck 60 fps2× MSAA, 720p CAS + VRS on Android, 1024 2-cascade PCF shadows, bloom on, quarter-rate reflections
lowIntegrated GPUs, older laptops1× MSAA, reduced shadow and reflection budgets
quality-30Handheld 30 fps quality mode4× MSAA, low shadows, bloom on, quarter-rate reflections
highMainstream desktop GPUs (1080p–4K)4× MSAA, cascaded shadows, full world draw distance, bloom, SOTA passes
ultraHigh-end desktop GPUs & showcase OLEDFull resolution, XeGTAO, Hi-Z SSR, FXAA, highest shadow draw distance and cubemap budgets

Modifying any individual graphics option automatically switches the active preset to custom. Render scale (--render-scale), Shadow Draw Distance (Low through Ultra / Extended, including extended Mid/Far cascade & tree shadow range), CAS / FSR1 / TAAU / Apple MetalFX upscaling (and macOS 26+ MetalFX Frame Interpolation), live MSAA (Off/2x/4x), LOD controls, and Variable Rate Shading (--vrs, measured -18% GPU time at 1080p on RTX 4080) can be toggled live from the Settings overlay (F6) or settings.txt.

Running benchmarks#

carview embeds seven deterministic scenarios (noon_cruise, midnight_lights, cockpit_mirrors, race_pack, autoshow_studio, ui4_heavy, cold_boot_switch) and writes JSON schema v1 reports and per-frame CSV traces. tools/benchmark.py orchestrates suites locally or over SSH with zero external Python dependencies:

# Validate the benchmark script itself (no game files needed)
python tools/benchmark.py --self-test

# Run a quick local suite (noon_cruise + ui4_heavy)
python tools/benchmark.py run \
  --bin build/apps/carview/carview \
  --play /path/to/play \
  --suite quick \
  --device-label "Desktop RTX 4080" \
  --out out/benchmarks/desktop

# Run remotely on a macOS Apple Silicon host or Steam Deck over SSH
python tools/benchmark.py run \
  --remote mac-host \
  --bin ~/shift-engine/build/apps/carview/carview \
  --play ~/shift-play \
  --suite standard \
  --device-label "Apple M4 Pro (MoltenVK)" \
  --out out/benchmarks/m4_pro

# Generate a side-by-side Markdown report and self-contained HTML dashboard
python tools/benchmark.py compare \
  out/benchmarks/desktop/suite.json \
  out/benchmarks/m4_pro/suite.json \
  --out out/benchmarks/comparison.md \
  --html out/benchmarks/comparison.html

See docs/BENCHMARK.md for the full JSON schema v1 field list, Android adb commands and direct carview flags.