feat(editor): add DLSS 5 neural rendering, more frame generation modes and a custom LUT
Video settings:
- NVIDIA frame generation gains x6 (the multiplier was already in the list
but offered by no vendor) and Dynamic Multi Frame Generation (DLSS 4.5).
- "Custom…" for every vendor reveals a text field (`frameGenCustom`); the
description prints what was typed, like a custom graphics preset, and
nothing for an empty box.
- A "DLSS 5 Neural Rendering" switch (`dlssNeuralRendering`), shown for
NVIDIA only and printed after the DLSS mode:
"Ultra - NVIDIA DLSS Quality + NVIDIA DLSS 5 Neural Rendering + NVIDIA
Dynamic Multi Frame Generation". Another vendor turns it off
(`coerceDlssNeuralRendering`: the vendor switch, applied profiles and
templates, backup import).
- Editor store v21 -> v22 back-fills both fields.
- composeGraphicsPart's vendor half moves into small helpers.
My Rig: "Custom" is the LUT field's first suggestion (typing it works too,
any case). The rig block then prints just "LUT applied" in the output
language ("Có áp dụng LUT") instead of "LUT: Custom" — a field's
`customNoteKey`. No migration: the rig is a string map.
i18n: the new editor and description keys in all 8 locales and
_schema.json; brand names stay English. tests/engine/graphics-vendor.test.ts
also holds every vendor's options to their labels in the schema.
Docs: FEATURES (upscaler / frame-gen table, LUT Custom), TECH-SPEC (input
fields, store v22, rig block), CLAUDE.md (how to add an option).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
731e194a70
commit
cefbbd13ee
36 files changed
+795
-130
No files matched your search
@@ -181,6 +181,7 @@ npm run generate:brand # favicon, PWA icons, link-preview card from assets/
|
||||
- New video type: `src/config/video-types.ts` + every `templates.json` (titles, intros, pinned-comment greetings).
|
||||
- New content warning / tech note: the id in `CONTENT_WARNINGS` / `TECH_NOTES` (`src/engine/types.ts`), a group in `src/config/content-warning-groups.ts` / `tech-note-groups.ts`, the editor label (`ui.json`) and description line (`templates.json`) in all 8 locales and `_schema.json` — tests fail on any gap — and the row in `docs/CONTENT-INVENTORY.md` (+ vi). Don't repeat a fact that has its own field (language patch, game version, difficulty, the Video settings upscaler).
|
||||
- New store platform: `src/config/platforms.ts` (URL pattern, `tagName`), optionally a name extractor in `src/utils/url-extractors.ts`.
|
||||
- New upscaler / frame-gen option: the id in `src/config/graphics-settings.ts`, the vendor's list in `src/engine/graphics-vendor.ts`, the editor label (`editor.upscaleQuality.<vendor>` / `editor.frameGenMultiplier.<vendor>`, `ui.json`) and the description label (`description.graphics.upscale|frameGen.<vendor>`, `templates.json`) in all 8 locales and `_schema.json` — `tests/engine/graphics-vendor.test.ts` fails on a gap. A new id only widens the lists (no store bump); a new field does need one.
|
||||
- UI changes follow the accessibility checklist in `ACCESSIBILITY.md` (#for-contributors): keyboard, names via `Field` / `IconButton`, announced errors, tokens only, reduced motion, 24 px targets. Generated text gets `lang` (the output language); pages name themselves with `useDocumentTitle`, which `RouteAnnouncer` reads out. Update ACCESSIBILITY.md (+ `docs/i18n/vi/`) when what it promises changes.
|
||||
- Never commit `note.txt`, `warning.txt` or `__pycache__/`; never put real secrets in files (`.dev.vars` holds Cloudflare's public Turnstile test keys only).
|
||||
- SonarCloud (project `poli0981_youtube-generator`) is CI-based: the `sonarcloud` job in `ci.yml` scans every PR from this repository and every push to `main`, with the coverage from `check`; settings in `sonar-project.properties`; Automatic Analysis is off. Keep it at 0 open issues and the quality gate (Sonar way: A ratings, reviewed hotspots, ≤ 3 % duplication, ≥ 80 % coverage on new code) green — the job fails with the gate. Coverage covers what `coverage.include` in `vitest.config.ts` lists (the logic layers); everything else is in `sonar.coverage.exclusions`, because a file missing from the LCOV report counts as 0 % — a new source folder goes into one list or the other. The version passed to the scanner starts each release's new-code period. Fork and Dependabot PRs skip the scan (no `SONAR_TOKEN`). Check a PR with `https://sonarcloud.io/api/issues/search?componentKeys=poli0981_youtube-generator&pullRequest=<n>&resolved=false` and its gate with `https://sonarcloud.io/api/qualitygates/project_status?projectKey=poli0981_youtube-generator&pullRequest=<n>`. Workflows install with `npm ci --ignore-scripts` and call local binaries (`npm run …`), never `npx` for a package that isn't installed.
|
||||
|
||||
+36
-10
@@ -165,6 +165,9 @@ video editor. The suggestions are LUTs that come with DaVinci Resolve, named
|
||||
the way its LUT menu shows them; any other name is printed as typed. A pasted
|
||||
file name or path (Explorer's _Copy as path_) is cut down to the LUT's name:
|
||||
`"C:\…\Arri\Arri Alexa LogC to Rec709.dat"` → `Arri Alexa LogC to Rec709`.
|
||||
**Custom** (v1.6.0), the first suggestion (typing "custom" works too), is for
|
||||
a LUT of your own: the line then reads just _LUT applied_ (_Có áp dụng LUT_ in
|
||||
Vietnamese), without a name.
|
||||
|
||||
**GPU catalog (v1.0.0)** — 198 models in 29 groups: NVIDIA GeForce (desktop
|
||||
and laptop), AMD Radeon (including integrated), Intel Arc and integrated,
|
||||
@@ -227,6 +230,29 @@ lowering the resolution to or below the source ends the upscale. 1080p 60fps
|
||||
still has no badge, and the Upscale line stays when the graphics settings are
|
||||
hidden. Saved with the channel profile.
|
||||
|
||||
**Upscaler and frame generation** — Video settings › the vendor picks the
|
||||
options the other fields offer, and the `In-game Setting:` line names each
|
||||
one under its brand (kept in English in every language, as viewers search
|
||||
for it):
|
||||
|
||||
| Vendor | Upscaling | Frame generation |
|
||||
| ------ | --------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
||||
| NVIDIA | DLAA, DLSS Quality / Balanced / Performance / Ultra Performance | x2, x3, x4, **x6**, **Dynamic** (Dynamic Multi Frame Gen), **Custom…** |
|
||||
| AMD | FSR Native AA, Quality / Balanced / Performance / Ultra Perf. | x2, x3 (Fluid Motion Frames), **Custom…** |
|
||||
| Intel | XeSS Native AA, Ultra Quality, Quality … Ultra Performance | x2 (XeFG), **Custom…** |
|
||||
|
||||
New in v1.6.0 (bold): NVIDIA's x6 and Dynamic Multi Frame Generation;
|
||||
**Custom…** for every vendor, which prints what you type (_NVIDIA Smooth
|
||||
Motion_, _Lossless Scaling x3_); and, for NVIDIA, a **DLSS 5 Neural
|
||||
Rendering** switch, printed after the DLSS mode:
|
||||
|
||||
```
|
||||
In-game Setting: Ultra - NVIDIA DLSS Quality + NVIDIA DLSS 5 Neural Rendering + NVIDIA Dynamic Multi Frame Generation with Path Tracing
|
||||
```
|
||||
|
||||
Changing the vendor drops what the new one doesn't offer. These settings
|
||||
belong to the draft and to templates, not to the profile.
|
||||
|
||||
With one output language selected, the Output page shows content warnings,
|
||||
tech notes and playthrough notes bilingually (English · output language)
|
||||
unless the output is English; with several languages selected, each tab —
|
||||
@@ -429,17 +455,17 @@ In **Settings › Backup & restore**:
|
||||
|
||||
`Ctrl` on Windows / Linux / Android, `⌘` on a Mac — both work everywhere.
|
||||
|
||||
| Shortcut | Action |
|
||||
| ---------------------------- | --------------------------------------------------------------- |
|
||||
| `Ctrl/⌘+K` | Command palette |
|
||||
| `Ctrl/⌘+Enter` or `Ctrl/⌘+G` | Generate (switch to Output) |
|
||||
| `Ctrl/⌘+Shift+C` | Copy All — same limits and Strict Mode rules as the Output page |
|
||||
| `Ctrl/⌘+S` | Save the current output to History |
|
||||
| `Ctrl/⌘+B` | Collapse / expand the sidebar |
|
||||
| `Alt+T` | Go to the notifications (while any are on screen) |
|
||||
| Shortcut | Action |
|
||||
| ---------------------------- | ------------------------------------------------------------------------------------------------------------ |
|
||||
| `Ctrl/⌘+K` | Command palette |
|
||||
| `Ctrl/⌘+Enter` or `Ctrl/⌘+G` | Generate (switch to Output) |
|
||||
| `Ctrl/⌘+Shift+C` | Copy All — same limits and Strict Mode rules as the Output page |
|
||||
| `Ctrl/⌘+S` | Save the current output to History |
|
||||
| `Ctrl/⌘+B` | Collapse / expand the sidebar |
|
||||
| `Alt+T` | Go to the notifications (while any are on screen) |
|
||||
| `Ctrl/⌘+/` or `?` | Show keyboard shortcuts (`?` only outside text fields, while Settings › Editor › Single-key shortcuts is on) |
|
||||
| `Ctrl/⌘+=` / `Ctrl/⌘+−` | Zoom in / out — desktop app (v1.5.1) |
|
||||
| `Escape` | Close modal |
|
||||
| `Ctrl/⌘+=` / `Ctrl/⌘+−` | Zoom in / out — desktop app (v1.5.1) |
|
||||
| `Escape` | Close modal |
|
||||
|
||||
## 🔧 Settings
|
||||
|
||||
|
||||
+8
-5
@@ -347,8 +347,9 @@ export interface GeneratorInput {
|
||||
// liveUrl, scheduledTime, gachaQuestType, chapterName, questName, characterName,
|
||||
// anniversaryYear, gachaVersion.
|
||||
// Video settings: resolution, upscaledFrom (v1.5.0), fps, graphicsPreset (+ graphicsPresetCustom),
|
||||
// skipGraphicsSettings, rayTracingModes, frameGenVendor, frameGenMultiplier,
|
||||
// upscaleQuality, artStyle, videoStyleEra, versionInfo.
|
||||
// skipGraphicsSettings, rayTracingModes, frameGenVendor, frameGenMultiplier
|
||||
// (+ frameGenCustom, v1.6.0), upscaleQuality, dlssNeuralRendering (v1.6.0),
|
||||
// artStyle, videoStyleEra, versionInfo.
|
||||
// Content: timestamps, playlistLink, contactEmail, adEmail, gameKeyEmail,
|
||||
// copyrightEmail, musicAttribution, sponsorName, sponsorPlatform, pubDevName,
|
||||
// thirdPartyAdText,
|
||||
@@ -420,7 +421,7 @@ export interface TitleFormatConfig {
|
||||
|
||||
**Empty channel name** (`channel-phrase.ts`, used by the description, pinned comment and playlist builders): templates render with `CHANNEL_SLOT` (`@@CHANNEL@@`) in place of an empty channel name. `withoutEmptyChannel(text, language)` then removes the words that go with the channel name in that language ("trên kênh", "による", "en", "no", "di", …) and the English "on" (for English, and for locales that still carry English sentences for newer video types), replaces any slot left over with a neutral fallback ("this channel", "kênh", …) and tidies the spacing before punctuation. "…of Hades on ." no longer happens in any of the eight languages.
|
||||
|
||||
**Rig block** (`rig-block.ts`): `buildRigLines(rig, t)` returns `Label: value` lines, shared by the description and the social captions. Labels come from `description.rigLabels.<field>` in the output language, the order is `RIG_FIELDS` (CPU, GPU, RAM, motherboard, storage, OS, monitor, capture, controller, video editor, LUT), and values go through `formatRigValue` (`gpu:nvidia-rtx-5080` → "NVIDIA GeForce RTX 5080"; a text field's `clean` — `cleanCpuName`, and since v1.4.0 `cleanLutName`, which cuts a pasted path or `.cube` / `.dat` file name down to the LUT's name — runs there as well as when the editor field loses focus). Keys that are no longer rig fields are still printed, after the known ones.
|
||||
**Rig block** (`rig-block.ts`): `buildRigLines(rig, t)` returns `Label: value` lines, shared by the description and the social captions. Labels come from `description.rigLabels.<field>` in the output language, the order is `RIG_FIELDS` (CPU, GPU, RAM, motherboard, storage, OS, monitor, capture, controller, video editor, LUT), and values go through `formatRigValue` (`gpu:nvidia-rtx-5080` → "NVIDIA GeForce RTX 5080"; a text field's `clean` — `cleanCpuName`, and since v1.4.0 `cleanLutName`, which cuts a pasted path or `.cube` / `.dat` file name down to the LUT's name — runs there as well as when the editor field loses focus). A field with a `customNoteKey` whose value is "Custom" (any case) prints that templates key as its whole line instead — since v1.6.0 the LUT's "LUT applied" (`description.rigNotes.lut_custom`), for a LUT of one's own. Keys that are no longer rig fields are still printed, after the known ones.
|
||||
|
||||
**Chapters** (`timeline-parser.ts`):
|
||||
|
||||
@@ -474,7 +475,7 @@ interface EditorActions {
|
||||
}
|
||||
|
||||
/** Bump together with a new step in migrateEditorState. */
|
||||
export const EDITOR_STORE_VERSION = 21;
|
||||
export const EDITOR_STORE_VERSION = 22;
|
||||
|
||||
export const useEditorStore = create<EditorData & EditorActions>()(
|
||||
persist(
|
||||
@@ -508,7 +509,7 @@ export function migrateEditorState(persistedState: unknown, version: number): Ed
|
||||
|
||||
| Store | localStorage key | Version | Migration (exported) |
|
||||
| ------------------ | ------------------------ | ----------------------------- | ---------------------------------------------------------------------------------------------- |
|
||||
| `useEditorStore` | `ytdescgen-editor-draft` | `EDITOR_STORE_VERSION` = 21 | `migrateEditorState` |
|
||||
| `useEditorStore` | `ytdescgen-editor-draft` | `EDITOR_STORE_VERSION` = 22 | `migrateEditorState` |
|
||||
| `useProfileStore` | `ytdescgen-profiles` | `PROFILE_STORE_VERSION` = 3 | `migrateProfilesState` |
|
||||
| `usePresetStore` | `ytdescgen-presets` | `PRESET_STORE_VERSION` = 2 | `migratePresetsState` |
|
||||
| `useTemplateStore` | `ytdescgen-templates` | `TEMPLATE_STORE_VERSION` = 2 | `migrateTemplatesState` |
|
||||
@@ -525,6 +526,8 @@ v1.5.0: editor v21 back-fills `upscaledFrom` (recorded at a lower resolution, up
|
||||
|
||||
v1.5.1: the settings gain `singleKeyShortcuts` (default `true`: the bare `?` opens the shortcut list) without a version bump, like `hideScrollbars` — `healSettings` back-fills it and turns anything but a boolean into `true`.
|
||||
|
||||
v1.6.0: editor v22 back-fills `frameGenCustom` (the frame generation typed for the new `"custom"` multiplier) with `""` and `dlssNeuralRendering` (NVIDIA DLSS 5 Neural Rendering) with `false`, coercing values of the wrong type. The multiplier list only widens (`x6` and `dynamic` for NVIDIA, `custom` for every vendor), and the backup whitelist checks it against `FRAMEGEN_MULTIPLIERS`. `normalizeEditorPatch` and the backup import turn `dlssNeuralRendering` off for any vendor but NVIDIA (`coerceDlssNeuralRendering`). Neither field is a profile or preset field, like the rest of the frame-gen settings. The LUT's "Custom" needs no migration: it is a rig value like any LUT name.
|
||||
|
||||
Rules:
|
||||
|
||||
- **localStorage is the only store**, on the web, desktop and Android. The desktop "mirror" file of earlier versions (`storage-adapter.ts`, `saveSettings`, `checkDataFileHealth`) was removed in v1.0.0; it was written next to the data folder and never read back. [PACKAGING.md](PACKAGING.md) covers how the leftover file is recovered.
|
||||
|
||||
@@ -23,6 +23,7 @@ import {
|
||||
getValidFrameGenMultipliers,
|
||||
coerceUpscaleQuality,
|
||||
coerceFrameGenMultiplier,
|
||||
coerceDlssNeuralRendering,
|
||||
} from "@engine/graphics-vendor";
|
||||
import { upscaleSourcesFor, validUpscaleSource } from "@engine/upscale";
|
||||
import { VIDEO_STYLE_ERA_IDS, type VideoStyleEra } from "@config/video-styles";
|
||||
@@ -101,6 +102,12 @@ export function VideoSettingsForm() {
|
||||
if (coercedQ !== store.upscaleQuality) store.set("upscaleQuality", coercedQ);
|
||||
const coercedM = coerceFrameGenMultiplier(next, store.frameGenMultiplier);
|
||||
if (coercedM !== store.frameGenMultiplier) store.set("frameGenMultiplier", coercedM);
|
||||
// v1.6.0: DLSS 5 Neural Rendering is NVIDIA's; its switch hides for
|
||||
// other vendors, so it turns off rather than linger unseen.
|
||||
const coercedNeural = coerceDlssNeuralRendering(next, store.dlssNeuralRendering);
|
||||
if (coercedNeural !== store.dlssNeuralRendering) {
|
||||
store.set("dlssNeuralRendering", coercedNeural);
|
||||
}
|
||||
}
|
||||
|
||||
// v1.5.0: "Upscaled from" lists only resolutions below the video's own.
|
||||
@@ -211,6 +218,17 @@ export function VideoSettingsForm() {
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* v1.6.0: "Custom…" frame generation, printed as typed. */}
|
||||
{store.frameGenMultiplier === "custom" && (
|
||||
<Input
|
||||
label={t("editor.frameGenCustom")}
|
||||
maxLength={FIELD_LIMITS.LABEL}
|
||||
placeholder={t("editor.frameGenCustomPlaceholder")}
|
||||
value={store.frameGenCustom}
|
||||
onChange={(e) => store.set("frameGenCustom", e.target.value)}
|
||||
/>
|
||||
)}
|
||||
|
||||
<div className="grid gap-3 sm:grid-cols-2">
|
||||
<Select
|
||||
label={t("editor.upscaleQuality")}
|
||||
@@ -226,6 +244,15 @@ export function VideoSettingsForm() {
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* v1.6.0: DLSS 5 Neural Rendering — NVIDIA (RTX 50 series) only. */}
|
||||
{store.frameGenVendor === "nvidia" && (
|
||||
<Toggle
|
||||
label={t("editor.dlssNeuralRendering")}
|
||||
checked={store.dlssNeuralRendering}
|
||||
onChange={(v) => store.set("dlssNeuralRendering", v)}
|
||||
/>
|
||||
)}
|
||||
|
||||
<Input
|
||||
label={t("editor.versionInfo")}
|
||||
maxLength={FIELD_LIMITS.LABEL}
|
||||
|
||||
@@ -66,7 +66,11 @@ export interface EditorDefaults {
|
||||
rayTracingModes: RTMode[];
|
||||
frameGenVendor: FrameGenVendor;
|
||||
frameGenMultiplier: FrameGenMultiplier;
|
||||
/** v1.6.0: the frame generation as typed, when the multiplier is `"custom"`. */
|
||||
frameGenCustom: string;
|
||||
upscaleQuality: UpscaleQuality;
|
||||
/** v1.6.0: NVIDIA DLSS 5 Neural Rendering (NVIDIA only). */
|
||||
dlssNeuralRendering: boolean;
|
||||
artStyle: ArtStyle;
|
||||
/** v0.22.0 opt-in. Empty string = no style line in the description. */
|
||||
videoStyleEra: VideoStyleEra;
|
||||
@@ -205,7 +209,9 @@ export const DEFAULTS = {
|
||||
rayTracingModes: [],
|
||||
frameGenVendor: "none",
|
||||
frameGenMultiplier: "none",
|
||||
frameGenCustom: "",
|
||||
upscaleQuality: "none",
|
||||
dlssNeuralRendering: false,
|
||||
artStyle: "none",
|
||||
videoStyleEra: "" satisfies VideoStyleEra,
|
||||
versionInfo: "",
|
||||
|
||||
@@ -60,12 +60,18 @@ export const FRAMEGEN_VENDORS = ["none", "nvidia", "amd", "intel"] as const;
|
||||
export type FrameGenVendor = (typeof FRAMEGEN_VENDORS)[number];
|
||||
|
||||
/**
|
||||
* Frame-generation multiplier — DLSS 4 supports up to x4, FSR 3 up to x3,
|
||||
* Intel XeFG is ramping up. `"none"` means upscaling is in use but frame
|
||||
* generation isn't; useful for builds where DLSS Quality is enabled but
|
||||
* FG was left off.
|
||||
* Frame-generation multiplier — DLSS 4 supports up to x4 and DLSS 4.5 adds
|
||||
* x6 and Dynamic Multi Frame Generation (`"dynamic"`, which picks the
|
||||
* multiplier itself), FSR 3 goes up to x3, Intel XeFG is ramping up.
|
||||
* `"none"` means upscaling is in use but frame generation isn't; useful for
|
||||
* builds where DLSS Quality is enabled but FG was left off.
|
||||
*
|
||||
* v1.6.0: `"custom"` reveals a free-form text field (`frameGenCustom`),
|
||||
* printed as typed — the same escape hatch as the graphics preset's, for
|
||||
* modes the list doesn't name (a driver-level or third-party frame
|
||||
* generator, a newer multiplier).
|
||||
*/
|
||||
export const FRAMEGEN_MULTIPLIERS = ["none", "x2", "x3", "x4", "x6"] as const;
|
||||
export const FRAMEGEN_MULTIPLIERS = ["none", "x2", "x3", "x4", "x6", "dynamic", "custom"] as const;
|
||||
export type FrameGenMultiplier = (typeof FRAMEGEN_MULTIPLIERS)[number];
|
||||
|
||||
/**
|
||||
|
||||
@@ -111,6 +111,21 @@ export interface RigField {
|
||||
readonly clean?: (raw: string) => string;
|
||||
/** Takes both columns of the editor's grid (long values, such as a LUT name). */
|
||||
readonly wide?: boolean;
|
||||
/**
|
||||
* `text` fields (v1.6.0): when the value is "Custom" (any case — the
|
||||
* field's first suggestion), the description prints this templates key
|
||||
* as the whole line instead of "Label: Custom". The LUT's is "LUT
|
||||
* applied", for a LUT of one's own that has no name worth printing.
|
||||
*/
|
||||
readonly customNoteKey?: string;
|
||||
}
|
||||
|
||||
/** The value that selects a field's {@link RigField.customNoteKey} line. */
|
||||
const RIG_CUSTOM_VALUE = "Custom";
|
||||
|
||||
/** True when a rig value is the "Custom" choice (case and spaces ignored). */
|
||||
export function isCustomRigValue(value: string): boolean {
|
||||
return value.trim().toLowerCase() === RIG_CUSTOM_VALUE.toLowerCase();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -489,9 +504,11 @@ export function cleanCpuName(raw: string): string {
|
||||
/**
|
||||
* LUTs that come with DaVinci Resolve, named the way its LUT menu shows
|
||||
* them (from Resolve 21's own LUT folder), offered while typing in the
|
||||
* LUT field. Any other LUT's name is accepted as typed.
|
||||
* LUT field. Any other LUT's name is accepted as typed. v1.6.0: "Custom"
|
||||
* comes first — a LUT of one's own, printed as just "LUT applied".
|
||||
*/
|
||||
export const LUT_SUGGESTIONS: readonly string[] = [
|
||||
RIG_CUSTOM_VALUE,
|
||||
"Arri Alexa LogC to Rec709",
|
||||
"Rec709 Kodak 2383 D65",
|
||||
"Rec709 Kodak 2383 D60",
|
||||
@@ -593,6 +610,7 @@ export const RIG_FIELDS: readonly RigField[] = [
|
||||
suggestions: LUT_SUGGESTIONS,
|
||||
clean: cleanLutName,
|
||||
wide: true,
|
||||
customNoteKey: "description.rigNotes.lut_custom",
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
@@ -97,6 +97,65 @@ const VENDOR_GFX_BRANDS: Record<"nvidia" | "amd" | "intel", { upscale: string; f
|
||||
intel: { upscale: "Intel XeSS", framegen: "Intel XeFG" },
|
||||
};
|
||||
|
||||
type GfxVendor = keyof typeof VENDOR_GFX_BRANDS;
|
||||
|
||||
/** A translation that exists and isn't blank, else `""`. */
|
||||
function resolvedLabel(t: TranslationFn, key: string): string {
|
||||
const label = t(key);
|
||||
return label && label !== key && label.trim() ? label : "";
|
||||
}
|
||||
|
||||
/**
|
||||
* The upscaling part — v0.11: the vendor-keyed full label first ("NVIDIA
|
||||
* DLAA", "AMD FSR Native AA", "Intel XeSS Ultra Quality"), which embeds the
|
||||
* brand; else the pre-v0.11 flat key with the brand in front, for legacy
|
||||
* locales / unmigrated translations.
|
||||
*/
|
||||
function upscalePart(input: GeneratorInput, vendor: GfxVendor, t: TranslationFn): string {
|
||||
const quality = input.upscaleQuality;
|
||||
if (!quality || quality === "none") return "";
|
||||
const label = resolvedLabel(t, `description.graphics.upscale.${vendor}.${quality}`);
|
||||
if (label) return label;
|
||||
const legacyKey = `description.graphics.upscaleQualityOptions.${quality}`;
|
||||
const legacyLabel = t(legacyKey);
|
||||
return legacyLabel && legacyLabel !== legacyKey
|
||||
? `${VENDOR_GFX_BRANDS[vendor].upscale} ${legacyLabel}`
|
||||
: "";
|
||||
}
|
||||
|
||||
/**
|
||||
* The frame-generation part. The vendor-keyed label embeds the brand AND
|
||||
* the feature name ("NVIDIA Frame Generation x2", "AMD Fluid Motion Frames
|
||||
* x3", "Intel XeFG x2"), with brand + raw multiplier as the fallback for
|
||||
* pre-v0.11 locales. v1.6.0: `"custom"` prints what was typed (like a
|
||||
* custom preset); an empty box prints nothing rather than "custom".
|
||||
*/
|
||||
function frameGenPart(input: GeneratorInput, vendor: GfxVendor, t: TranslationFn): string {
|
||||
const multiplier = input.frameGenMultiplier;
|
||||
if (!multiplier || multiplier === "none") return "";
|
||||
if (multiplier === "custom") return (input.frameGenCustom ?? "").trim();
|
||||
return (
|
||||
resolvedLabel(t, `description.graphics.frameGen.${vendor}.${multiplier}`) ||
|
||||
`${VENDOR_GFX_BRANDS[vendor].framegen} ${multiplier}`
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* The vendor half of the "In-game Setting:" line — e.g. `NVIDIA DLSS
|
||||
* Quality + NVIDIA DLSS 5 Neural Rendering + NVIDIA Multi Frame Generation
|
||||
* x4`. v1.6.0: DLSS 5 Neural Rendering follows the DLSS mode, for NVIDIA
|
||||
* only — a stale flag on another vendor's draft prints nothing.
|
||||
*/
|
||||
function composeVendorModifier(input: GeneratorInput, vendor: GfxVendor, t: TranslationFn): string {
|
||||
const neural =
|
||||
vendor === "nvidia" && input.dlssNeuralRendering
|
||||
? t("description.graphics.dlssNeuralRendering")
|
||||
: "";
|
||||
return [upscalePart(input, vendor, t), neural, frameGenPart(input, vendor, t)]
|
||||
.filter(Boolean)
|
||||
.join(" + ");
|
||||
}
|
||||
|
||||
/**
|
||||
* Compose the value half of the "In-game Setting:" line — e.g.
|
||||
* `Cinematic - NVIDIA Frame Generation x2 with Ray Tracing`.
|
||||
@@ -123,54 +182,11 @@ function composeGraphicsPart(input: GeneratorInput, t: TranslationFn): string {
|
||||
if (resolved && resolved !== key) presetLabel = resolved;
|
||||
}
|
||||
|
||||
// 2. Modifier (upscale + frame-gen). Vendor gates the whole clause —
|
||||
// upscaling/frame-gen quality without a vendor is meaningless.
|
||||
// 2. Modifier (upscale + DLSS 5 + frame-gen). Vendor gates the whole
|
||||
// clause — upscaling/frame-gen quality without a vendor is meaningless.
|
||||
const vendor =
|
||||
input.frameGenVendor && input.frameGenVendor !== "none" ? input.frameGenVendor : null;
|
||||
const upscaleQ =
|
||||
input.upscaleQuality && input.upscaleQuality !== "none" ? input.upscaleQuality : null;
|
||||
const fgMul =
|
||||
input.frameGenMultiplier && input.frameGenMultiplier !== "none"
|
||||
? input.frameGenMultiplier
|
||||
: null;
|
||||
|
||||
let modifier = "";
|
||||
if (vendor) {
|
||||
const brands = VENDOR_GFX_BRANDS[vendor];
|
||||
const parts: string[] = [];
|
||||
if (upscaleQ) {
|
||||
// v0.11: try the vendor-keyed full label first ("NVIDIA DLAA",
|
||||
// "AMD FSR Native AA", "Intel XeSS Ultra Quality"). Fall back to
|
||||
// the pre-v0.11 flat key + brand prefix for legacy locales /
|
||||
// unmigrated translations. The vendor-keyed label embeds the
|
||||
// brand so we don't double-prefix on this path.
|
||||
const newKey = `description.graphics.upscale.${vendor}.${upscaleQ}`;
|
||||
const newLabel = t(newKey);
|
||||
if (newLabel && newLabel !== newKey && newLabel.trim()) {
|
||||
parts.push(newLabel);
|
||||
} else {
|
||||
const legacyKey = `description.graphics.upscaleQualityOptions.${upscaleQ}`;
|
||||
const legacyLabel = t(legacyKey);
|
||||
if (legacyLabel && legacyLabel !== legacyKey) {
|
||||
parts.push(`${brands.upscale} ${legacyLabel}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (fgMul) {
|
||||
// Vendor-keyed full label embeds the brand AND the feature name
|
||||
// ("NVIDIA Frame Generation x2", "AMD Fluid Motion Frames x3",
|
||||
// "Intel XeFG x2"). Fall back to brand + raw multiplier for
|
||||
// pre-v0.11 locales.
|
||||
const newKey = `description.graphics.frameGen.${vendor}.${fgMul}`;
|
||||
const newLabel = t(newKey);
|
||||
if (newLabel && newLabel !== newKey && newLabel.trim()) {
|
||||
parts.push(newLabel);
|
||||
} else {
|
||||
parts.push(`${brands.framegen} ${fgMul}`);
|
||||
}
|
||||
}
|
||||
modifier = parts.join(" + ");
|
||||
}
|
||||
const modifier = vendor ? composeVendorModifier(input, vendor, t) : "";
|
||||
|
||||
// 3. Ray-tracing clause. Each mode runs through i18n; falls back to
|
||||
// the snake_case id if a locale hasn't translated it.
|
||||
|
||||
@@ -6,13 +6,17 @@ import type { FrameGenVendor, FrameGenMultiplier, UpscaleQuality } from "@config
|
||||
* tiers it actually ships:
|
||||
*
|
||||
* - NVIDIA: DLAA (anti-aliasing-only) + 4 quality bins. DLSS 4 supports
|
||||
* multi-frame-gen up to x4.
|
||||
* multi-frame-gen up to x4; DLSS 4.5 adds x6 and Dynamic Multi Frame
|
||||
* Generation (v1.6.0).
|
||||
* - AMD: FSR Native AA + 4 quality bins. FSR 3.1 caps at x3.
|
||||
* - Intel: XeSS Native AA + Ultra Quality + 4 quality bins. Intel XeFG
|
||||
* has only shipped x2.
|
||||
* - none: vendor-agnostic legacy ladder (no DLAA, no Ultra Quality) —
|
||||
* keeps pre-v0.11 presets / templates rendering without coercion loss.
|
||||
*
|
||||
* Every vendor also offers `"custom"` (v1.6.0): the frame generation typed
|
||||
* into `frameGenCustom`, for a mode the list doesn't name.
|
||||
*
|
||||
* Pure functions — used by VideoSettingsForm to filter Select options
|
||||
* and by description-builder / editor-store / template-store to coerce
|
||||
* invalid vendor×quality combos back to `"none"` on rehydrate.
|
||||
@@ -55,16 +59,25 @@ export function getValidUpscaleQualities(vendor: FrameGenVendor): readonly Upsca
|
||||
export function getValidFrameGenMultipliers(vendor: FrameGenVendor): readonly FrameGenMultiplier[] {
|
||||
switch (vendor) {
|
||||
case "nvidia":
|
||||
return ["none", "x2", "x3", "x4"] as const;
|
||||
return ["none", "x2", "x3", "x4", "x6", "dynamic", "custom"] as const;
|
||||
case "amd":
|
||||
return ["none", "x2", "x3"] as const;
|
||||
return ["none", "x2", "x3", "custom"] as const;
|
||||
case "intel":
|
||||
return ["none", "x2"] as const;
|
||||
return ["none", "x2", "custom"] as const;
|
||||
case "none":
|
||||
return ["none"] as const;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* DLSS 5 Neural Rendering (v1.6.0) is NVIDIA's (RTX 50 series): any other
|
||||
* vendor turns it off, the way an invalid quality or multiplier falls back
|
||||
* to `"none"`.
|
||||
*/
|
||||
export function coerceDlssNeuralRendering(vendor: FrameGenVendor, current: boolean): boolean {
|
||||
return vendor === "nvidia" && current;
|
||||
}
|
||||
|
||||
/** Returns `current` if it's valid for the vendor, else `"none"`. */
|
||||
export function coerceUpscaleQuality(
|
||||
vendor: FrameGenVendor,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { RIG_FIELDS, formatRigValue } from "@config/rig-fields";
|
||||
import { RIG_FIELDS, formatRigValue, isCustomRigValue } from "@config/rig-fields";
|
||||
import type { TranslationFn } from "./types";
|
||||
|
||||
/**
|
||||
@@ -9,6 +9,9 @@ import type { TranslationFn } from "./types";
|
||||
* order is {@link RIG_FIELDS}'. Both used to come from the stored object:
|
||||
* every language printed English keys in capitals ("VIDEO EDITOR:"), in
|
||||
* whatever order the fields had first been filled in.
|
||||
*
|
||||
* v1.6.0: a field with a `customNoteKey` set to "Custom" prints that note
|
||||
* as its whole line — the LUT's "LUT applied".
|
||||
*/
|
||||
export function buildRigLines(
|
||||
rig: Partial<Record<string, string>> | undefined,
|
||||
@@ -19,7 +22,9 @@ export function buildRigLines(
|
||||
|
||||
const lines = RIG_FIELDS.flatMap((field) => {
|
||||
const value = formatRigValue(field.id, rig[field.id] ?? "").trim();
|
||||
return value ? [`${t(`description.rigLabels.${field.id}`)}: ${value}`] : [];
|
||||
if (!value) return [];
|
||||
if (field.customNoteKey && isCustomRigValue(value)) return [t(field.customNoteKey)];
|
||||
return [`${t(`description.rigLabels.${field.id}`)}: ${value}`];
|
||||
});
|
||||
|
||||
// Keys that aren't rig fields any more (older versions, hand-edited
|
||||
|
||||
@@ -686,8 +686,12 @@ export interface GeneratorInput {
|
||||
frameGenVendor?: FrameGenVendor;
|
||||
/** Frame-generation multiplier (only meaningful when vendor !== "none"). */
|
||||
frameGenMultiplier?: FrameGenMultiplier;
|
||||
/** v1.6.0: the frame generation as typed, when {@link frameGenMultiplier} is `"custom"`. */
|
||||
frameGenCustom?: string;
|
||||
/** Upscaling quality (DLSS / FSR / XeSS quality preset). */
|
||||
upscaleQuality?: UpscaleQuality;
|
||||
/** v1.6.0: NVIDIA DLSS 5 Neural Rendering — printed only when the vendor is NVIDIA. */
|
||||
dlssNeuralRendering?: boolean;
|
||||
/** High-level art-style descriptor — surfaces a separate line. */
|
||||
artStyle?: ArtStyle;
|
||||
/**
|
||||
|
||||
@@ -52,7 +52,9 @@ export function buildGeneratorInputFromEditor(
|
||||
rayTracingModes: state.rayTracingModes,
|
||||
frameGenVendor: state.frameGenVendor,
|
||||
frameGenMultiplier: state.frameGenMultiplier,
|
||||
frameGenCustom: state.frameGenCustom,
|
||||
upscaleQuality: state.upscaleQuality,
|
||||
dlssNeuralRendering: state.dlssNeuralRendering,
|
||||
artStyle: state.artStyle,
|
||||
videoStyleEra: state.videoStyleEra,
|
||||
versionInfo: state.versionInfo,
|
||||
|
||||
@@ -121,7 +121,10 @@
|
||||
"rayTracing",
|
||||
"frameGenVendor",
|
||||
"frameGenMultiplier",
|
||||
"frameGenCustom",
|
||||
"frameGenCustomPlaceholder",
|
||||
"upscaleQuality",
|
||||
"dlssNeuralRendering",
|
||||
"artStyle",
|
||||
"videoStyle",
|
||||
"videoStyleHelp",
|
||||
@@ -229,10 +232,10 @@
|
||||
],
|
||||
"editor.rtOptions": ["ray_tracing", "full_rt", "path_tracing", "ray_reconstruction"],
|
||||
"editor.frameGenVendorOptions": ["none", "nvidia", "amd", "intel"],
|
||||
"editor.frameGenMultiplierOptions": ["none", "x2", "x3", "x4", "x6"],
|
||||
"editor.frameGenMultiplier.nvidia": ["none", "x2", "x3", "x4"],
|
||||
"editor.frameGenMultiplier.amd": ["none", "x2", "x3"],
|
||||
"editor.frameGenMultiplier.intel": ["none", "x2"],
|
||||
"editor.frameGenMultiplierOptions": ["none", "x2", "x3", "x4", "x6", "dynamic", "custom"],
|
||||
"editor.frameGenMultiplier.nvidia": ["none", "x2", "x3", "x4", "x6", "dynamic", "custom"],
|
||||
"editor.frameGenMultiplier.amd": ["none", "x2", "x3", "custom"],
|
||||
"editor.frameGenMultiplier.intel": ["none", "x2", "custom"],
|
||||
"editor.upscaleQualityOptions": [
|
||||
"none",
|
||||
"native_aa",
|
||||
@@ -1593,7 +1596,8 @@
|
||||
"videoLabel",
|
||||
"inGameSettingLabel",
|
||||
"versionLabel",
|
||||
"upscaleLabel"
|
||||
"upscaleLabel",
|
||||
"dlssNeuralRendering"
|
||||
],
|
||||
"description.graphics.presetOptions": [
|
||||
"low",
|
||||
@@ -1642,7 +1646,7 @@
|
||||
"performance",
|
||||
"ultra_performance"
|
||||
],
|
||||
"description.graphics.frameGen.nvidia": ["none", "x2", "x3", "x4"],
|
||||
"description.graphics.frameGen.nvidia": ["none", "x2", "x3", "x4", "x6", "dynamic"],
|
||||
"description.graphics.frameGen.amd": ["none", "x2", "x3"],
|
||||
"description.graphics.frameGen.intel": ["none", "x2"],
|
||||
"description.graphics.artStyleOptions": [
|
||||
@@ -1725,6 +1729,7 @@
|
||||
"controller",
|
||||
"video_editor",
|
||||
"lut"
|
||||
]
|
||||
],
|
||||
"description.rigNotes": ["lut_custom"]
|
||||
}
|
||||
}
|
||||
@@ -534,7 +534,9 @@
|
||||
"none": "",
|
||||
"x2": "NVIDIA Frame Generation x2",
|
||||
"x3": "NVIDIA Multi Frame Generation x3",
|
||||
"x4": "NVIDIA Multi Frame Generation x4"
|
||||
"x4": "NVIDIA Multi Frame Generation x4",
|
||||
"x6": "NVIDIA Multi Frame Generation x6",
|
||||
"dynamic": "NVIDIA Dynamic Multi Frame Generation"
|
||||
},
|
||||
"amd": {
|
||||
"none": "",
|
||||
@@ -561,7 +563,8 @@
|
||||
"videoLabel": "Video",
|
||||
"inGameSettingLabel": "In-game Setting",
|
||||
"versionLabel": "Version",
|
||||
"upscaleLabel": "Upscale"
|
||||
"upscaleLabel": "Upscale",
|
||||
"dlssNeuralRendering": "NVIDIA DLSS 5 Neural Rendering"
|
||||
},
|
||||
"videoSettings": {
|
||||
"styleLine": "Edited in {{era}} style using {{editor}}",
|
||||
@@ -597,6 +600,9 @@
|
||||
"controller": "Controller",
|
||||
"video_editor": "Video Editor",
|
||||
"lut": "LUT"
|
||||
},
|
||||
"rigNotes": {
|
||||
"lut_custom": "LUT applied"
|
||||
}
|
||||
},
|
||||
"pinnedComment": {
|
||||
|
||||
@@ -207,23 +207,32 @@
|
||||
"x2": "x2",
|
||||
"x3": "x3",
|
||||
"x4": "x4",
|
||||
"x6": "x6"
|
||||
"x6": "x6",
|
||||
"dynamic": "Dynamic",
|
||||
"custom": "Custom…"
|
||||
},
|
||||
"frameGenMultiplier.nvidia": {
|
||||
"none": "None",
|
||||
"x2": "x2 (Frame Gen)",
|
||||
"x3": "x3 (Multi Frame Gen)",
|
||||
"x4": "x4 (Multi Frame Gen)"
|
||||
"x4": "x4 (Multi Frame Gen)",
|
||||
"x6": "x6 (Multi Frame Gen)",
|
||||
"dynamic": "Dynamic (Multi Frame Gen)",
|
||||
"custom": "Custom…"
|
||||
},
|
||||
"frameGenMultiplier.amd": {
|
||||
"none": "None",
|
||||
"x2": "x2 (Fluid Motion Frames)",
|
||||
"x3": "x3 (Fluid Motion Frames)"
|
||||
"x3": "x3 (Fluid Motion Frames)",
|
||||
"custom": "Custom…"
|
||||
},
|
||||
"frameGenMultiplier.intel": {
|
||||
"none": "None",
|
||||
"x2": "x2 (XeFG)"
|
||||
"x2": "x2 (XeFG)",
|
||||
"custom": "Custom…"
|
||||
},
|
||||
"frameGenCustom": "Custom frame generation",
|
||||
"frameGenCustomPlaceholder": "e.g. NVIDIA Smooth Motion, Lossless Scaling x3",
|
||||
"upscaleQuality": "Upscaling Quality",
|
||||
"upscaleQualityOptions": {
|
||||
"none": "None",
|
||||
@@ -258,6 +267,7 @@
|
||||
"performance": "XeSS Performance",
|
||||
"ultra_performance": "XeSS Ultra Performance"
|
||||
},
|
||||
"dlssNeuralRendering": "DLSS 5 Neural Rendering",
|
||||
"artStyle": "Art Style",
|
||||
"artStyleOptions": {
|
||||
"none": "— Not set —",
|
||||
|
||||
@@ -534,7 +534,9 @@
|
||||
"none": "",
|
||||
"x2": "NVIDIA Frame Generation x2",
|
||||
"x3": "NVIDIA Multi Frame Generation x3",
|
||||
"x4": "NVIDIA Multi Frame Generation x4"
|
||||
"x4": "NVIDIA Multi Frame Generation x4",
|
||||
"x6": "NVIDIA Multi Frame Generation x6",
|
||||
"dynamic": "NVIDIA Dynamic Multi Frame Generation"
|
||||
},
|
||||
"amd": {
|
||||
"none": "",
|
||||
@@ -561,7 +563,8 @@
|
||||
"videoLabel": "Video",
|
||||
"inGameSettingLabel": "In-game Setting",
|
||||
"versionLabel": "Version",
|
||||
"upscaleLabel": "Upscale"
|
||||
"upscaleLabel": "Upscale",
|
||||
"dlssNeuralRendering": "NVIDIA DLSS 5 Neural Rendering"
|
||||
},
|
||||
"videoSettings": {
|
||||
"styleLine": "Editado con estilo {{era}} usando {{editor}}",
|
||||
@@ -597,6 +600,9 @@
|
||||
"controller": "Mando",
|
||||
"video_editor": "Editor de Video",
|
||||
"lut": "LUT"
|
||||
},
|
||||
"rigNotes": {
|
||||
"lut_custom": "LUT aplicada"
|
||||
}
|
||||
},
|
||||
"pinnedComment": {
|
||||
|
||||
@@ -207,23 +207,32 @@
|
||||
"x2": "x2",
|
||||
"x3": "x3",
|
||||
"x4": "x4",
|
||||
"x6": "x6"
|
||||
"x6": "x6",
|
||||
"dynamic": "Dynamic",
|
||||
"custom": "Custom…"
|
||||
},
|
||||
"frameGenMultiplier.nvidia": {
|
||||
"none": "None",
|
||||
"x2": "x2 (Frame Gen)",
|
||||
"x3": "x3 (Multi Frame Gen)",
|
||||
"x4": "x4 (Multi Frame Gen)"
|
||||
"x4": "x4 (Multi Frame Gen)",
|
||||
"x6": "x6 (Multi Frame Gen)",
|
||||
"dynamic": "Dynamic (Multi Frame Gen)",
|
||||
"custom": "Custom…"
|
||||
},
|
||||
"frameGenMultiplier.amd": {
|
||||
"none": "None",
|
||||
"x2": "x2 (Fluid Motion Frames)",
|
||||
"x3": "x3 (Fluid Motion Frames)"
|
||||
"x3": "x3 (Fluid Motion Frames)",
|
||||
"custom": "Custom…"
|
||||
},
|
||||
"frameGenMultiplier.intel": {
|
||||
"none": "None",
|
||||
"x2": "x2 (XeFG)"
|
||||
"x2": "x2 (XeFG)",
|
||||
"custom": "Custom…"
|
||||
},
|
||||
"frameGenCustom": "Custom frame generation",
|
||||
"frameGenCustomPlaceholder": "e.g. NVIDIA Smooth Motion, Lossless Scaling x3",
|
||||
"upscaleQuality": "Upscaling Quality",
|
||||
"upscaleQualityOptions": {
|
||||
"none": "None",
|
||||
@@ -258,6 +267,7 @@
|
||||
"performance": "XeSS Performance",
|
||||
"ultra_performance": "XeSS Ultra Performance"
|
||||
},
|
||||
"dlssNeuralRendering": "DLSS 5 Neural Rendering",
|
||||
"artStyle": "Art Style",
|
||||
"artStyleOptions": {
|
||||
"none": "— Not set —",
|
||||
|
||||
@@ -534,7 +534,9 @@
|
||||
"none": "",
|
||||
"x2": "NVIDIA Frame Generation x2",
|
||||
"x3": "NVIDIA Multi Frame Generation x3",
|
||||
"x4": "NVIDIA Multi Frame Generation x4"
|
||||
"x4": "NVIDIA Multi Frame Generation x4",
|
||||
"x6": "NVIDIA Multi Frame Generation x6",
|
||||
"dynamic": "NVIDIA Dynamic Multi Frame Generation"
|
||||
},
|
||||
"amd": {
|
||||
"none": "",
|
||||
@@ -561,7 +563,8 @@
|
||||
"videoLabel": "Video",
|
||||
"inGameSettingLabel": "Pengaturan dalam game",
|
||||
"versionLabel": "Versi",
|
||||
"upscaleLabel": "Upscale"
|
||||
"upscaleLabel": "Upscale",
|
||||
"dlssNeuralRendering": "NVIDIA DLSS 5 Neural Rendering"
|
||||
},
|
||||
"videoSettings": {
|
||||
"styleLine": "Diedit dengan gaya {{era}} memakai {{editor}}",
|
||||
@@ -597,6 +600,9 @@
|
||||
"controller": "Kontroler",
|
||||
"video_editor": "Editor Video",
|
||||
"lut": "LUT"
|
||||
},
|
||||
"rigNotes": {
|
||||
"lut_custom": "LUT diterapkan"
|
||||
}
|
||||
},
|
||||
"pinnedComment": {
|
||||
|
||||
@@ -207,23 +207,32 @@
|
||||
"x2": "x2",
|
||||
"x3": "x3",
|
||||
"x4": "x4",
|
||||
"x6": "x6"
|
||||
"x6": "x6",
|
||||
"dynamic": "Dinamis",
|
||||
"custom": "Kustom…"
|
||||
},
|
||||
"frameGenMultiplier.nvidia": {
|
||||
"none": "Tidak ada",
|
||||
"x2": "x2 (Frame Gen)",
|
||||
"x3": "x3 (Multi Frame Gen)",
|
||||
"x4": "x4 (Multi Frame Gen)"
|
||||
"x4": "x4 (Multi Frame Gen)",
|
||||
"x6": "x6 (Multi Frame Gen)",
|
||||
"dynamic": "Dynamic (Multi Frame Gen)",
|
||||
"custom": "Kustom…"
|
||||
},
|
||||
"frameGenMultiplier.amd": {
|
||||
"none": "Tidak ada",
|
||||
"x2": "x2 (Fluid Motion Frames)",
|
||||
"x3": "x3 (Fluid Motion Frames)"
|
||||
"x3": "x3 (Fluid Motion Frames)",
|
||||
"custom": "Kustom…"
|
||||
},
|
||||
"frameGenMultiplier.intel": {
|
||||
"none": "Tidak ada",
|
||||
"x2": "x2 (XeFG)"
|
||||
"x2": "x2 (XeFG)",
|
||||
"custom": "Kustom…"
|
||||
},
|
||||
"frameGenCustom": "Frame Gen kustom",
|
||||
"frameGenCustomPlaceholder": "mis. NVIDIA Smooth Motion, Lossless Scaling x3",
|
||||
"upscaleQuality": "Kualitas Upscaling",
|
||||
"upscaleQualityOptions": {
|
||||
"none": "Tidak ada",
|
||||
@@ -258,6 +267,7 @@
|
||||
"performance": "XeSS Performance",
|
||||
"ultra_performance": "XeSS Ultra Performance"
|
||||
},
|
||||
"dlssNeuralRendering": "DLSS 5 Neural Rendering",
|
||||
"artStyle": "Gaya visual",
|
||||
"artStyleOptions": {
|
||||
"none": "— Tidak diatur —",
|
||||
|
||||
@@ -534,7 +534,9 @@
|
||||
"none": "",
|
||||
"x2": "NVIDIA Frame Generation x2",
|
||||
"x3": "NVIDIA Multi Frame Generation x3",
|
||||
"x4": "NVIDIA Multi Frame Generation x4"
|
||||
"x4": "NVIDIA Multi Frame Generation x4",
|
||||
"x6": "NVIDIA Multi Frame Generation x6",
|
||||
"dynamic": "NVIDIA Dynamic Multi Frame Generation"
|
||||
},
|
||||
"amd": {
|
||||
"none": "",
|
||||
@@ -561,7 +563,8 @@
|
||||
"videoLabel": "Video",
|
||||
"inGameSettingLabel": "In-game Setting",
|
||||
"versionLabel": "Version",
|
||||
"upscaleLabel": "Upscale"
|
||||
"upscaleLabel": "Upscale",
|
||||
"dlssNeuralRendering": "NVIDIA DLSS 5 Neural Rendering"
|
||||
},
|
||||
"videoSettings": {
|
||||
"styleLine": "{{editor}}で{{era}}スタイルに編集",
|
||||
@@ -597,6 +600,9 @@
|
||||
"controller": "コントローラー",
|
||||
"video_editor": "動画編集ソフト",
|
||||
"lut": "LUT"
|
||||
},
|
||||
"rigNotes": {
|
||||
"lut_custom": "LUT適用"
|
||||
}
|
||||
},
|
||||
"pinnedComment": {
|
||||
|
||||
@@ -207,23 +207,32 @@
|
||||
"x2": "x2",
|
||||
"x3": "x3",
|
||||
"x4": "x4",
|
||||
"x6": "x6"
|
||||
"x6": "x6",
|
||||
"dynamic": "Dynamic",
|
||||
"custom": "Custom…"
|
||||
},
|
||||
"frameGenMultiplier.nvidia": {
|
||||
"none": "None",
|
||||
"x2": "x2 (Frame Gen)",
|
||||
"x3": "x3 (Multi Frame Gen)",
|
||||
"x4": "x4 (Multi Frame Gen)"
|
||||
"x4": "x4 (Multi Frame Gen)",
|
||||
"x6": "x6 (Multi Frame Gen)",
|
||||
"dynamic": "Dynamic (Multi Frame Gen)",
|
||||
"custom": "Custom…"
|
||||
},
|
||||
"frameGenMultiplier.amd": {
|
||||
"none": "None",
|
||||
"x2": "x2 (Fluid Motion Frames)",
|
||||
"x3": "x3 (Fluid Motion Frames)"
|
||||
"x3": "x3 (Fluid Motion Frames)",
|
||||
"custom": "Custom…"
|
||||
},
|
||||
"frameGenMultiplier.intel": {
|
||||
"none": "None",
|
||||
"x2": "x2 (XeFG)"
|
||||
"x2": "x2 (XeFG)",
|
||||
"custom": "Custom…"
|
||||
},
|
||||
"frameGenCustom": "Custom frame generation",
|
||||
"frameGenCustomPlaceholder": "e.g. NVIDIA Smooth Motion, Lossless Scaling x3",
|
||||
"upscaleQuality": "Upscaling Quality",
|
||||
"upscaleQualityOptions": {
|
||||
"none": "None",
|
||||
@@ -258,6 +267,7 @@
|
||||
"performance": "XeSS Performance",
|
||||
"ultra_performance": "XeSS Ultra Performance"
|
||||
},
|
||||
"dlssNeuralRendering": "DLSS 5 Neural Rendering",
|
||||
"artStyle": "Art Style",
|
||||
"artStyleOptions": {
|
||||
"none": "— Not set —",
|
||||
|
||||
@@ -534,7 +534,9 @@
|
||||
"none": "",
|
||||
"x2": "NVIDIA Frame Generation x2",
|
||||
"x3": "NVIDIA Multi Frame Generation x3",
|
||||
"x4": "NVIDIA Multi Frame Generation x4"
|
||||
"x4": "NVIDIA Multi Frame Generation x4",
|
||||
"x6": "NVIDIA Multi Frame Generation x6",
|
||||
"dynamic": "NVIDIA Dynamic Multi Frame Generation"
|
||||
},
|
||||
"amd": {
|
||||
"none": "",
|
||||
@@ -561,7 +563,8 @@
|
||||
"videoLabel": "Video",
|
||||
"inGameSettingLabel": "In-game Setting",
|
||||
"versionLabel": "Version",
|
||||
"upscaleLabel": "Upscale"
|
||||
"upscaleLabel": "Upscale",
|
||||
"dlssNeuralRendering": "NVIDIA DLSS 5 Neural Rendering"
|
||||
},
|
||||
"videoSettings": {
|
||||
"styleLine": "{{editor}}로 {{era}} 스타일 편집",
|
||||
@@ -597,6 +600,9 @@
|
||||
"controller": "컨트롤러",
|
||||
"video_editor": "영상 편집 프로그램",
|
||||
"lut": "LUT"
|
||||
},
|
||||
"rigNotes": {
|
||||
"lut_custom": "LUT 적용"
|
||||
}
|
||||
},
|
||||
"pinnedComment": {
|
||||
|
||||
@@ -207,23 +207,32 @@
|
||||
"x2": "x2",
|
||||
"x3": "x3",
|
||||
"x4": "x4",
|
||||
"x6": "x6"
|
||||
"x6": "x6",
|
||||
"dynamic": "Dynamic",
|
||||
"custom": "Custom…"
|
||||
},
|
||||
"frameGenMultiplier.nvidia": {
|
||||
"none": "None",
|
||||
"x2": "x2 (Frame Gen)",
|
||||
"x3": "x3 (Multi Frame Gen)",
|
||||
"x4": "x4 (Multi Frame Gen)"
|
||||
"x4": "x4 (Multi Frame Gen)",
|
||||
"x6": "x6 (Multi Frame Gen)",
|
||||
"dynamic": "Dynamic (Multi Frame Gen)",
|
||||
"custom": "Custom…"
|
||||
},
|
||||
"frameGenMultiplier.amd": {
|
||||
"none": "None",
|
||||
"x2": "x2 (Fluid Motion Frames)",
|
||||
"x3": "x3 (Fluid Motion Frames)"
|
||||
"x3": "x3 (Fluid Motion Frames)",
|
||||
"custom": "Custom…"
|
||||
},
|
||||
"frameGenMultiplier.intel": {
|
||||
"none": "None",
|
||||
"x2": "x2 (XeFG)"
|
||||
"x2": "x2 (XeFG)",
|
||||
"custom": "Custom…"
|
||||
},
|
||||
"frameGenCustom": "Custom frame generation",
|
||||
"frameGenCustomPlaceholder": "e.g. NVIDIA Smooth Motion, Lossless Scaling x3",
|
||||
"upscaleQuality": "Upscaling Quality",
|
||||
"upscaleQualityOptions": {
|
||||
"none": "None",
|
||||
@@ -258,6 +267,7 @@
|
||||
"performance": "XeSS Performance",
|
||||
"ultra_performance": "XeSS Ultra Performance"
|
||||
},
|
||||
"dlssNeuralRendering": "DLSS 5 Neural Rendering",
|
||||
"artStyle": "Art Style",
|
||||
"artStyleOptions": {
|
||||
"none": "— Not set —",
|
||||
|
||||
@@ -534,7 +534,9 @@
|
||||
"none": "",
|
||||
"x2": "NVIDIA Frame Generation x2",
|
||||
"x3": "NVIDIA Multi Frame Generation x3",
|
||||
"x4": "NVIDIA Multi Frame Generation x4"
|
||||
"x4": "NVIDIA Multi Frame Generation x4",
|
||||
"x6": "NVIDIA Multi Frame Generation x6",
|
||||
"dynamic": "NVIDIA Dynamic Multi Frame Generation"
|
||||
},
|
||||
"amd": {
|
||||
"none": "",
|
||||
@@ -561,7 +563,8 @@
|
||||
"videoLabel": "Vídeo",
|
||||
"inGameSettingLabel": "Configuração no jogo",
|
||||
"versionLabel": "Versão",
|
||||
"upscaleLabel": "Upscale"
|
||||
"upscaleLabel": "Upscale",
|
||||
"dlssNeuralRendering": "NVIDIA DLSS 5 Neural Rendering"
|
||||
},
|
||||
"videoSettings": {
|
||||
"styleLine": "Editado no estilo {{era}} usando {{editor}}",
|
||||
@@ -597,6 +600,9 @@
|
||||
"controller": "Controle",
|
||||
"video_editor": "Editor de vídeo",
|
||||
"lut": "LUT"
|
||||
},
|
||||
"rigNotes": {
|
||||
"lut_custom": "LUT aplicada"
|
||||
}
|
||||
},
|
||||
"pinnedComment": {
|
||||
|
||||
@@ -207,23 +207,32 @@
|
||||
"x2": "x2",
|
||||
"x3": "x3",
|
||||
"x4": "x4",
|
||||
"x6": "x6"
|
||||
"x6": "x6",
|
||||
"dynamic": "Dinâmico",
|
||||
"custom": "Personalizado…"
|
||||
},
|
||||
"frameGenMultiplier.nvidia": {
|
||||
"none": "Nenhum",
|
||||
"x2": "x2 (Frame Gen)",
|
||||
"x3": "x3 (Multi Frame Gen)",
|
||||
"x4": "x4 (Multi Frame Gen)"
|
||||
"x4": "x4 (Multi Frame Gen)",
|
||||
"x6": "x6 (Multi Frame Gen)",
|
||||
"dynamic": "Dynamic (Multi Frame Gen)",
|
||||
"custom": "Personalizado…"
|
||||
},
|
||||
"frameGenMultiplier.amd": {
|
||||
"none": "Nenhum",
|
||||
"x2": "x2 (Fluid Motion Frames)",
|
||||
"x3": "x3 (Fluid Motion Frames)"
|
||||
"x3": "x3 (Fluid Motion Frames)",
|
||||
"custom": "Personalizado…"
|
||||
},
|
||||
"frameGenMultiplier.intel": {
|
||||
"none": "Nenhum",
|
||||
"x2": "x2 (XeFG)"
|
||||
"x2": "x2 (XeFG)",
|
||||
"custom": "Personalizado…"
|
||||
},
|
||||
"frameGenCustom": "Frame Gen personalizado",
|
||||
"frameGenCustomPlaceholder": "ex.: NVIDIA Smooth Motion, Lossless Scaling x3",
|
||||
"upscaleQuality": "Qualidade do upscaling",
|
||||
"upscaleQualityOptions": {
|
||||
"none": "Nenhuma",
|
||||
@@ -258,6 +267,7 @@
|
||||
"performance": "XeSS Performance",
|
||||
"ultra_performance": "XeSS Ultra Performance"
|
||||
},
|
||||
"dlssNeuralRendering": "DLSS 5 Neural Rendering",
|
||||
"artStyle": "Estilo de arte",
|
||||
"artStyleOptions": {
|
||||
"none": "— Não definido —",
|
||||
|
||||
@@ -534,7 +534,9 @@
|
||||
"none": "",
|
||||
"x2": "NVIDIA Frame Generation x2",
|
||||
"x3": "NVIDIA Multi Frame Generation x3",
|
||||
"x4": "NVIDIA Multi Frame Generation x4"
|
||||
"x4": "NVIDIA Multi Frame Generation x4",
|
||||
"x6": "NVIDIA Multi Frame Generation x6",
|
||||
"dynamic": "NVIDIA Dynamic Multi Frame Generation"
|
||||
},
|
||||
"amd": {
|
||||
"none": "",
|
||||
@@ -561,7 +563,8 @@
|
||||
"videoLabel": "Video",
|
||||
"inGameSettingLabel": "In-game Setting",
|
||||
"versionLabel": "Version",
|
||||
"upscaleLabel": "Upscale"
|
||||
"upscaleLabel": "Upscale",
|
||||
"dlssNeuralRendering": "NVIDIA DLSS 5 Neural Rendering"
|
||||
},
|
||||
"videoSettings": {
|
||||
"styleLine": "Dựng theo phong cách {{era}} bằng {{editor}}",
|
||||
@@ -597,6 +600,9 @@
|
||||
"controller": "Tay cầm",
|
||||
"video_editor": "Phần mềm dựng video",
|
||||
"lut": "LUT"
|
||||
},
|
||||
"rigNotes": {
|
||||
"lut_custom": "Có áp dụng LUT"
|
||||
}
|
||||
},
|
||||
"pinnedComment": {
|
||||
|
||||
@@ -207,23 +207,32 @@
|
||||
"x2": "x2",
|
||||
"x3": "x3",
|
||||
"x4": "x4",
|
||||
"x6": "x6"
|
||||
"x6": "x6",
|
||||
"dynamic": "Dynamic",
|
||||
"custom": "Tùy chỉnh…"
|
||||
},
|
||||
"frameGenMultiplier.nvidia": {
|
||||
"none": "Không",
|
||||
"x2": "x2 (Frame Gen)",
|
||||
"x3": "x3 (Multi Frame Gen)",
|
||||
"x4": "x4 (Multi Frame Gen)"
|
||||
"x4": "x4 (Multi Frame Gen)",
|
||||
"x6": "x6 (Multi Frame Gen)",
|
||||
"dynamic": "Dynamic (Multi Frame Gen)",
|
||||
"custom": "Tùy chỉnh…"
|
||||
},
|
||||
"frameGenMultiplier.amd": {
|
||||
"none": "Không",
|
||||
"x2": "x2 (Fluid Motion Frames)",
|
||||
"x3": "x3 (Fluid Motion Frames)"
|
||||
"x3": "x3 (Fluid Motion Frames)",
|
||||
"custom": "Tùy chỉnh…"
|
||||
},
|
||||
"frameGenMultiplier.intel": {
|
||||
"none": "Không",
|
||||
"x2": "x2 (XeFG)"
|
||||
"x2": "x2 (XeFG)",
|
||||
"custom": "Tùy chỉnh…"
|
||||
},
|
||||
"frameGenCustom": "Frame Gen tuỳ chỉnh",
|
||||
"frameGenCustomPlaceholder": "vd: NVIDIA Smooth Motion, Lossless Scaling x3",
|
||||
"upscaleQuality": "Chất lượng Upscale",
|
||||
"upscaleQualityOptions": {
|
||||
"none": "Không",
|
||||
@@ -258,6 +267,7 @@
|
||||
"performance": "XeSS Performance",
|
||||
"ultra_performance": "XeSS Ultra Performance"
|
||||
},
|
||||
"dlssNeuralRendering": "DLSS 5 Neural Rendering",
|
||||
"artStyle": "Phong cách hình ảnh",
|
||||
"artStyleOptions": {
|
||||
"none": "— Chưa chọn —",
|
||||
|
||||
@@ -534,7 +534,9 @@
|
||||
"none": "",
|
||||
"x2": "NVIDIA Frame Generation x2",
|
||||
"x3": "NVIDIA Multi Frame Generation x3",
|
||||
"x4": "NVIDIA Multi Frame Generation x4"
|
||||
"x4": "NVIDIA Multi Frame Generation x4",
|
||||
"x6": "NVIDIA Multi Frame Generation x6",
|
||||
"dynamic": "NVIDIA Dynamic Multi Frame Generation"
|
||||
},
|
||||
"amd": {
|
||||
"none": "",
|
||||
@@ -561,7 +563,8 @@
|
||||
"videoLabel": "Video",
|
||||
"inGameSettingLabel": "In-game Setting",
|
||||
"versionLabel": "Version",
|
||||
"upscaleLabel": "Upscale"
|
||||
"upscaleLabel": "Upscale",
|
||||
"dlssNeuralRendering": "NVIDIA DLSS 5 Neural Rendering"
|
||||
},
|
||||
"videoSettings": {
|
||||
"styleLine": "使用 {{editor}} 以 {{era}} 风格剪辑",
|
||||
@@ -597,6 +600,9 @@
|
||||
"controller": "手柄",
|
||||
"video_editor": "视频编辑软件",
|
||||
"lut": "LUT"
|
||||
},
|
||||
"rigNotes": {
|
||||
"lut_custom": "已应用 LUT"
|
||||
}
|
||||
},
|
||||
"pinnedComment": {
|
||||
|
||||
@@ -207,23 +207,32 @@
|
||||
"x2": "x2",
|
||||
"x3": "x3",
|
||||
"x4": "x4",
|
||||
"x6": "x6"
|
||||
"x6": "x6",
|
||||
"dynamic": "Dynamic",
|
||||
"custom": "Custom…"
|
||||
},
|
||||
"frameGenMultiplier.nvidia": {
|
||||
"none": "None",
|
||||
"x2": "x2 (Frame Gen)",
|
||||
"x3": "x3 (Multi Frame Gen)",
|
||||
"x4": "x4 (Multi Frame Gen)"
|
||||
"x4": "x4 (Multi Frame Gen)",
|
||||
"x6": "x6 (Multi Frame Gen)",
|
||||
"dynamic": "Dynamic (Multi Frame Gen)",
|
||||
"custom": "Custom…"
|
||||
},
|
||||
"frameGenMultiplier.amd": {
|
||||
"none": "None",
|
||||
"x2": "x2 (Fluid Motion Frames)",
|
||||
"x3": "x3 (Fluid Motion Frames)"
|
||||
"x3": "x3 (Fluid Motion Frames)",
|
||||
"custom": "Custom…"
|
||||
},
|
||||
"frameGenMultiplier.intel": {
|
||||
"none": "None",
|
||||
"x2": "x2 (XeFG)"
|
||||
"x2": "x2 (XeFG)",
|
||||
"custom": "Custom…"
|
||||
},
|
||||
"frameGenCustom": "Custom frame generation",
|
||||
"frameGenCustomPlaceholder": "e.g. NVIDIA Smooth Motion, Lossless Scaling x3",
|
||||
"upscaleQuality": "Upscaling Quality",
|
||||
"upscaleQualityOptions": {
|
||||
"none": "None",
|
||||
@@ -258,6 +267,7 @@
|
||||
"performance": "XeSS Performance",
|
||||
"ultra_performance": "XeSS Ultra Performance"
|
||||
},
|
||||
"dlssNeuralRendering": "DLSS 5 Neural Rendering",
|
||||
"artStyle": "Art Style",
|
||||
"artStyleOptions": {
|
||||
"none": "— Not set —",
|
||||
|
||||
@@ -27,7 +27,11 @@ import {
|
||||
isUpscaledFrom,
|
||||
} from "@config/graphics-settings";
|
||||
import { isVideoStyleEra, type VideoStyleEra } from "@config/video-styles";
|
||||
import { coerceUpscaleQuality, coerceFrameGenMultiplier } from "@engine/graphics-vendor";
|
||||
import {
|
||||
coerceUpscaleQuality,
|
||||
coerceFrameGenMultiplier,
|
||||
coerceDlssNeuralRendering,
|
||||
} from "@engine/graphics-vendor";
|
||||
import {
|
||||
GACHA_QUEST_TYPES,
|
||||
DEFAULT_GACHA_QUEST_TYPE,
|
||||
@@ -81,7 +85,17 @@ export interface EditorData {
|
||||
rayTracingModes: RTMode[];
|
||||
frameGenVendor: FrameGenVendor;
|
||||
frameGenMultiplier: FrameGenMultiplier;
|
||||
/**
|
||||
* v1.6.0: the frame generation as typed, printed when
|
||||
* {@link frameGenMultiplier} is `"custom"` (e.g. "NVIDIA Smooth Motion").
|
||||
*/
|
||||
frameGenCustom: string;
|
||||
upscaleQuality: UpscaleQuality;
|
||||
/**
|
||||
* v1.6.0: NVIDIA DLSS 5 Neural Rendering, printed after the DLSS mode.
|
||||
* NVIDIA only: another vendor turns it off (`coerceDlssNeuralRendering`).
|
||||
*/
|
||||
dlssNeuralRendering: boolean;
|
||||
artStyle: ArtStyle;
|
||||
/**
|
||||
* Video-style era opt-in (v0.22.0). When non-empty, the description
|
||||
@@ -270,6 +284,10 @@ export function normalizeEditorPatch(
|
||||
if (typeof patch.frameGenMultiplier === "string") {
|
||||
out.frameGenMultiplier = coerceFrameGenMultiplier(vendor, patch.frameGenMultiplier);
|
||||
}
|
||||
// v1.6.0: DLSS 5 Neural Rendering is NVIDIA's.
|
||||
if (typeof patch.dlssNeuralRendering === "boolean") {
|
||||
out.dlssNeuralRendering = coerceDlssNeuralRendering(vendor, patch.dlssNeuralRendering);
|
||||
}
|
||||
}
|
||||
// v0.11: legacy `spoilerWarning` / `matureWarning` booleans on profiles
|
||||
// / presets / templates need to be expressed as checklist items in the
|
||||
@@ -419,7 +437,9 @@ const initialState: EditorData = {
|
||||
rayTracingModes: [...DEFAULTS.editor.rayTracingModes],
|
||||
frameGenVendor: DEFAULTS.editor.frameGenVendor,
|
||||
frameGenMultiplier: DEFAULTS.editor.frameGenMultiplier,
|
||||
frameGenCustom: DEFAULTS.editor.frameGenCustom,
|
||||
upscaleQuality: DEFAULTS.editor.upscaleQuality,
|
||||
dlssNeuralRendering: DEFAULTS.editor.dlssNeuralRendering,
|
||||
artStyle: DEFAULTS.editor.artStyle,
|
||||
videoStyleEra: DEFAULTS.editor.videoStyleEra,
|
||||
versionInfo: DEFAULTS.editor.versionInfo,
|
||||
@@ -493,7 +513,7 @@ export function editorDataOf(state: EditorData): EditorData {
|
||||
* Bump together with a new step in {@link migrateEditorState}; backups
|
||||
* record this number so an import can run the steps a draft still needs.
|
||||
*/
|
||||
export const EDITOR_STORE_VERSION = 21;
|
||||
export const EDITOR_STORE_VERSION = 22;
|
||||
|
||||
export const useEditorStore = create<EditorState>()(
|
||||
persist(
|
||||
@@ -649,6 +669,12 @@ export const useEditorStore = create<EditorState>()(
|
||||
// upscaled to `resolution` in the video editor) joined the
|
||||
// schema. Additive: back-fills to "" (not upscaled); a value
|
||||
// outside UPSCALED_FROM_OPTIONS coerces to "".
|
||||
// v21 → v22: v1.6.0. `frameGenCustom` (the frame generation typed
|
||||
// for the new `"custom"` multiplier) and `dlssNeuralRendering`
|
||||
// (NVIDIA DLSS 5 Neural Rendering) joined the schema.
|
||||
// Additive: back-fill to "" and false; non-string / non-boolean
|
||||
// values coerce to them. The new multipliers (`x6` for NVIDIA,
|
||||
// `dynamic`, `custom`) only widen the lists.
|
||||
version: EDITOR_STORE_VERSION,
|
||||
migrate: (persistedState, version) => migrateEditorState(persistedState, version),
|
||||
partialize: (state) => editorDataOf(state),
|
||||
@@ -928,6 +954,12 @@ export function migrateEditorState(persistedState: unknown, version: number): Ed
|
||||
// v1.5.0 upscaled video. Additive back-fill + defensive coercion.
|
||||
if (!isUpscaledFrom(state.upscaledFrom)) state.upscaledFrom = "";
|
||||
}
|
||||
if (version < 22) {
|
||||
// v1.6.0 custom frame generation + DLSS 5. Additive back-fill +
|
||||
// defensive coercion.
|
||||
if (typeof state.frameGenCustom !== "string") state.frameGenCustom = "";
|
||||
if (typeof state.dlssNeuralRendering !== "boolean") state.dlssNeuralRendering = false;
|
||||
}
|
||||
return { ...initialState, ...state } as EditorData;
|
||||
}
|
||||
|
||||
|
||||
@@ -323,6 +323,123 @@ describe("buildDescription", () => {
|
||||
expect(result).toContain("In-game Setting: High - Intel XeSS Ultra Quality + Intel XeFG x2");
|
||||
});
|
||||
|
||||
describe("v1.6.0: x6, Dynamic and Custom frame generation, DLSS 5 Neural Rendering", () => {
|
||||
const settingLine = (text: string) =>
|
||||
text.split("\n").find((line) => line.startsWith("In-game Setting:"));
|
||||
|
||||
it("names NVIDIA x6 and Dynamic Multi Frame Generation", () => {
|
||||
const t = createMockT("en");
|
||||
const x6 = buildDescription(
|
||||
makeInput({
|
||||
graphicsPreset: "ultra",
|
||||
frameGenVendor: "nvidia",
|
||||
upscaleQuality: "performance",
|
||||
frameGenMultiplier: "x6",
|
||||
}),
|
||||
t,
|
||||
);
|
||||
expect(settingLine(x6)).toBe(
|
||||
"In-game Setting: Ultra - NVIDIA DLSS Performance + NVIDIA Multi Frame Generation x6",
|
||||
);
|
||||
const dynamic = buildDescription(
|
||||
makeInput({
|
||||
graphicsPreset: "ultra",
|
||||
frameGenVendor: "nvidia",
|
||||
frameGenMultiplier: "dynamic",
|
||||
}),
|
||||
t,
|
||||
);
|
||||
expect(settingLine(dynamic)).toBe(
|
||||
"In-game Setting: Ultra - NVIDIA Dynamic Multi Frame Generation",
|
||||
);
|
||||
});
|
||||
|
||||
it("prints a custom frame generation as typed, for any vendor", () => {
|
||||
const result = buildDescription(
|
||||
makeInput({
|
||||
graphicsPreset: "high",
|
||||
frameGenVendor: "amd",
|
||||
upscaleQuality: "quality",
|
||||
frameGenMultiplier: "custom",
|
||||
frameGenCustom: " Lossless Scaling x3 ",
|
||||
}),
|
||||
createMockT("en"),
|
||||
);
|
||||
expect(settingLine(result)).toBe(
|
||||
"In-game Setting: High - AMD FSR Quality + Lossless Scaling x3",
|
||||
);
|
||||
});
|
||||
|
||||
it("prints nothing for an empty custom box — not the word “custom”", () => {
|
||||
const result = buildDescription(
|
||||
makeInput({
|
||||
graphicsPreset: "high",
|
||||
frameGenVendor: "intel",
|
||||
upscaleQuality: "quality",
|
||||
frameGenMultiplier: "custom",
|
||||
frameGenCustom: " ",
|
||||
}),
|
||||
createMockT("en"),
|
||||
);
|
||||
expect(settingLine(result)).toBe("In-game Setting: High - Intel XeSS Quality");
|
||||
});
|
||||
|
||||
it("puts DLSS 5 Neural Rendering after the DLSS mode and before frame generation", () => {
|
||||
const result = buildDescription(
|
||||
makeInput({
|
||||
graphicsPreset: "ultra",
|
||||
frameGenVendor: "nvidia",
|
||||
upscaleQuality: "quality",
|
||||
dlssNeuralRendering: true,
|
||||
frameGenMultiplier: "dynamic",
|
||||
rayTracingModes: ["path_tracing"],
|
||||
}),
|
||||
createMockT("en"),
|
||||
);
|
||||
expect(settingLine(result)).toBe(
|
||||
"In-game Setting: Ultra - NVIDIA DLSS Quality + NVIDIA DLSS 5 Neural Rendering + NVIDIA Dynamic Multi Frame Generation with Path Tracing",
|
||||
);
|
||||
});
|
||||
|
||||
it("prints DLSS 5 Neural Rendering on its own, in every output language", () => {
|
||||
const vi = buildDescription(
|
||||
makeInput({
|
||||
language: "vi",
|
||||
graphicsPreset: "ultra",
|
||||
frameGenVendor: "nvidia",
|
||||
dlssNeuralRendering: true,
|
||||
}),
|
||||
createMockT("vi"),
|
||||
);
|
||||
expect(vi).toContain("NVIDIA DLSS 5 Neural Rendering");
|
||||
});
|
||||
|
||||
it("ignores a DLSS 5 flag left on another vendor's draft", () => {
|
||||
const result = buildDescription(
|
||||
makeInput({
|
||||
graphicsPreset: "ultra",
|
||||
frameGenVendor: "amd",
|
||||
upscaleQuality: "quality",
|
||||
dlssNeuralRendering: true,
|
||||
}),
|
||||
createMockT("en"),
|
||||
);
|
||||
expect(settingLine(result)).toBe("In-game Setting: Ultra - AMD FSR Quality");
|
||||
});
|
||||
|
||||
it("keeps the brand + multiplier fallback for a locale without the label", () => {
|
||||
// A mock translator that knows no frame-gen label at all.
|
||||
const en = createMockT("en");
|
||||
const bare = (key: string, options?: Record<string, string>) =>
|
||||
key.startsWith("description.graphics.frameGen.") ? key : en(key, options);
|
||||
const result = buildDescription(
|
||||
makeInput({ graphicsPreset: "ultra", frameGenVendor: "nvidia", frameGenMultiplier: "x6" }),
|
||||
bare,
|
||||
);
|
||||
expect(settingLine(result)).toBe("In-game Setting: Ultra - NVIDIA Frame Generation x6");
|
||||
});
|
||||
});
|
||||
|
||||
it("emits multiple RT modes joined with commas", () => {
|
||||
const t = createMockT("en");
|
||||
const result = buildDescription(
|
||||
@@ -751,6 +868,28 @@ describe("buildDescription", () => {
|
||||
expect(noLut).not.toContain("LUT:");
|
||||
});
|
||||
|
||||
it("prints a Custom LUT as just “LUT applied”, in the output language (v1.6.0)", () => {
|
||||
const rig = { video_editor: "davinci_resolve_studio|21.2", lut: "Custom" };
|
||||
const lineAfter = (text: string, line: string) => {
|
||||
const lines = text.split("\n");
|
||||
const at = lines.indexOf(line);
|
||||
return at >= 0 ? lines[at + 1] : undefined;
|
||||
};
|
||||
const en = buildDescription(makeInput({ rig }), createMockT("en"));
|
||||
expect(lineAfter(en, "Video Editor: DaVinci Resolve Studio 21.2")).toBe("LUT applied");
|
||||
expect(en).not.toContain("LUT: Custom");
|
||||
|
||||
const vi = buildDescription(makeInput({ language: "vi", rig }), createMockT("vi"));
|
||||
expect(lineAfter(vi, "Phần mềm dựng video: DaVinci Resolve Studio 21.2")).toBe(
|
||||
"Có áp dụng LUT",
|
||||
);
|
||||
|
||||
// Typed rather than picked: any case, stray spaces.
|
||||
const typed = buildDescription(makeInput({ rig: { lut: " cUSTOM " } }), createMockT("ja"));
|
||||
expect(typed).toContain("LUT適用");
|
||||
expect(typed).not.toContain("LUT: ");
|
||||
});
|
||||
|
||||
it("prints rig lines in a fixed order, whatever order they were filled in", () => {
|
||||
const t = createMockT("en");
|
||||
const result = buildDescription(
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
import { describe, it, expect } from "vitest";
|
||||
import {
|
||||
coerceDlssNeuralRendering,
|
||||
coerceFrameGenMultiplier,
|
||||
coerceUpscaleQuality,
|
||||
getValidFrameGenMultipliers,
|
||||
getValidUpscaleQualities,
|
||||
} from "@engine/graphics-vendor";
|
||||
import {
|
||||
FRAMEGEN_MULTIPLIERS,
|
||||
FRAMEGEN_VENDORS,
|
||||
UPSCALE_QUALITIES,
|
||||
} from "@config/graphics-settings";
|
||||
import { normalizeEditorPatch } from "@store/editor-store";
|
||||
import { compareCodeUnits } from "@utils/sort";
|
||||
import { schemaKeys } from "../helpers/locale-schema";
|
||||
|
||||
const VENDORS = FRAMEGEN_VENDORS.filter((vendor) => vendor !== "none");
|
||||
const sorted = (list: readonly string[]) => [...list].sort(compareCodeUnits);
|
||||
|
||||
describe("getValidFrameGenMultipliers", () => {
|
||||
it("offers NVIDIA x6, Dynamic and Custom (v1.6.0)", () => {
|
||||
expect(getValidFrameGenMultipliers("nvidia")).toEqual([
|
||||
"none",
|
||||
"x2",
|
||||
"x3",
|
||||
"x4",
|
||||
"x6",
|
||||
"dynamic",
|
||||
"custom",
|
||||
]);
|
||||
});
|
||||
|
||||
it("offers Custom to AMD and Intel too, and only `none` without a vendor", () => {
|
||||
expect(getValidFrameGenMultipliers("amd")).toEqual(["none", "x2", "x3", "custom"]);
|
||||
expect(getValidFrameGenMultipliers("intel")).toEqual(["none", "x2", "custom"]);
|
||||
expect(getValidFrameGenMultipliers("none")).toEqual(["none"]);
|
||||
});
|
||||
|
||||
it("offers only values the stored lists know", () => {
|
||||
for (const vendor of FRAMEGEN_VENDORS) {
|
||||
for (const multiplier of getValidFrameGenMultipliers(vendor)) {
|
||||
expect(FRAMEGEN_MULTIPLIERS).toContain(multiplier);
|
||||
}
|
||||
for (const quality of getValidUpscaleQualities(vendor)) {
|
||||
expect(UPSCALE_QUALITIES).toContain(quality);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe("coercion", () => {
|
||||
it("keeps a value the vendor offers and falls back to `none` otherwise", () => {
|
||||
expect(coerceFrameGenMultiplier("nvidia", "dynamic")).toBe("dynamic");
|
||||
expect(coerceFrameGenMultiplier("amd", "dynamic")).toBe("none");
|
||||
expect(coerceFrameGenMultiplier("amd", "custom")).toBe("custom");
|
||||
expect(coerceFrameGenMultiplier("none", "custom")).toBe("none");
|
||||
expect(coerceFrameGenMultiplier("intel", undefined)).toBe("none");
|
||||
expect(coerceUpscaleQuality("nvidia", "dlaa")).toBe("dlaa");
|
||||
expect(coerceUpscaleQuality("amd", "dlaa")).toBe("none");
|
||||
expect(coerceUpscaleQuality("intel", undefined)).toBe("none");
|
||||
});
|
||||
|
||||
it("keeps DLSS 5 Neural Rendering for NVIDIA only", () => {
|
||||
expect(coerceDlssNeuralRendering("nvidia", true)).toBe(true);
|
||||
expect(coerceDlssNeuralRendering("nvidia", false)).toBe(false);
|
||||
for (const vendor of ["amd", "intel", "none"] as const) {
|
||||
expect(coerceDlssNeuralRendering(vendor, true)).toBe(false);
|
||||
}
|
||||
});
|
||||
|
||||
it("applies the same rules to a profile, preset or template patch", () => {
|
||||
expect(
|
||||
normalizeEditorPatch({
|
||||
frameGenVendor: "amd",
|
||||
frameGenMultiplier: "custom",
|
||||
frameGenCustom: "Lossless Scaling x3",
|
||||
dlssNeuralRendering: true,
|
||||
}),
|
||||
).toMatchObject({
|
||||
frameGenMultiplier: "custom",
|
||||
frameGenCustom: "Lossless Scaling x3",
|
||||
dlssNeuralRendering: false,
|
||||
});
|
||||
expect(
|
||||
normalizeEditorPatch({
|
||||
frameGenVendor: "nvidia",
|
||||
frameGenMultiplier: "dynamic",
|
||||
dlssNeuralRendering: true,
|
||||
}),
|
||||
).toMatchObject({ frameGenMultiplier: "dynamic", dlssNeuralRendering: true });
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* The editor and the description read their labels from vendor-keyed keys
|
||||
* that `_schema.json` lists for all eight locales (`validate:locales`). The
|
||||
* mock `t` prints a missing key as-is, so without this a new option could
|
||||
* ship with no label and every test still pass.
|
||||
*/
|
||||
describe("a label for every option", () => {
|
||||
it("has an editor label for each vendor's multipliers and qualities", () => {
|
||||
for (const vendor of VENDORS) {
|
||||
expect(schemaKeys("ui", `editor.frameGenMultiplier.${vendor}`)).toEqual(
|
||||
sorted(getValidFrameGenMultipliers(vendor)),
|
||||
);
|
||||
expect(schemaKeys("ui", `editor.upscaleQuality.${vendor}`)).toEqual(
|
||||
sorted(getValidUpscaleQualities(vendor)),
|
||||
);
|
||||
}
|
||||
expect(schemaKeys("ui", "editor.frameGenMultiplierOptions")).toEqual(
|
||||
sorted(FRAMEGEN_MULTIPLIERS),
|
||||
);
|
||||
});
|
||||
|
||||
it("has a description label for each vendor's options but the typed custom one", () => {
|
||||
for (const vendor of VENDORS) {
|
||||
expect(schemaKeys("templates", `description.graphics.frameGen.${vendor}`)).toEqual(
|
||||
sorted(getValidFrameGenMultipliers(vendor).filter((m) => m !== "custom")),
|
||||
);
|
||||
expect(schemaKeys("templates", `description.graphics.upscale.${vendor}`)).toEqual(
|
||||
sorted(getValidUpscaleQualities(vendor)),
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -4,6 +4,7 @@ import {
|
||||
cleanLutName,
|
||||
CPU_SUGGESTIONS,
|
||||
formatRigValue,
|
||||
isCustomRigValue,
|
||||
LUT_SUGGESTIONS,
|
||||
migrateRig,
|
||||
RIG_FIELDS,
|
||||
@@ -207,6 +208,35 @@ describe("LUT (v1.4.0)", () => {
|
||||
"Arri Alexa LogC to Rec709",
|
||||
);
|
||||
});
|
||||
|
||||
it("offers “Custom” first, which prints as the “LUT applied” note (v1.6.0)", () => {
|
||||
expect(LUT_SUGGESTIONS[0]).toBe("Custom");
|
||||
const field = RIG_FIELDS.find((f) => f.id === "lut");
|
||||
expect(field?.customNoteKey).toBe("description.rigNotes.lut_custom");
|
||||
});
|
||||
});
|
||||
|
||||
describe("isCustomRigValue", () => {
|
||||
it("matches “Custom” in any case, with stray spaces", () => {
|
||||
expect(isCustomRigValue("Custom")).toBe(true);
|
||||
expect(isCustomRigValue(" cUSTOM ")).toBe(true);
|
||||
});
|
||||
|
||||
it("does not match a name that merely contains it", () => {
|
||||
expect(isCustomRigValue("Custom Teal Orange")).toBe(false);
|
||||
expect(isCustomRigValue("")).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("custom notes", () => {
|
||||
it("has a description line in every locale for each field's note", () => {
|
||||
const notes = RIG_FIELDS.flatMap((f) => (f.customNoteKey ? [f.customNoteKey] : []));
|
||||
expect(notes.length).toBeGreaterThan(0);
|
||||
for (const key of notes) {
|
||||
const at = key.lastIndexOf(".");
|
||||
expect(schemaKeys("templates", key.slice(0, at))).toContain(key.slice(at + 1));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe("cleanLutName", () => {
|
||||
|
||||
@@ -69,7 +69,9 @@ function makeEditorData(overrides: Partial<EditorData> = {}): EditorData {
|
||||
rayTracingModes: [...DEFAULTS.editor.rayTracingModes] as RTMode[],
|
||||
frameGenVendor: DEFAULTS.editor.frameGenVendor as FrameGenVendor,
|
||||
frameGenMultiplier: DEFAULTS.editor.frameGenMultiplier as FrameGenMultiplier,
|
||||
frameGenCustom: DEFAULTS.editor.frameGenCustom,
|
||||
upscaleQuality: DEFAULTS.editor.upscaleQuality as UpscaleQuality,
|
||||
dlssNeuralRendering: DEFAULTS.editor.dlssNeuralRendering,
|
||||
artStyle: DEFAULTS.editor.artStyle as ArtStyle,
|
||||
videoStyleEra: DEFAULTS.editor.videoStyleEra,
|
||||
versionInfo: DEFAULTS.editor.versionInfo,
|
||||
|
||||
@@ -492,3 +492,51 @@ describe("migrateEditorState — v20 → v21 (v1.5.0 upscaled video)", () => {
|
||||
expect(migrateEditorState({ ...once }, 20)).toEqual(once);
|
||||
});
|
||||
});
|
||||
|
||||
describe("migrateEditorState — v21 → v22 (v1.6.0 custom frame generation, DLSS 5)", () => {
|
||||
function makeV21Persisted(overrides: Record<string, unknown> = {}): Record<string, unknown> {
|
||||
const full = migrateEditorState(makeV9Persisted(), 9) as unknown as Record<string, unknown>;
|
||||
delete full.frameGenCustom;
|
||||
delete full.dlssNeuralRendering;
|
||||
return { ...full, ...overrides };
|
||||
}
|
||||
|
||||
it("back-fills an empty custom frame generation and DLSS 5 off", () => {
|
||||
const migrated = migrateEditorState(makeV21Persisted(), 21);
|
||||
expect(migrated.frameGenCustom).toBe("");
|
||||
expect(migrated.dlssNeuralRendering).toBe(false);
|
||||
});
|
||||
|
||||
it("coerces values of the wrong type", () => {
|
||||
const migrated = migrateEditorState(
|
||||
makeV21Persisted({ frameGenCustom: 6, dlssNeuralRendering: "yes" }),
|
||||
21,
|
||||
);
|
||||
expect(migrated.frameGenCustom).toBe("");
|
||||
expect(migrated.dlssNeuralRendering).toBe(false);
|
||||
});
|
||||
|
||||
it("keeps the frame-gen choices a v21 draft made, and running it again changes nothing", () => {
|
||||
const once = migrateEditorState(
|
||||
makeV21Persisted({
|
||||
frameGenVendor: "nvidia",
|
||||
frameGenMultiplier: "x4",
|
||||
upscaleQuality: "quality",
|
||||
}),
|
||||
21,
|
||||
);
|
||||
expect(once.frameGenVendor).toBe("nvidia");
|
||||
expect(once.frameGenMultiplier).toBe("x4");
|
||||
expect(once.upscaleQuality).toBe("quality");
|
||||
expect(migrateEditorState({ ...once }, 21)).toEqual(once);
|
||||
});
|
||||
|
||||
it("keeps values a newer draft already holds", () => {
|
||||
const migrated = migrateEditorState(
|
||||
makeV21Persisted({ frameGenCustom: "NVIDIA Smooth Motion", dlssNeuralRendering: true }),
|
||||
21,
|
||||
);
|
||||
expect(migrated.frameGenCustom).toBe("NVIDIA Smooth Motion");
|
||||
expect(migrated.dlssNeuralRendering).toBe(true);
|
||||
});
|
||||
});
|
||||
@@ -47,6 +47,34 @@ describe("sanitizeEditorFields", () => {
|
||||
expect(out).not.toHaveProperty("set");
|
||||
});
|
||||
|
||||
it("keeps v1.6.0 frame generation and DLSS 5 fields, typed as the editor holds them", () => {
|
||||
expect(
|
||||
sanitizeEditorFields({
|
||||
frameGenVendor: "nvidia",
|
||||
frameGenMultiplier: "dynamic",
|
||||
frameGenCustom: "NVIDIA Smooth Motion",
|
||||
dlssNeuralRendering: true,
|
||||
}),
|
||||
).toEqual({
|
||||
frameGenVendor: "nvidia",
|
||||
frameGenMultiplier: "dynamic",
|
||||
frameGenCustom: "NVIDIA Smooth Motion",
|
||||
dlssNeuralRendering: true,
|
||||
});
|
||||
const wrong = sanitizeEditorFields({
|
||||
frameGenVendor: "amd",
|
||||
frameGenMultiplier: "x6",
|
||||
frameGenCustom: 3,
|
||||
dlssNeuralRendering: true,
|
||||
});
|
||||
// x6 is NVIDIA's; DLSS 5 too. A number is not a typed name.
|
||||
expect(wrong).toEqual({
|
||||
frameGenVendor: "amd",
|
||||
frameGenMultiplier: "none",
|
||||
dlssNeuralRendering: false,
|
||||
});
|
||||
});
|
||||
|
||||
it("never copies prototype keys", () => {
|
||||
const raw = JSON.parse('{"__proto__": {"polluted": true}, "social": {"__proto__": "x"}}');
|
||||
const out = sanitizeEditorFields(raw);
|
||||
|
||||
Reference in new issue
Block a user