summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md207
1 files changed, 136 insertions, 71 deletions
diff --git a/README.md b/README.md
index 1b08742..dff417c 100644
--- a/README.md
+++ b/README.md
@@ -1,98 +1,163 @@
-# Decky Framegen Plugin
+# Decky Framegen
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/B0B71HZTAX)
-A Steam Deck plugin that enables DLSS upscaling and Frame Generation on handhelds by utilizing the latest OptiScaler and supporting modification software. This plugin automatically installs and manages all necessary components for FSR-based frame generation in games that support DLSS, or OptiFG for adding FG to games that do not have any existing FG pathway (highly experimental)
+Decky Framegen now treats OptiScaler as a **prefix-managed per-game runtime** instead of a game-folder mod installer.
-## What This Plugin Does
+## What changed
-This plugin uses OptiScaler to replace DLSS calls with FSR3/FSR3.1, giving you:
+The plugin no longer needs to copy OptiScaler into the game install directory.
-- **Frame Generation**: Smooth out your frame rate using AMD's FSR3 pathways
-- **Upscaling**: Improves performance while maintaining visual quality using FSR and XESS using DLSS FSR or XESS inputs. Upgrade FSR 2 games to FSR 3.1.4 or XESS for better visual quality.
-- **Easy Management**: One-click installation and game patching/unpatching through the Steam Deck interface. No going into desktop mode every time you want to add or remove OptiScaler from a game!
+Instead, it:
-## Features
+- installs a shared OptiScaler runtime under `~/fgmod`
+- stages OptiScaler into `compatdata/<appid>/pfx/drive_c/windows/system32` at launch time
+- keeps a writable per-game config under `compatdata/<appid>/optiscaler-managed`
+- restores the original Wine/Proton proxy DLL on cleanup
+- parses the bundled OptiScaler template INI to expose real config sections/settings in Decky UI
+- autosaves config changes immediately
+- mirrors config changes into the live prefix copy while the selected game is running
-### Core Functionality
-- **One-Click Setup**: Automatically downloads and installs OptiScaler into a "fgmod" directory
-- **Smart Installation**: Handles all required dependencies and library files
-- **Game Patching**: Easy copy-paste launch commands for enabling/disabling the mod per game
-- **OptiScaler Wiki**: Direct access to OptiScaler documentation and settings via a webpage launch button right inside the plugin.
+That makes the integration:
-## How to Use
+- non-invasive
+- reversible
+- per-game
+- much closer to a launcher/runtime feature than a file-drop mod installer
-1. **Install the Plugin**: Download and install through Decky Loader "install from zip" option in developer settings
-2. **Setup OptiScaler**: Open the plugin and click "Setup OptiScaler Mod"
-3. **Configure Games**: For each game you want to enhance:
- - Click "Copy Patch Command" in the plugin
- - Go to your game's Properties → Launch Options in Steam
- - Paste the command: `~/fgmod/fgmod %command%`
-4. **Enable Features**: Launch your game and enable DLSS in the graphics settings
-5. **Advanced Options**: Press the Insert key in-game for additional OptiScaler settings
+## Current default behavior
-### Removing the Mod from Games
-- Click "Copy Unpatch Command" and replace the launch options with: `~/fgmod/fgmod-uninstaller.sh %command%`
-- Run the game at least once to make the uninstaller script run. After you can leave the launch option or remove it
+Default copied launch command:
-### Configuring OptiScaler via Environment Variables
-As of v0.15.1, you can update OptiScaler settings before a game launches by adding environment variables.
-This is useful if you plan to use the same settings across multiple games so they are pre-configured by the time you launch them.
-
-For example, considering the following sample from the OptiScaler.ini config file:
+```bash
+~/fgmod/fgmod %command%
```
-[Upscalers]
-Dx11Upscaler=auto
-Dx12Upscaler=auto
-VulkanUpscaler=auto
-
-[FrameGen]
-Enabled=auto
-FGInput=auto
-FGOutput=auto
-DebugView=auto
-DrawUIOverFG=auto
+
+Cleanup command:
+
+```bash
+~/fgmod/fgmod-uninstaller.sh %command%
```
-We can decide to set `Dx12Upscaler=fsr31` to enable FSR4 in DX12 games by default. This works because the option name `Dx12Upscaler` is unique throughout the file but for options that appear multiple times like `Enabled`, you can prefix the option name with the section name like `FrameGen_Enabled=true`.
-You can provide section names for all options if you want to be explicit. You can also prefix `Section_Option` with `OptiScaler` to ensure no conflict with other commands.
-Here's the breakdown of supported formats:
-- `OptiScaler_Section_Option=value` - Full format (foolproof)
-- `Section_Option=value` - Short format (recommended)
-- `Option=value` - Minimal format (only works if the option name appears once in OptiScaler.ini)
+Proxy selection order inside the wrapper is:
+
+1. `OPTISCALER_PROXY` / `DLL` env override if present
+2. saved per-game preferred proxy
+3. fallback `winmm`
+
+## How to use
+
+1. Install the plugin zip through Decky Loader.
+2. Open Decky Framegen.
+3. Press **Install Prefix-Managed Runtime**.
+4. Enable a game from the **Steam game integration + live config** section, or copy the launch command manually.
+5. Launch the game.
+6. Press **Insert** in-game to open the OptiScaler menu.
+7. If you want to change config while the game is open, open Decky and edit the selected running game there.
+
+## Steam game integration + live config
+
+The plugin can now:
+
+- detect the current running Steam game
+- pick any installed Steam game from a dropdown
+- enable the generic prefix-managed launch option automatically
+- disable a game and clean its compatdata-managed OptiScaler state
+- read the selected game's managed or live `OptiScaler.ini`
+- persist per-game proxy preference
+- browse parsed OptiScaler config sections
+- render section settings with Decky dropdowns, sliders, and text fields
+- autosave changes immediately
+- push config changes into the currently staged live prefix copy while the game is running
+
+Enable writes this launch option:
-**Example:**
```bash
-# Enable frame generation with XeFG output
-FrameGen_Enabled=true FGInput=fsrfg FGOutput=xefg ~/fgmod/fgmod %command%
+~/fgmod/fgmod %COMMAND%
+```
+
+## Config persistence
-# Set DX12 upscaler to FSR 3.1 (Upgrades to FSR4)
-Dx12Upscaler=fsr31 ~/fgmod/fgmod %command%
+Per-game config lives here:
+
+```text
+compatdata/<appid>/optiscaler-managed/OptiScaler.ini
```
-**Notes:**
-- Environment variables override the OptiScaler.ini file on each game launch
-- Hyphenated section names like `[V-Sync]` can be accessed like `VSync_Option=value`
-- If an option name appears in multiple sections of the OptiScaler.ini file, use the `Section_Option` or `OptiScaler_Section_Option` format
+During launch the wrapper copies that INI into:
-## Technical Details
+```text
+compatdata/<appid>/pfx/drive_c/windows/system32/OptiScaler.ini
+```
-### What's Included
-- **[OptiScaler 0.9.0-pre11](https://github.com/xXJSONDeruloXx/OptiScaler-Bleeding-Edge/releases/tag/opti-9-pre-11)**: Bleeding-edge OptiScaler bundle used by this plugin, paired with the RDNA2-optimized `amd_fidelityfx_upscaler_dx12.dll` override for Steam Deck compatibility
-- **Nukem9's DLSSG to FSR3 mod**: Allows use of DLSS inputs for FSR frame gen outputs, and xess or FSR upscaling outputs
-- **FakeNVAPI**: NVIDIA API emulation for AMD/Intel GPUs, to make DLSS options selectable in game
-- **Supporting Libraries**: All required DX12/Vulkan libraries (libxess.dll, amd_fidelityfx, etc.)
+When the game exits, the staged INI is synced back to the managed location.
+## Live editing caveat
-## Credits
+The plugin can write directly into the live prefix INI while the game is running.
+
+That means:
+
+- the file is updated immediately
+- persistence is preserved
+- some settings may still require OptiScaler or the game to reload/relaunch before they fully take effect, depending on what OptiScaler hot-reloads internally
+
+So: **live file update is supported**, but **live behavioral reload still depends on OptiScaler/game behavior**.
+
+## Supported proxy values
+
+- `winmm`
+- `dxgi`
+- `version`
+- `dbghelp`
+- `winhttp`
+- `wininet`
+- `d3d12`
-### Core Technologies
-- **[Nukem9](https://github.com/Nukem9/dlssg-to-fsr3)** - Creator of the DLSS to FSR3 mod that makes frame generation possible
-- **[Cdozdil/OptiScaler Team](https://github.com/optiscaler/OptiScaler)** - OptiScaler mod that provides the core functionality and bleeding-edge improvements
-- **[Artur Graniszewski](https://github.com/artur-graniszewski/DLSS-Enabler)** - DLSS Enabler that allows DLSS features on non-RTX hardware
-- **[FakeMichau](https://github.com/FakeMichau)** - Various essential tools including fgmod scripts, innoextract, and fakenvapi for AMD/Intel GPU support
+## Environment-driven INI updates
-### Community & Documentation
-- **[Deck Wizard](https://www.youtube.com/watch?v=o_TkF-Eiq3M)** - Extensive community support including comprehensive guides, promotional content, thorough testing and feedback, custom artworks, and tutorial videos. His passionate advocacy and continuous support have been instrumental in Decky Framegen's success.
+The wrapper still supports environment-based INI overrides. Example:
+
+```bash
+Dx12Upscaler=fsr31 FrameGen_Enabled=true ~/fgmod/fgmod %command%
+```
+
+## Technical summary
+
+At launch the runtime:
+
+1. resolves `STEAM_COMPAT_DATA_PATH`
+2. creates `compatdata/<appid>/optiscaler-managed`
+3. preserves the original selected proxy DLL as `<proxy>-original.dll`
+4. stages OptiScaler and helper DLLs into prefix `system32`
+5. sets `WINEDLLOVERRIDES=<proxy>=n,b`
+6. launches the game
+7. syncs `OptiScaler.ini` back to the managed directory on exit
+
+## Build notes
+
+Local frontend build:
+
+```bash
+pnpm build
+```
+
+Decky zip build:
+
+```bash
+bash .vscode/build.sh
+```
+
+If Decky CLI is missing, run:
+
+```bash
+bash .vscode/setup.sh
+```
+
+## Credits
-- **The DLSS2FSR Community** - Ongoing support and guidance for understanding the various mods and tools
+- [Nukem9](https://github.com/Nukem9/dlssg-to-fsr3)
+- [OptiScaler / cdozdil](https://github.com/optiscaler/OptiScaler)
+- [Artur Graniszewski / DLSS Enabler](https://github.com/artur-graniszewski/DLSS-Enabler)
+- [FakeMichau](https://github.com/FakeMichau)
+- Deck Wizard and the DLSS2FSR community