play.ps1: translate every shader first when the shader cache is cold #131

Closed
github-bot wants to merge 2 commits from github-bot/gh-131 into main AGit
Owner

@⁠ariel-nathan on GitHub · 2026-11-27 03:21 UTC · original
ariel-nathan:play/cold-shader-cache → main · +27 −1 · 2 files · 2 commits · closed without merging

What

scripts\play.ps1 now checks the shader cache before starting the title. If the cache folder (as victory config reports it, so victory.toml and VICTORY_CACHE_DIR are honoured) holds fewer than 1,000 translations, it runs victory shaders on the title's folder first, then starts as before. -SkipShaders keeps the old behaviour. The README's "Getting started" says so in one paragraph.

Why

On a first run with an empty cache the picture stays mostly black for minutes: the run translates shaders only as draws ask for them and drops those draws meanwhile. The README already says to run victory shaders first; a launcher that does it catches the people who skip that step.

Measured from the layer's own frame lines, same opening scene, Series S profile, the 4070 preset of play.ps1:

First run Draws a frame Dropped without a host pipeline fps
cold cache, as before (first 2.5 minutes in the world) 3,400 to 4,300 1,450 to 3,400 1.4 to 3.7
with this change, first minute in the world 3,700 to 4,500 1,130 falling to about 310 3.4 to 3.7
with this change, after that 4,500 to 4,550 about 265 24 to 26

What it does not fix: the first run still spends about a minute slow in the world while the driver builds its pipelines (host-pipelines.bin is written then); later runs load them. The README paragraph says so. The remaining ~265 dropped draws a frame are the same with a warm cache.

The translation runs after the settings are set: the wave-wide settings are part of the translation's cache key (shader_cache.rs, build()), so translating under the same settings is what lets the run find the entries.

Tested

  • Windows 11, RTX 4080 16 GB (driver 32.0.16.2124), Ryzen 7 9800X3D, Windows PowerShell 5.1.
  • From an empty cache folder: the script translated every shader (about 100 s on 16 threads) and then started the title.
  • Again with that cache: the check found it full and started directly.
  • PowerShell parse check of the script.
  • Not tested: Play-VIctory.cmd (it calls pwsh, which this PC does not have), AMD cards.

AI-assisted: written and tested with Claude Code.

🤖 Generated with Claude Code

**@⁠ariel-nathan** on GitHub · 2026-11-27 03:21 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/131) `ariel-nathan:play/cold-shader-cache` → `main` · +27 −1 · 2 files · 2 commits · closed without merging ## What `scripts\play.ps1` now checks the shader cache before starting the title. If the cache folder (as `victory config` reports it, so `victory.toml` and `VICTORY_CACHE_DIR` are honoured) holds fewer than 1,000 translations, it runs `victory shaders` on the title's folder first, then starts as before. `-SkipShaders` keeps the old behaviour. The README's "Getting started" says so in one paragraph. ## Why On a first run with an empty cache the picture stays mostly black for minutes: the run translates shaders only as draws ask for them and drops those draws meanwhile. The README already says to run `victory shaders` first; a launcher that does it catches the people who skip that step. Measured from the layer's own frame lines, same opening scene, Series S profile, the 4070 preset of `play.ps1`: | First run | Draws a frame | Dropped without a host pipeline | fps | |---|---|---|---| | cold cache, as before (first 2.5 minutes in the world) | 3,400 to 4,300 | 1,450 to 3,400 | 1.4 to 3.7 | | with this change, first minute in the world | 3,700 to 4,500 | 1,130 falling to about 310 | 3.4 to 3.7 | | with this change, after that | 4,500 to 4,550 | about 265 | 24 to 26 | What it does not fix: the first run still spends about a minute slow in the world while the driver builds its pipelines (`host-pipelines.bin` is written then); later runs load them. The README paragraph says so. The remaining ~265 dropped draws a frame are the same with a warm cache. The translation runs after the settings are set: the wave-wide settings are part of the translation's cache key (`shader_cache.rs`, `build()`), so translating under the same settings is what lets the run find the entries. ## Tested - Windows 11, RTX 4080 16 GB (driver 32.0.16.2124), Ryzen 7 9800X3D, Windows PowerShell 5.1. - From an empty cache folder: the script translated every shader (about 100 s on 16 threads) and then started the title. - Again with that cache: the check found it full and started directly. - PowerShell parse check of the script. - Not tested: `Play-VIctory.cmd` (it calls `pwsh`, which this PC does not have), AMD cards. AI-assisted: written and tested with Claude Code. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
With an empty cache a run translates shaders only as draws ask for them and
drops those draws meanwhile: about half of each frame for the first minutes,
a black picture. play.ps1 now asks `victory config` for the cache folder and,
when it holds fewer than 1,000 translations, runs `victory shaders` on the
title's folder before starting (after the settings are set, since some
translations depend on them). -SkipShaders starts without.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 03:21:41 +00:00
github-bot closed this pull request 2026-11-27 03:53:44 +00:00
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 03:48 UTC · original

Thanks for the first-run measurements, @⁠ariel-nathan. I approved the CI run on this PR and all three Windows jobs passed. The launcher change is now on main via #135, with your authorship. It uses the configured game directory when available, handles literal paths with brackets, and keeps -SkipShaders. I verified the cold, warm, skip and failure paths with a stub under both PowerShell versions.

**@⁠TaynanGT** on GitHub · 2026-11-27 03:48 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/131#issuecomment-7209290884) Thanks for the first-run measurements, @⁠ariel-nathan. I approved the CI run on this PR and all three Windows jobs passed. The launcher change is now on `main` via #135, with your authorship. It uses the configured game directory when available, handles literal paths with brackets, and keeps `-SkipShaders`. I verified the cold, warm, skip and failure paths with a stub under both PowerShell versions.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.