feat(web): add render sampling authoring
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

This commit is contained in:
mes123456
2026-08-29 19:52:02 +08:00
parent ec23b29db1
commit 217ab7cfe9
47 changed files with 1908 additions and 38 deletions

View File

@@ -579,6 +579,7 @@ export interface SceneIR {
hairSettings?: { type: number; subdivisions: number };
compositorSettings?: { device: number; precision: number; denoiseDevice: number; previewQuality: number; finalQuality: number };
performanceSettings?: { fixedThreads: boolean; threads: number; persistentData: boolean; highQualityNormals: boolean };
samplingSettings?: { pixelAspectX: number; pixelAspectY: number; filterSize: number; dither: number };
compositorGraph?: CompositorGraphIR;
compositorStatus?: "AVAILABLE" | "BLOCKED";
sequencerTimeline?: SequencerTimelineIR;
@@ -1638,6 +1639,10 @@ export function parseSceneSnapshotIR(value: unknown): SceneSnapshotIR {
for (const field of ["fixedThreads", "persistentData", "highQualityNormals"] as const) requireBoolean(scene.performanceSettings[field], `scenes[${index}].performanceSettings.${field}`);
requireNumber(scene.performanceSettings.threads, `scenes[${index}].performanceSettings.threads`);
}
if (scene.samplingSettings !== undefined) {
if (!isRecord(scene.samplingSettings)) throw new Error(`SceneIR.scenes[${index}].samplingSettings must be an object`);
for (const field of ["pixelAspectX", "pixelAspectY", "filterSize", "dither"] as const) requireNumber(scene.samplingSettings[field], `scenes[${index}].samplingSettings.${field}`);
}
if (scene.compositorStatus !== undefined && !["AVAILABLE", "BLOCKED"].includes(scene.compositorStatus as string)) {
throw new Error(`scenes[${index}].compositorStatus is invalid`);
}