Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

feat(project): the output transform is a project setting, live in the viewport

yhh291298af8f2a
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 59c7f6db8..cba5d0af9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -50,8 +50,9 @@ published separately; it ships inside the editor.
### Added
- **A frame has an output transform, and it belongs to the pipeline.**
- `PostProcess.setOutputTransform('aces')` — or `outputTransform` in a project's
- `createWebApp` options — puts the ACES filmic curve on the way out: once, last,
+ Project Settings → Rendering → Output transform, `rendering.outputTransform` in
+ the manifest, `PostProcess.setOutputTransform('aces')` at runtime — one setting,
+ which puts the ACES filmic curve on the way out: once, last,
after the effects (which want scene values) and before the OETF (which is a
transfer function, not a look). It rides in the blit that was always going to
run, so it costs no extra full-screen pass, and it engages the capture on its
@@ -78,6 +79,13 @@ published separately; it ships inside the editor.
`output-aces` and `output-aces-linear`, both backends, agreeing to the value —
which is also what says the WGSL twin of the curve is the same curve.
+ It reaches everything a setting has to reach: one derivation in
+ `runtimeConfigOf`, read by the edit viewport, the play realm and every export.
+ `check-project-settings` counts 13 settings now and declares no gap for this
+ one — unlike `colorSpace`, which is boot-fixed because shaders compile against
+ it, the curve is a shader VARIANT chosen per frame, so the viewport shows the
+ shipped look live rather than asking for a reload.
+
- **The 3D path can be held to what it COST, not just to what it drew.**
`render.meshes` and `render.triangles` join the counters a pixel gate can pin
through `ESTELLA_VERIFY_COUNTERS`, and the new gate `mesh-cost` pins them: nine
diff --git a/docs/astro/src/data/apiStability.generated.json b/docs/astro/src/data/apiStability.generated.json
index 5f1c16cca..e3fc70fca 100644
--- a/docs/astro/src/data/apiStability.generated.json
+++ b/docs/astro/src/data/apiStability.generated.json
@@ -3,10 +3,10 @@
"counts": {
"public": 113,
"beta": 73,
- "experimental": 1624,
+ "experimental": 1625,
"deprecated": 3
},
- "total": 1810,
+ "total": 1811,
"subsystems": [
{
"id": "ecs",
diff --git a/pipeline/src/project/format.ts b/pipeline/src/project/format.ts
index a6a1709e5..0f3a43d59 100644
--- a/pipeline/src/project/format.ts
+++ b/pipeline/src/project/format.ts
@@ -136,6 +136,10 @@ export interface ProjectFeatures {
* sample, linear blending, OETF at the final blit). Fixed at engine boot —
* shaders compile against it. Absent ⇒ 'gamma'. */
colorSpace?: 'linear';
+ /** The curve the frame applies on its way to the display, once and last.
+ * 'aces' engages the capture on its own, so it applies with an empty effect
+ * stack. Absent ⇒ none, which is the exact round trip flat content wants. */
+ outputTransform?: 'aces';
/** GPU backend a shipped build asks for. 'webgpu' takes it where the machine
* serves one and falls back to WebGL2 where it does not, so a project can
* opt in without giving up the browsers that have neither. Absent ⇒ WebGL2,
@@ -551,6 +555,8 @@ export function parseManifest(raw: unknown): ProjectManifest {
}
// Only 'linear' persists; 'gamma' (the default) is expressed by absence.
if (r.colorSpace === 'linear') rendering.colorSpace = 'linear';
+ // Same shape: only the curve persists, no transform is absence.
+ if (r.outputTransform === 'aces') rendering.outputTransform = 'aces';
// Same shape: only the opt-in persists, WebGL2 is absence.
if (r.backend === 'webgpu') rendering.backend = 'webgpu';
// Camera fit — 'none' (off) is the default, expressed by absence.
diff --git a/pipeline/src/project/runtimeConfig.ts b/pipeline/src/project/runtimeConfig.ts
index 777540e32..ae55d9ef2 100644
--- a/pipeline/src/project/runtimeConfig.ts
+++ b/pipeline/src/project/runtimeConfig.ts
@@ -67,6 +67,8 @@ export interface RuntimeProjectConfig {
depthLayers: number;
/** Render colour space; 'gamma' is the default. Boot-fixed (shaders compile against it). */
colorSpace: 'gamma' | 'linear';
+ /** The curve on the way to the display; 'none' is the default. */
+ outputTransform: 'none' | 'aces';
/** GPU backend the build asks for; 'webgl2' is the default. Boot-fixed, and a
* request for 'webgpu' still falls back where the machine has none. */
renderBackend: 'webgl2' | 'webgpu';
@@ -142,6 +144,7 @@ export function runtimeConfigOf(
ySortLayers: layerMask(f?.rendering?.ySortLayers),
depthLayers: layerMask(f?.rendering?.depthLayers),
colorSpace: f?.rendering?.colorSpace === 'linear' ? 'linear' : 'gamma',
+ outputTransform: f?.rendering?.outputTransform === 'aces' ? 'aces' : 'none',
renderBackend: f?.rendering?.backend === 'webgpu' ? 'webgpu' : 'webgl2',
screenFit: resolveScreenFit(manifest),
};
@@ -150,7 +153,8 @@ export function runtimeConfigOf(
/** The settings a shipped build carries, as `game.config.json` spells them. */
export type PackagedRuntimeFields = Pick<
PackagedGameConfig,
- 'ySortLayers' | 'depthLayers' | 'colorSpace' | 'renderBackend' | 'screenFit' | 'uiTheme' | 'uiThemeColors'
+ 'ySortLayers' | 'depthLayers' | 'colorSpace' | 'outputTransform' | 'renderBackend' | 'screenFit'
+ | 'uiTheme' | 'uiThemeColors'
| 'physicsEnabled' | 'physicsConfig' | 'audioConfig' | 'achievements' | 'steamAppId'
>;
@@ -168,6 +172,7 @@ export function packagedRuntimeFields(rc: RuntimeProjectConfig): PackagedRuntime
...(rc.ySortLayers ? { ySortLayers: rc.ySortLayers } : {}),
...(rc.depthLayers ? { depthLayers: rc.depthLayers } : {}),
...(rc.colorSpace === 'linear' ? { colorSpace: rc.colorSpace } : {}),
+ ...(rc.outputTransform === 'aces' ? { outputTransform: rc.outputTransform } : {}),
...(rc.renderBackend === 'webgpu' ? { renderBackend: rc.renderBackend } : {}),
// ALWAYS, even with the fit off (`scaleMode < 0`): it carries the design
// resolution, which is what a desktop window opens at. One representation, or
diff --git a/pipeline/tests/project-rendering.test.ts b/pipeline/tests/project-rendering.test.ts
index 3897a4896..700ca41ae 100644
--- a/pipeline/tests/project-rendering.test.ts
+++ b/pipeline/tests/project-rendering.test.ts
@@ -2,14 +2,30 @@
// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
/**
* @file parseManifest — rendering feature (Project Settings → Rendering). Guards the
- * colorSpace project setting: 'linear' persists, the default 'gamma' is expressed
- * by absence, and junk values are dropped.
+ * two settings that persist as an opt-in: colorSpace and outputTransform. The
+ * non-default persists, the default is expressed by absence, junk is dropped.
*/
import { describe, it, expect } from 'vitest';
import {
parseManifest, cameraScaleModeValue, resolveScreenFit, trimSortingLayers, SORTING_LAYER_COUNT,
} from '../src/project/format';
+describe('parseManifest — rendering.outputTransform', () => {
+ // Same bargain as colorSpace: the opt-in persists, the default is absence, so
+ // a project that never touched the setting keeps a manifest that never mentions it.
+ it("keeps 'aces'", () => {
+ const m = parseManifest({ name: 'X', features: { rendering: { outputTransform: 'aces' } } });
+ expect(m.features?.rendering?.outputTransform).toBe('aces');
+ });
+
+ it("drops 'none' (default = absence) and junk values", () => {
+ for (const v of ['none', 'ACES', 'filmic', 42, true, null]) {
+ const m = parseManifest({ name: 'X', features: { rendering: { outputTransform: v } } });
+ expect(m.features?.rendering?.outputTransform).toBeUndefined();
+ }
+ });
+});
+
describe('parseManifest — rendering.colorSpace', () => {
it("keeps 'linear'", () => {
const m = parseManifest({ name: 'X', features: { rendering: { colorSpace: 'linear' } } });
@@ -23,6 +39,11 @@ describe('parseManifest — rendering.colorSpace', () => {
}
});
+ it('is not carried over into the output transform beside it', () => {
+ const m = parseManifest({ name: 'X', features: { rendering: { colorSpace: 'linear' } } });
+ expect(m.features?.rendering?.outputTransform).toBeUndefined();
+ });
+
it('coexists with sorting/y-sort config', () => {
const m = parseManifest({
name: 'X',
diff --git a/pipeline/tests/runtime-config.test.ts b/pipeline/tests/runtime-config.test.ts
index 6f4583d51..22973e89f 100644
--- a/pipeline/tests/runtime-config.test.ts
+++ b/pipeline/tests/runtime-config.test.ts
@@ -20,6 +20,7 @@ describe('runtimeConfigOf', () => {
expect(rc.ySortLayers).toBe(0);
expect(rc.depthLayers).toBe(0);
expect(rc.colorSpace).toBe('gamma');
+ expect(rc.outputTransform).toBe('none');
expect(rc.uiTheme).toBe('dark');
expect(rc.uiThemeColors).toEqual({});
expect(rc.physicsEnabled).toBe(false);
@@ -87,12 +88,16 @@ describe('packagedRuntimeFields', () => {
const fields = packagedRuntimeFields(runtimeConfigOf({
designResolution: { width: 800, height: 600 },
features: {
- rendering: { ySortLayers: [1], depthLayers: [2], colorSpace: 'linear', cameraScaleMode: 'expand' },
+ rendering: {
+ ySortLayers: [1], depthLayers: [2], colorSpace: 'linear',
+ outputTransform: 'aces', cameraScaleMode: 'expand',
+ },
ui: { theme: 'light', colors: { accent: '#ff0000ff' } },
},
}));
expect(Object.keys(fields).sort()).toEqual(
- ['colorSpace', 'depthLayers', 'screenFit', 'uiTheme', 'uiThemeColors', 'ySortLayers'],
+ ['colorSpace', 'depthLayers', 'outputTransform', 'screenFit', 'uiTheme', 'uiThemeColors',
+ 'ySortLayers'],
);
expect(fields.screenFit).toEqual({
designWidth: 800, designHeight: 600, scaleMode: 2, matchWidthOrHeight: 0.5,
diff --git a/sdk/etc/index.api.md b/sdk/etc/index.api.md
index 5536e1348..1c2be1d23 100644
--- a/sdk/etc/index.api.md
+++ b/sdk/etc/index.api.md
@@ -1,7 +1,7 @@
# API surface — esengine/index
<!-- Generated by tools/api-surface.mjs — do not edit. Run --update to accept changes. -->
-Symbols: 113 public · 66 beta · 1508 experimental · 3 deprecated
+Symbols: 113 public · 66 beta · 1509 experimental · 3 deprecated
## ABI_LAYOUT_HASH — const @experimental
```
@@ -5021,6 +5021,11 @@ texelSize: { x: number; y: number; } | undefined
width: number | undefined
```
+## OutputTransform — type @experimental
+```
+'none' | 'aces'
+```
+
## PREFAB_FORMAT_VERSION — const @experimental
```
"2"
@@ -5061,6 +5066,7 @@ colorSpace: "gamma" | "linear" | undefined
depthLayers: number | undefined
entryScene: string
hotUpdate: { remoteRoot?: string; persistUpdateKey?: string; } | undefined
+outputTransform: "none" | "aces" | undefined
physicsConfig: Physics2DPluginConfig | undefined
physicsEnabled: boolean | undefined
renderBackend: "webgl2" | "webgpu" | undefined
@@ -11142,7 +11148,7 @@ NavPlugin
## packagedAppOptions — function @experimental
```
-(config: Pick<PackagedGameConfig, "ySortLayers" | "depthLayers" | "colorSpace" | "screenFit">): { ySortLayers?: number; depthLayers?: number; colorSpace?: "gamma" | "linear"; renderBackend?: "webgl2" | "webgpu"; screenFit?: PackagedGameConfig["screenFit"]; }
+(config: Pick<PackagedGameConfig, "ySortLayers" | "depthLayers" | "colorSpace" | "outputTransform" | "screenFit">): { ySortLayers?: number; depthLayers?: number; colorSpace?: "gamma" | "linear"; outputTransform?: "none" | "aces"; renderBackend?: "webgl2" | "webgpu"; screenFit?: PackagedGameConfig["screenFit"]; }
```
## packagedRuntimeInit — function @experimental
diff --git a/sdk/etc/index.native.api.md b/sdk/etc/index.native.api.md
index b2e1ded91..0f0c4422b 100644
--- a/sdk/etc/index.native.api.md
+++ b/sdk/etc/index.native.api.md
@@ -1,7 +1,7 @@
# API surface — esengine/index.native
<!-- Generated by tools/api-surface.mjs — do not edit. Run --update to accept changes. -->
-Symbols: 113 public · 71 beta · 1527 experimental · 3 deprecated
+Symbols: 113 public · 71 beta · 1528 experimental · 3 deprecated
## ABI_LAYOUT_HASH — const @experimental
```
@@ -5199,6 +5199,11 @@ texelSize: { x: number; y: number; } | undefined
width: number | undefined
```
+## OutputTransform — type @experimental
+```
+'none' | 'aces'
+```
+
## PLATFORM_BINDINGS — const @experimental
```
{ readonly readAsset: "es_readAsset"; readonly loadImagePixels: "es_loadImagePixels"; readonly utf8Decode: "es_utf8Decode"; }
@@ -5244,6 +5249,7 @@ colorSpace: "gamma" | "linear" | undefined
depthLayers: number | undefined
entryScene: string
hotUpdate: { remoteRoot?: string; persistUpdateKey?: string; } | undefined
+outputTransform: "none" | "aces" | undefined
physicsConfig: Physics2DPluginConfig | undefined
physicsEnabled: boolean | undefined
renderBackend: "webgl2" | "webgpu" | undefined
@@ -11385,7 +11391,7 @@ NavPlugin
## packagedAppOptions — function @experimental
```
-(config: Pick<PackagedGameConfig, "ySortLayers" | "depthLayers" | "colorSpace" | "screenFit">): { ySortLayers?: number; depthLayers?: number; colorSpace?: "gamma" | "linear"; renderBackend?: "webgl2" | "webgpu"; screenFit?: PackagedGameConfig["screenFit"]; }
+(config: Pick<PackagedGameConfig, "ySortLayers" | "depthLayers" | "colorSpace" | "outputTransform" | "screenFit">): { ySortLayers?: number; depthLayers?: number; colorSpace?: "gamma" | "linear"; outputTransform?: "none" | "aces"; renderBackend?: "webgl2" | "webgpu"; screenFit?: PackagedGameConfig["screenFit"]; }
```
## packagedRuntimeInit — function @experimental
diff --git a/sdk/etc/index.node.api.md b/sdk/etc/index.node.api.md
index 8ee2eff90..65630eac8 100644
--- a/sdk/etc/index.node.api.md
+++ b/sdk/etc/index.node.api.md
@@ -1,7 +1,7 @@
# API surface — esengine/index.node
<!-- Generated by tools/api-surface.mjs — do not edit. Run --update to accept changes. -->
-Symbols: 113 public · 68 beta · 1507 experimental · 3 deprecated
+Symbols: 113 public · 68 beta · 1508 experimental · 3 deprecated
## ANCHOR_AXES — const @experimental
```
@@ -5016,6 +5016,11 @@ texelSize: { x: number; y: number; } | undefined
width: number | undefined
```
+## OutputTransform — type @experimental
+```
+'none' | 'aces'
+```
+
## PREFAB_FORMAT_VERSION — const @experimental
```
"2"
@@ -5056,6 +5061,7 @@ colorSpace: "gamma" | "linear" | undefined
depthLayers: number | undefined
entryScene: string
hotUpdate: { remoteRoot?: string; persistUpdateKey?: string; } | undefined
+outputTransform: "none" | "aces" | undefined
physicsConfig: Physics2DPluginConfig | undefined
physicsEnabled: boolean | undefined
renderBackend: "webgl2" | "webgpu" | undefined
@@ -11147,7 +11153,7 @@ NodePlatformAdapter
## packagedAppOptions — function @experimental
```
-(config: Pick<PackagedGameConfig, "ySortLayers" | "depthLayers" | "colorSpace" | "screenFit">): { ySortLayers?: number; depthLayers?: number; colorSpace?: "gamma" | "linear"; renderBackend?: "webgl2" | "webgpu"; screenFit?: PackagedGameConfig["screenFit"]; }
+(config: Pick<PackagedGameConfig, "ySortLayers" | "depthLayers" | "colorSpace" | "outputTransform" | "screenFit">): { ySortLayers?: number; depthLayers?: number; colorSpace?: "gamma" | "linear"; outputTransform?: "none" | "aces"; renderBackend?: "webgl2" | "webgpu"; screenFit?: PackagedGameConfig["screenFit"]; }
```
## packagedRuntimeInit — function @experimental
diff --git a/sdk/etc/minigame.api.md b/sdk/etc/minigame.api.md
index 542fc04f4..4c09e35b4 100644
--- a/sdk/etc/minigame.api.md
+++ b/sdk/etc/minigame.api.md
@@ -1,7 +1,7 @@
# API surface — esengine/minigame
<!-- Generated by tools/api-surface.mjs — do not edit. Run --update to accept changes. -->
-Symbols: 113 public · 66 beta · 1529 experimental · 3 deprecated
+Symbols: 113 public · 66 beta · 1530 experimental · 3 deprecated
## ANCHOR_AXES — const @experimental
```
@@ -5261,6 +5261,11 @@ texelSize: { x: number; y: number; } | undefined
width: number | undefined
```
+## OutputTransform — type @experimental
+```
+'none' | 'aces'
+```
+
## PREFAB_FORMAT_VERSION — const @experimental
```
"2"
@@ -5301,6 +5306,7 @@ colorSpace: "gamma" | "linear" | undefined
depthLayers: number | undefined
entryScene: string
hotUpdate: { remoteRoot?: string; persistUpdateKey?: string; } | undefined
+outputTransform: "none" | "aces" | undefined
physicsConfig: Physics2DPluginConfig | undefined
physicsEnabled: boolean | undefined
renderBackend: "webgl2" | "webgpu" | undefined
@@ -11403,7 +11409,7 @@ NavPlugin
## packagedAppOptions — function @experimental
```
-(config: Pick<PackagedGameConfig, "ySortLayers" | "depthLayers" | "colorSpace" | "screenFit">): { ySortLayers?: number; depthLayers?: number; colorSpace?: "gamma" | "linear"; renderBackend?: "webgl2" | "webgpu"; screenFit?: PackagedGameConfig["screenFit"]; }
+(config: Pick<PackagedGameConfig, "ySortLayers" | "depthLayers" | "colorSpace" | "outputTransform" | "screenFit">): { ySortLayers?: number; depthLayers?: number; colorSpace?: "gamma" | "linear"; outputTransform?: "none" | "aces"; renderBackend?: "webgl2" | "webgpu"; screenFit?: PackagedGameConfig["screenFit"]; }
```
## packagedRuntimeInit — function @experimental
diff --git a/sdk/etc/wechat.api.md b/sdk/etc/wechat.api.md
index 4c083707c..0ba29ba7d 100644
--- a/sdk/etc/wechat.api.md
+++ b/sdk/etc/wechat.api.md
@@ -1,7 +1,7 @@
# API surface — esengine/wechat
<!-- Generated by tools/api-surface.mjs — do not edit. Run --update to accept changes. -->
-Symbols: 113 public · 66 beta · 1519 experimental · 3 deprecated
+Symbols: 113 public · 66 beta · 1520 experimental · 3 deprecated
## ANCHOR_AXES — const @experimental
```
@@ -5023,6 +5023,11 @@ texelSize: { x: number; y: number; } | undefined
width: number | undefined
```
+## OutputTransform — type @experimental
+```
+'none' | 'aces'
+```
+
## PREFAB_FORMAT_VERSION — const @experimental
```
"2"
@@ -5063,6 +5068,7 @@ colorSpace: "gamma" | "linear" | undefined
depthLayers: number | undefined
entryScene: string
hotUpdate: { remoteRoot?: string; persistUpdateKey?: string; } | undefined
+outputTransform: "none" | "aces" | undefined
physicsConfig: Physics2DPluginConfig | undefined
physicsEnabled: boolean | undefined
renderBackend: "webgl2" | "webgpu" | undefined
@@ -11169,7 +11175,7 @@ NavPlugin
## packagedAppOptions — function @experimental
```
-(config: Pick<PackagedGameConfig, "ySortLayers" | "depthLayers" | "colorSpace" | "screenFit">): { ySortLayers?: number; depthLayers?: number; colorSpace?: "gamma" | "linear"; renderBackend?: "webgl2" | "webgpu"; screenFit?: PackagedGameConfig["screenFit"]; }
+(config: Pick<PackagedGameConfig, "ySortLayers" | "depthLayers" | "colorSpace" | "outputTransform" | "screenFit">): { ySortLayers?: number; depthLayers?: number; colorSpace?: "gamma" | "linear"; outputTransform?: "none" | "aces"; renderBackend?: "webgl2" | "webgpu"; screenFit?: PackagedGameConfig["screenFit"]; }
```
## packagedRuntimeInit — function @experimental
diff --git a/sdk/src/app/app.ts b/sdk/src/app/app.ts
index 88d4acedd..b75ce4b76 100644
--- a/sdk/src/app/app.ts
+++ b/sdk/src/app/app.ts
@@ -10,7 +10,7 @@ import { Schedule, SystemDef, SystemRunner, SystemSet, mergeOrderingEdges, resco
import { ResourceStorage, Time, TimeData, type ResourceDef } from '../ecs/resource';
import { EventRegistry, type EventDef } from '../ecs/event';
import type { ESEngineModule, CppRegistry } from '../wasm';
-import type { OutputTransform } from '../postprocess/PostProcessAPI';
+import type { OutputTransform } from '../postprocess';
import type { BridgeConnectOptions } from '../ecs/bridge/BuiltinBridge';
import { UICameraInfo } from '../ui/core/ui-camera-info';
import { inputPlugin, Input } from '../input/input';
diff --git a/sdk/src/core-render.ts b/sdk/src/core-render.ts
index 7cad20e7a..53249ba27 100644
--- a/sdk/src/core-render.ts
+++ b/sdk/src/core-render.ts
@@ -149,6 +149,7 @@ export {
PostProcess,
PostProcessAPI,
PostProcessStack,
+ type OutputTransform,
type EffectDef,
type EffectUniformDef,
getEffectDef,
diff --git a/sdk/src/postprocess.ts b/sdk/src/postprocess.ts
index bc4a1aa3c..b60ab0c68 100644
--- a/sdk/src/postprocess.ts
+++ b/sdk/src/postprocess.ts
@@ -4,6 +4,7 @@ export {
PostProcess,
PostProcessAPI,
PostProcessStack,
+ type OutputTransform,
postProcessEffects,
initPostProcessAPI,
shutdownPostProcessAPI,
diff --git a/sdk/src/postprocess/PostProcessAPI.ts b/sdk/src/postprocess/PostProcessAPI.ts
index ca359771e..12fa4e079 100644
--- a/sdk/src/postprocess/PostProcessAPI.ts
+++ b/sdk/src/postprocess/PostProcessAPI.ts
@@ -135,7 +135,7 @@ export function syncStackToWasm(stack: PostProcessStack, force = false): void {
* alone, which is the exact round trip flat content wants; `aces` maps radiance
* above 1 down a filmic shoulder, which is what a lit 3D scene needs.
*
- * @public
+ * @experimental
*/
export type OutputTransform = 'none' | 'aces';
diff --git a/sdk/src/postprocess/index.ts b/sdk/src/postprocess/index.ts
index 88fd1d8f1..7a86935d6 100644
--- a/sdk/src/postprocess/index.ts
+++ b/sdk/src/postprocess/index.ts
@@ -3,6 +3,7 @@
export { PostProcessStack } from './PostProcessStack';
export type { PassConfig } from './PostProcessStack';
export { PostProcess, PostProcessAPI, initPostProcessAPI, shutdownPostProcessAPI, syncStackToWasm } from './PostProcessAPI';
+export type { OutputTransform } from './PostProcessAPI';
export { postProcessEffects } from './postProcessEffects';
export { POSTPROCESS_VERTEX } from './shaders';
export {
diff --git a/sdk/src/runtime/packagedRuntime.ts b/sdk/src/runtime/packagedRuntime.ts
index b0627f018..aaa73d053 100644
--- a/sdk/src/runtime/packagedRuntime.ts
+++ b/sdk/src/runtime/packagedRuntime.ts
@@ -44,6 +44,8 @@ export interface PackagedGameConfig {
depthLayers?: number;
/** Project color space — 'linear' boots the linear-light pipeline. */
colorSpace?: 'gamma' | 'linear';
+ /** The curve the frame applies on the way to the display; absent = none. */
+ outputTransform?: 'none' | 'aces';
/** GPU backend the build asks for; absent ⇒ WebGL2. A request for
* 'webgpu' falls back where the machine cannot serve one. */
renderBackend?: 'webgl2' | 'webgpu';
@@ -140,11 +142,13 @@ export function registerPackagedSideModules(config: Pick<PackagedGameConfig, 'si
* that spreads it.
*/
export function packagedAppOptions(
- config: Pick<PackagedGameConfig, 'ySortLayers' | 'depthLayers' | 'colorSpace' | 'screenFit'>,
+ config: Pick<PackagedGameConfig,
+ 'ySortLayers' | 'depthLayers' | 'colorSpace' | 'outputTransform' | 'screenFit'>,
): {
ySortLayers?: number;
depthLayers?: number;
colorSpace?: 'gamma' | 'linear';
+ outputTransform?: 'none' | 'aces';
/** GPU backend the build asks for; absent ⇒ WebGL2. A request for
* 'webgpu' falls back where the machine cannot serve one. */
renderBackend?: 'webgl2' | 'webgpu';
@@ -154,6 +158,7 @@ export function packagedAppOptions(
ySortLayers: config.ySortLayers,
depthLayers: config.depthLayers,
colorSpace: config.colorSpace,
+ outputTransform: config.outputTransform,
screenFit: config.screenFit,
};
}
diff --git a/tools/check-project-settings.mjs b/tools/check-project-settings.mjs
index 72e0b94ae..a9108d774 100644
--- a/tools/check-project-settings.mjs
+++ b/tools/check-project-settings.mjs
@@ -89,6 +89,7 @@ const PARSE_KEY = {
ySortLayers: 'r.ySortLayers',
depthLayers: 'r.depthLayers',
colorSpace: 'r.colorSpace',
+ outputTransform: 'r.outputTransform',
renderBackend: 'r.backend',
screenFit: 'r.cameraScaleMode',
};