diff --git a/docs/glacier2/launch_arguments.md b/docs/glacier2/launch_arguments.md new file mode 100644 index 00000000..1ab7f62f --- /dev/null +++ b/docs/glacier2/launch_arguments.md @@ -0,0 +1,700 @@ +--- +sidebar_position: 1 +title: Launch arguments +--- + +import GameFilter from "@site/src/components/GameFilter" + +The Glacier engine exposes two types of launch arguments: + +- **-ao arguments** that configure the engine itself. +- **Console commands** registered through the game’s `ConsoleCmd` system. These can be provided in thumbs.dat or as launch arguments, and are usually more specific to the game’s implementation. + +> The values documented below are based on reverse-engineering and documentation on the options can be incomplete or missing + +Launch arguments use the following format: + +```text +-ao +ConsoleCmd +``` + +--- + + + +## The `-ao` arguments + +### Benchmark + +#### Start Benchmark + +> `-ao start_benchmark <0-1>` + +Starts the benchmark scene. +`0`: Off / `1`: On + +#### Benchmark Scene Index + +> `-ao benchmark_scene_index <1-3>` + +Selects the benchmark scene to run. +The mapping from index to a scene is defined the the `BENCHMARK_SCENE` variables set in the `thumbs.dat` file. + +#### Auto Quit Engine + +> `-ao auto_quit_engine ` + +Defines a timeout in seconds before the engine automatically quits. + +### Display + +#### Resolution + +> `-ao resolution x` + +Accepts ``x``. Sets the resolution in width × height format. + +#### Fullscreen + +> `-ao fullscreen <0-3>` + +| Value | Setting | +|---:|---| +| `0` | Windowed | +| `1` | Fullscreen | +| `2` | Exclusive Fullscreen | + +#### Monitor + +> `-ao monitor <0-n>` + +Accepts a value between 0 and ``. Selects the output monitor. + +#### DXGI Adapter + +> `-ao dxgiadapter <0-n>` + +Accepts a value between 0 and ``. Selects the rendering device/GPU. + +*_The adapter list includes the software renderer_ + +--- + +### Graphics Debugging + +
+ +#### Limit Multi-GPU + +> `-ao limitmultigpu ` + +
+ +
+ +#### Disable Temp Alloc Reuse + +> `-ao disabletempallocreuse ` + +
+ +
+ +#### Disable Async Compute + +> `-ao disableasynccompute ` + +
+ +
+ +#### Leak Virtual Back Buffer + +> `-ao leakvirtualbackbuffer ` + +
+ +
+ +#### Debug Back Buffer + +> `-ao debugbackbuffer ` + +
+ +
+ +#### Disable Discard + +> `-ao disablediscard ` + +
+ +
+ +#### Enable Device Trim + +> `-ao EnableDeviceTrim ` + +Enables renderDevice [trimming](https://learn.microsoft.com/en-us/windows/win32/api/dxgi1_3/nf-dxgi1_3-idxgidevice3-trim). + +
+ +
+ +#### Device Trim Wait Copy Queues + +> `-ao DeviceTrimWaitCopyQueues ` + +Controls whether renderDevice trimming waits for copy queues. + +
+ +
+ +#### Clear Driver Pipeline Cache + +> `-ao ClearDriverPipelineCache ` + +Clears the Vulkan [Pipeline Cache](https://docs.vulkan.org/guide/latest/pipeline_cache.html). + +
+ +#### Full Memory Dump + +> `-ao FullMemoryDump ` + +--- + +## ConsoleCmd arguments + +The `ConsoleCmd` system allows the commands to be defined as either a launch arguments or in the `thumbs.dat` file. All of the following `ConsoleCmd` variables can be defined in either of those places. There are additional `ConsoleCmd` options found inside the `thumbs.dat`. They cannot be defined as launch arguments, unless they are described here. + +--- + +### Graphics Settings + +
+ +#### Shadow Resolution + +> `settings_setshadowresolution <0-2>` + +| Value | Setting | +|---:|---| +| `0` | Low — 512 | +| `1` | Medium — 1024 | +| `2` | High — 2048 | + +
+ +
+ +#### Shadow Maps + +> `settings_setshadowmaps <0-3>` + +| Value | Setting | +|---:|---| +| `0` | Low — 4 | +| `1` | Medium — 8 | +| `2` | High — 16 | +| `3` | Ultra — 32 | + +
+ +
+ +#### Shadow Quality + +> `settings_setshadowquality <0-3>` + +| Value | Setting | Shadow Maps | +|---:|---|---:| +| `0` | Low | 4 | +| `1` | Medium | 8 | +| `2` | High | 16 | +| `3` | Ultra | 32 | + +
+ +
+ +#### Simulation Quality + +> `settings_setsimulationquality <0-2>` + +| Value | Setting | +|---:|---| +| `0` | Base | +| `1` | Better | +| `2` | Best | + +
+ +#### Detail LOD + +> `settings_setdetaillod <0-3>` + +| Value | Setting | +|---:|---| +| `0` | Low | +| `1` | Medium | +| `2` | High | +| `3` | Ultra | + +#### Texture Filtering + +> `settings_settexturefilter <0-4>` + +| Value | Setting | +|---:|---| +| `0` | Trilinear | +| `1` | Anisotropic 2× | +| `2` | Anisotropic 4× | +| `3` | Anisotropic 8× | +| `4` | Anisotropic 16× | + +#### Texture Quality + +> `settings_settexturequality <0-2>` + +| Value | Setting | +|---:|---| +| `0` | Low | +| `1` | Normal | +| `2` | High | + +
+ +#### Anti-Aliasing + +> `settings_setantialiasing <0-2>` + +| Value | Setting | +|---:|---| +| `0` | Off | +| `1` | FXAA | +| `2` | SMAA | + +
+ +
+ +#### SSAO + +> `settings_setssao <0-5>` + +| Value | Setting | +|---:|---| +| `0` | Off | +| `1` | Minimum | +| `2` | Low | +| `3` | Medium | +| `4` | High | +| `5` | Ultra | + +
+ +
+ +#### ASSAO Quality + +> `settings_setassaoquality ` + +Controls ASSAO quality. + +
+ +
+ +#### Reflection Quality + +> `settings_setreflectionquality <0-3>` + +| Value | Setting | +|---:|---| +| `0` | Off | +| `1` | Low | +| `2` | Medium | +| `3` | High | + +
+ +
+ +#### Screen-Space Shadows + +> `settings_setscreenspaceshadows ` + +Controls screen-space shadow rendering. + +
+ +
+ +#### Screen-Space Reflections (SSR) Quality + +> `settings_setssrquality <0-3>` + +| Value | Setting | +|---:|---| +| `0` | Off | +| `1` | Low | +| `2` | Medium | +| `3` | High | + +
+ +
+ +#### Motion Blur + +> `settings_setmotionblur <0-3>` + +| Value | Setting | +|---:|---| +| `0` | Off | +| `1` | Low | +| `2` | Medium | +| `3` | High | + +
+ +
+ +#### Sharpening + +> `settings_setsharpening <0-3>` + +| Value | Setting | +|---:|---| +| `0` | Off | +| `1` | Weak | +| `2` | Moderate | +| `3` | Strong | + +
+ +
+ +#### VRS Profile + +> `settings_setvrsprofile ` + +Controls the Variable Rate Shading profile. + +
+ +
+ +#### Terrain Quality + +> `settings_setterrainquality ` + +Controls terrain rendering quality. + +
+ +
+ +#### Volumetric Fog Quality + +> `settings_setvolumetricfogquality ` + +Controls volumetric fog quality. + +
+ +
+ +#### Volumetric Effects Quality + +> `settings_setvolumetriceffectsquality ` + +Controls the quality of volumetric effects. + +
+ +
+ +#### Global Illumination Quality + +> `settings_setglobalilluminationquality ` + +Controls global illumination quality. + +
+ +--- + +
+ +### Ray Tracing & Path Tracing +
+ + +
+ +#### Ray Tracing + +> `settings_rtenabled <0-1>` + +`0`: Off / `1`: On + +
+ +
+ +#### Ray-Traced Shadows + +> `settings_rtshadowenabled <0-1>` + +`0`: Off / `1`: On + +
+ +
+ +#### Ray-Traced Reflections + +> `settings_rtreflectionenabled <0-1>` + +`0`: Off / `1`: On + +
+ +
+ +#### Path Tracing + +> `settings_pathtracingenabled ` + +007 First Light seems to replace the individual HITMAN 3 ray-tracing toggles with a single path-tracing toggle. + +
+ +--- + +
+ +### Upscaling & Frame Generation +
+ +
+ +#### SSAA Method + +> `settings_setssaamethod <0-3>` + +| Value | Method | +|---:|---| +| `0` | Off | +| `1` | XeSS | +| `2` | DLSS | +| `3` | FSR 2 | + +
+ +
+ +#### SSAA Quality + +> `settings_setssaaquality <0-3>` + +| Value | Setting | +|---:|---| +| `0` | Performance | +| `1` | Balanced | +| `2` | Quality | +| `3` | Ultra Quality | + +
+ +
+ +#### DLSS + +> `settings_setdlss <0-1>` + +`0`: Off / `1`: On + +
+ +
+ +#### DLSS Quality + +> `settings_setdlssquality ` + +Replaces the HITMAN 3 `settings_setdlss` on/off toggle with a quality setting. + +
+ +
+ +#### DLSS Ray Reconstruction + +> `settings_setdlssrr ` + +Controls DLSS Ray Reconstruction. + +
+ +
+ +#### DLSS Frame Generation + +> `settings_SetDLSSG <0-1>` + +`0`: Off / `1`: On + +007 First Light exposes the same feature under: `settings_setdlssframegen`. + +
+ +
+ +#### DLSS Frame Generation + +> `settings_setdlssframegen <0-1>` + +`0`: Off / `1`: On + +HITMAN 3 exposes the same feature under: `settings_SetDLSSG`. + +
+ +
+ +#### FSR Resolution + +> `settings_setfsrresolution ` + +Controls the FSR render resolution. + +
+ +
+ +#### NVIDIA Reflex + +> `settings_SetReflex <0-2>` + +| Value | Setting | +|---:|---| +| `0` | Off | +| `1` | On | +| `2` | On + Boost | + +
+ +--- + +### Display Settings + +#### VSync + +> `settings_vsync <0-1>` + +`0`: Off / `1`: On + + +#### VSync Interval + +> `settings_setvsyncinterval <1-2>` + +| Value | Setting | +|---:|---| +| `1` | 100% FPS | +| `2` | 50% FPS | + + +#### Supersampling + +> `settings_setsupersampling <0.0-inf>` + +Recommended range: + +```text +1.0 – 2.0 +``` + +#### HDR + +> `settings_sethdr <0-1>` + +`0`: Off / `1`: On + +--- + +### Profiling and Debugging + +#### Profile Data + +> `ui_showprofiledata <0-1>` + +`0`: Off / `1`: On + +Shows FPS statistics on the top left of the screen, used during benchmarks. + +
+ +#### Profile Statistics + +> `ui_showprofilestats` + +Displays profile statistics. + +`0`: Off / `1`: On + +Shows level statistics on the top left of the screen, used during benchmarks. + +
+ +#### FPS Limiter + +> `enablefpslimiter <0-1>` + +`0`: Off / `1`: On + +
+ +#### Render Discard + +> `render_discard <0-1>` + +`0`: Off / `1`: On + +
+ +
+ +#### Sound Simulation Quality Override + +> `sound_simulationqualityoverride ` + +Overrides the simulation quality used by the sound system. + +
+ +--- + +
+ +### Online / Development Commands + +**Commands:** `online_EpicDevId `, `online_EpicDevToken ` + +These are used to configure the Epic Online Services SDK + +
+ +--- + +## Misc launch arguments + +- HITMAN (2016) and HITMAN 2 (2018) support selecting the Direct3D rendering API: +Launching with `-D3D12` starts the Direct3D 12 version of HITMAN. +- The `launcher.exe` found in HITMAN (2016), HITMAN 2 and HITMAN 3 can be omitted by adding the `-SKIP_LAUNCHER` argument to it. \ No newline at end of file diff --git a/src/components/GameFilter/index.js b/src/components/GameFilter/index.js new file mode 100644 index 00000000..2db4f692 --- /dev/null +++ b/src/components/GameFilter/index.js @@ -0,0 +1,71 @@ +import React, { useEffect, useState } from "react" +import styles from "./styles.module.css" + +const GAMES = [ + { code: "2016", label: "HITMAN (2016)" }, + { code: "h2", label: "HITMAN 2" }, + { code: "h3", label: "HITMAN 3" }, + { code: "007", label: "007 First Light" }, +] + +const PARAM = "game" + +function loadSelection() { + if (typeof window === "undefined") return null + + const value = new URLSearchParams(window.location.search).get(PARAM) + return GAMES.some((game) => game.code === value) ? value : null +} + +function writeSelection(selected) { + const url = new URL(window.location.href) + + if (selected === null) { + url.searchParams.delete(PARAM) + } else { + url.searchParams.set(PARAM, selected) + } + + window.history.replaceState(null, "", url) +} + +export default function GameFilter({ label = "Show sections for:" }) { + const [selected, setSelected] = useState(null) + + useEffect(() => { + setSelected(loadSelection()) + }, []) + + useEffect(() => { + const entries = document.querySelectorAll("[data-games]") + entries.forEach((entry) => { + const games = entry.getAttribute("data-games").split(",") + const visible = selected !== null && games.includes(selected) + entry.classList.toggle(styles.hidden, !visible) + }) + }, [selected]) + + const toggleGame = (code) => { + setSelected((prev) => { + const next = prev === code ? null : code + writeSelection(next) + return next + }) + } + + return ( +
+ {label} + {GAMES.map(({ code, label: gameLabel }) => ( + + ))} +
+ ) +} \ No newline at end of file diff --git a/src/components/GameFilter/styles.module.css b/src/components/GameFilter/styles.module.css new file mode 100644 index 00000000..6fa0c2b4 --- /dev/null +++ b/src/components/GameFilter/styles.module.css @@ -0,0 +1,30 @@ +.filterBar { + position: sticky; + top: calc(var(--ifm-navbar-height, 60px) + 0.5rem); + z-index: 1; + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 0.75rem; + padding: 0.6rem 1rem; + margin: 1rem 0; + background: var(--ifm-background-surface-color); + border: 1px solid var(--ifm-color-emphasis-300); + border-radius: var(--ifm-global-radius); +} + +.filterLabel { + font-weight: 600; +} + +.filterOption { + display: inline-flex; + align-items: center; + gap: 0.35rem; + cursor: pointer; + font-weight: normal; +} + +.hidden { + display: none !important; +}