upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/play-d3d12.ps117
1 files changed, 12 insertions, 5 deletions
diff --git a/scripts/play-d3d12.ps1 b/scripts/play-d3d12.ps1
index 01192a5d6..aed36ce25 100644
--- a/scripts/play-d3d12.ps1
+++ b/scripts/play-d3d12.ps1
@@ -3,9 +3,10 @@
3# 3#
4# powershell -ExecutionPolicy Bypass -File scripts\play-d3d12.ps1 -Game <folder with game_scarlett_master.exe> 4# powershell -ExecutionPolicy Bypass -File scripts\play-d3d12.ps1 -Game <folder with game_scarlett_master.exe>
5# 5#
6# By default the game runs as on an Xbox Series X, rendering 2560x1440 (render scale 2/3 of its 3840x2160 output) 6# By default the game runs as on an Xbox Series X with a 2560x1440 output and its own dynamic resolution and temporal
7# with its own temporal upscaler; -SeriesS runs the lighter Series S profile instead, where the game renders its own 7# upscaler: it renders between 1080 and 1440 lines by how long its frames take (-Lowest 1080); -SeriesS runs the
8# 720p picture and DLSS takes it to 1080p. -Resolution sets the rendered height (Series X: 1080 or 1440). DLSS and DLSS 8# lighter Series S profile instead, where the game renders its own 720p picture and DLSS takes it to 1080p.
9# -Resolution holds one rendered height instead (Series X: 1080 or 1440), -Lowest sets the lowest one. DLSS and DLSS
9# frame generation need a few of NVIDIA's own files that no repository may carry: d3d12\Get-NVIDIA-DLSS.cmd fetches 10# frame generation need a few of NVIDIA's own files that no repository may carry: d3d12\Get-NVIDIA-DLSS.cmd fetches
10# them from NVIDIA's GitHub once (about 70 MB). Without them the picture is stretched to the screen instead. 11# them from NVIDIA's GitHub once (about 70 MB). Without them the picture is stretched to the screen instead.
11# In the game: F1 = settings (frame generation, frame-rate cap, DLSS preset ...), F3 = the numbers panel. 12# In the game: F1 = settings (frame generation, frame-rate cap, DLSS preset ...), F3 = the numbers panel.
@@ -26,6 +27,9 @@
26# -Aspect the window's shape: 21:9, 32:9, 16:9, W:H or auto (the screen's). The game still draws 16:9, shown 27# -Aspect the window's shape: 21:9, 32:9, 16:9, W:H or auto (the screen's). The game still draws 16:9, shown
27# centred with black bars (-PresentScale fit, the default with -Aspect) or stretched (stretch). 28# centred with black bars (-PresentScale fit, the default with -Aspect) or stretched (stretch).
28# -Resolution the older path: the game renders at this height and the title's own upscaler does the rest 29# -Resolution the older path: the game renders at this height and the title's own upscaler does the rest
30# -Lowest the lowest height of the title's own dynamic resolution (1080 by default on Series X): it renders
31# between this and 1440 lines. Same save, RTX 4060 Ti (2026-11-29): 57.0 and 59.6 ms a frame (median,
32# two series) against 66.0 and 67.9 at -Resolution 1440; the frames sat at 1080 there.
29# -RayTracing the title's real ray tracing (slower; shaders build for minutes the first time) 33# -RayTracing the title's real ray tracing (slower; shaders build for minutes the first time)
30# -Capture F9 in the game saves that frame and the pictures it drew 34# -Capture F9 in the game saves that frame and the pictures it drew
31# -NoPrecompile start at once: by default every shader is translated and the pipelines earlier runs drew with are 35# -NoPrecompile start at once: by default every shader is translated and the pipelines earlier runs drew with are
@@ -43,6 +47,7 @@ param(
43 [switch]$SeriesS, 47 [switch]$SeriesS,
44 [switch]$Quality, 48 [switch]$Quality,
45 [ValidateSet('', '2160', '1440', '1080', '720', '540', '480')][string]$Resolution = '', 49 [ValidateSet('', '2160', '1440', '1080', '720', '540', '480')][string]$Resolution = '',
50 [ValidateSet('', '1440', '1080', '720', '540', '480')][string]$Lowest = '',
46 [ValidateSet('', 'quality', 'balanced', 'performance', 'ultra')][string]$Dlss = '', 51 [ValidateSet('', 'quality', 'balanced', 'performance', 'ultra')][string]$Dlss = '',
47 [ValidateSet(0, 2, 3, 4, 5, 6)][int]$FrameGen = 0, 52 [ValidateSet(0, 2, 3, 4, 5, 6)][int]$FrameGen = 0,
48 [switch]$NoFrameGen, 53 [switch]$NoFrameGen,
@@ -84,8 +89,9 @@ $launch = @{ Exe = $title; Build = 'diag'; NoSmoothMotion = (-not $SmoothMotion)
84# Leonida: the Series X profile is the default (the user's call: 1080p-1440p as on the bigger consoles). 89# Leonida: the Series X profile is the default (the user's call: 1080p-1440p as on the bigger consoles).
85if (-not $SeriesS) { 90if (-not $SeriesS) {
86 $launch.SeriesX = $true 91 $launch.SeriesX = $true
87 # 1440 lines and the title's own upscaler, unless DLSS (which frame generation brings with it) makes the output. 92 # 1080 to 1440 lines by the title's own dynamic resolution and its own upscaler, unless a height is held
88 if (-not $Resolution -and -not $Dlss -and -not $FrameGen) { $Resolution = '1440' } 93 # (-Resolution) or DLSS (which -FrameGen brings with it) makes the output.
94 if (-not $Resolution -and -not $Lowest -and -not $Dlss -and -not $FrameGen) { $Lowest = '1080' }
89} 95}
90if ($Dlss) { $launch.Dlss = $Dlss } 96if ($Dlss) { $launch.Dlss = $Dlss }
91if ($FrameGen) { $launch.FrameGen = $FrameGen } 97if ($FrameGen) { $launch.FrameGen = $FrameGen }
@@ -95,5 +101,6 @@ foreach ($switch in 'Quality', 'NoDlss', 'NoFrameGen', 'MotionBlur', 'RayTracing
95 if ($PSBoundParameters[$switch]) { $launch[$switch] = $true } 101 if ($PSBoundParameters[$switch]) { $launch[$switch] = $true }
96} 102}
97if ($Resolution) { $launch.Resolution = $Resolution } 103if ($Resolution) { $launch.Resolution = $Resolution }
104if ($Lowest) { $launch.Lowest = $Lowest }
98if ($Adapter) { $launch.Adapter = $Adapter } 105if ($Adapter) { $launch.Adapter = $Adapter }
99& (Join-Path $runtime "scripts\play-nvidia.ps1") @launch 106& (Join-Path $runtime "scripts\play-nvidia.ps1") @launch