mirror of
https://github.com/lobomfz/VIctory-xmem.git
synced 2026-12-06 05:48:38 +00:00
FSR always output 3840x2160. It now takes VICTORY_OUTPUT when that is set (one of the title's modes) and keeps the stock 4K otherwise. The output patches the title's own upscaler gets at load are shared through output_patches() and applied to the prepared image before it is cached; the cache folder names the size.
37 lines
2.1 KiB
PowerShell
37 lines
2.1 KiB
PowerShell
# Starts the title on Windows with the settings this fork is played with.
|
|
# scripts\play.ps1 -Exe <path of your own copy's executable>
|
|
# -RayTracing the title's own ray-traced indirect light: lit interiors, about a third slower
|
|
# -Fsr4K PC FidelityFX 4.1.2 (quality, balanced or performance), to 3840x2160 or -More @{VICTORY_OUTPUT='2560x1440'}
|
|
# -Build target\diag (the default, the build all measurements are of) or target\release
|
|
# -More other settings: -More @{VICTORY_PANEL='1'}
|
|
# Run it from a normal window, not as administrator: the driver then keeps its shader cache elsewhere.
|
|
param(
|
|
[Parameter(Mandatory)][string]$Exe,
|
|
[switch]$RayTracing,
|
|
[ValidateSet('quality', 'balanced', 'performance')][string]$Fsr4K,
|
|
[ValidateSet('diag', 'release')][string]$Build = 'diag',
|
|
[hashtable]$More = @{}
|
|
)
|
|
$settings = @{ VICTORY_D3D12_DRED = 'light' }
|
|
if ($RayTracing) { $settings.VICTORY_BVH_BUILDER = '1' }
|
|
if ($Fsr4K) { $settings.VICTORY_FSR_4K = $Fsr4K.ToLowerInvariant() }
|
|
foreach ($k in $More.Keys) { $settings[$k] = $More[$k] }
|
|
|
|
$victory = Join-Path $PSScriptRoot "..\target\$Build\victory.exe"
|
|
if (-not (Test-Path $victory)) { Write-Host "No $victory. Build it first."; exit 1 }
|
|
if (-not (Test-Path $Exe)) { Write-Host "No $Exe."; exit 1 }
|
|
# (Other settings left over in this window go; where your files are stays.)
|
|
$paths = 'VICTORY_CONFIG', 'VICTORY_GAME_DIR', 'VICTORY_CACHE_DIR', 'VICTORY_DATA_DIR', 'VICTORY_FIDELITYFX_DIR'
|
|
$inherited = @(Get-ChildItem Env:VICTORY_* | Where-Object { $_.Name -notin $paths })
|
|
foreach ($entry in $inherited) { Remove-Item "Env:$($entry.Name)" }
|
|
foreach ($k in $settings.Keys) { Set-Item "Env:$k" $settings[$k] }
|
|
$discarded = $inherited | Where-Object {
|
|
$_.Name -notin $More.Keys -and -not $_.Value.Equals([Environment]::GetEnvironmentVariable($_.Name))
|
|
} | Sort-Object Name
|
|
if ($discarded) {
|
|
Write-Host "Discarded inherited values for $($discarded.Name -join ', '). Use -More to pass them explicitly."
|
|
}
|
|
$Exe = (Resolve-Path $Exe).Path
|
|
Push-Location (Join-Path $PSScriptRoot '..') # victory.toml is looked for here
|
|
try { & $victory run $Exe --execute } finally { Pop-Location }
|