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.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
feat(editor): Time Of Day and Weather have Details panels of their own, the effect stack is grouped, and a material's surface layers are switches
yhh83672387bbe1
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 51ba23781..3b02e744f 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -17,6 +17,7 @@ published separately; it ships inside the editor.### Added- **Contact shadows and screen-space bounce light.** Contact Shadows and Screen Space GI effects add small sharp shadows at contacts and one bounce of colour between surfaces, and the weather softens the sun's shadows. `contactShadows` marches a short ray toward the scene's sun in the depth buffer; `ssgi` gathers eight rays a pixel over the G-buffer's normals at half size into a float target and averages the neighbours on the same surface before laying the light, times the receiver's colour, over the picture. The Weather component raises the sun's `sourceAngle` and lowers its `shadowStrength` as the sky clouds over.+- **Details panels for the world.** Time Of Day shows the day as a curve with a hand for the hour, Weather as preset buttons with a live readout, a volume's effects are grouped and tagged, and a Model material's surface layers are sections with switches. The sun's curve is the real one for the component's latitude and declination; the effect stack lists colour parameters it used to leave out, folds, and marks the effects that need WebGPU; a layer's switch writes its strength parameter as an ordinary undoable edit.- **Subsurface scattering.** A Subsurface Scattering effect blurs the lit colour of the surfaces a material marks as scattering, red furthest, without bleeding across a depth edge. The Model material's `u_subsurface` marks its pixels (alpha 0.996, which nothing shows and the effect restores to 1); the effect is an x and a y pass whose width is a world length, each colour reaching a different share of it. Only marked neighbours on the same surface are gathered. It blurs the whole lit colour, specular included, and the width is the effect's, shared by every marked material; the low quality level leaves it out.- **Refraction.** Glass and water refract: a material with transmission bends and tints the opaque scene behind it, softened by its roughness. The frame draws the scene in two halves with a copy of the picture taken between them: the materials that read it (a shader that declares `u_sceneColor`, the Model shader while its transmission is above zero) are drawn second, ray-bent through their thickness. The surface's own highlights are no longer dimmed by blending, as they were when transmission was only coverage. Only the opaque scene is refracted, and it needs a post-process chain to copy from; without one transmission falls back to the earlier coverage.- **Ground-truth ambient occlusion.** Ground-truth ambient occlusion (GTAO) is a post-process effect beside SSAO: a crease darkens by how closed it really is and a flat floor stays white, with no bias to tune. It marches the depth buffer along a few slice planes through each pixel, finds the horizon on both sides and integrates the open arc against the surface's own normal; the blur and composite are SSAO's, the low quality level leaves it out, and the ambient-occlusion switch governs both.diff --git a/desktop b/desktopindex 28e31754e..cdac1fb16 160000--- a/desktop+++ b/desktop@@ -1 +1 @@-Subproject commit 28e31754e355af383e80a2a24c38a25a9b4e9baa+Subproject commit cdac1fb167ebca5e49a511195d42708d1a9b1749diff --git a/docs/astro/src/content/docs/graphics/materials.mdx b/docs/astro/src/content/docs/graphics/materials.mdxindex 319af885a..b71c2bf89 100644--- a/docs/astro/src/content/docs/graphics/materials.mdx+++ b/docs/astro/src/content/docs/graphics/materials.mdx@@ -58,6 +58,10 @@ The **Model** shader is a metal/rough surface with layers on top. Each is off atEverything here is written by model import from the glTF extensions of the same names (`KHR_materials_clearcoat`, `_sheen`, `_anisotropy`, `_ior`, `_specular`, `_iridescence`, `_transmission`, `_volume`, `_diffuse_transmission`) — see [Models](/docs/assets/models/).+In the editor a Model material shows each layer as a section of its own with a switch in the header: off sets the layer's+strength to 0 (its colour to black for sheen), on gives it a strength where it looks like itself, and the section's fields tune+it. Reflectance, the index of refraction and the specular scale, has no switch.+**Limits.** These are cheap, real-time models, and say where they stop:- **Transmission refracts the opaque scene only.** A material that holds `u_transmission` above zero is drawn after the rest of the scene, from a copy of the picture taken just before: the ray is bent through the surface's thickness and the copy is read where it lands. So glass does not refract other glass, and a thin shell bends the picture by a fixed amount rather than as a lens that flips it. It needs a scene the engine can copy, which means a post-process chain is running (any effect, an output transform, or a render scale below 1); without one the surface falls back to alpha-blended coverage and shows the background undistorted.diff --git a/docs/astro/src/content/docs/graphics/post-processing.mdx b/docs/astro/src/content/docs/graphics/post-processing.mdxindex e4ffa3d11..ee46d93c1 100644--- a/docs/astro/src/content/docs/graphics/post-processing.mdx+++ b/docs/astro/src/content/docs/graphics/post-processing.mdx@@ -377,6 +377,10 @@ pick the output transform and leave the effect off.## Using a `PostProcessVolume`+In the editor a volume's effects are listed in the order they run, each with its switch and its parameters (colour parameters+included), a fold to hide them, and a tag for what it is for (Lens, Colour, Light, Atmosphere, Anti-aliasing, Stylize); an+effect that needs a compute shader says **WebGPU only**. The add menu groups the effects the same way.+Add a `PostProcessVolume`, enable effects, and set their parameters. Volumes**blend where they overlap**, so you can drive effects by area (a "underwater"volume) or fade them in over a transition.diff --git a/docs/astro/src/content/docs/graphics/time-of-day.mdx b/docs/astro/src/content/docs/graphics/time-of-day.mdxindex 1a9524c12..23fc7643a 100644--- a/docs/astro/src/content/docs/graphics/time-of-day.mdx+++ b/docs/astro/src/content/docs/graphics/time-of-day.mdx@@ -22,6 +22,14 @@ Add a `TimeOfDay` component to one entity.| `north` | How far the world is turned from compass north (+Z) toward +X, in degrees — which way the sun rises. || `drive` | What the time drives: Lights, Sky, Fog, Exposure, Reflections. |+## In the editor++Select the entity and the Details panel shows the day instead of a list of numbers: the sun's height across 24 hours, drawn+from this component's own latitude and declination (a winter day is a low short arc, a polar summer one never sets), with a+hand you drag to set the hour — or click the dial and use the arrow keys, 15 minutes a step, an hour with Shift. Beside it+are the sun's height, the daylight and the key light's scale at that hour, and below, a switch for each thing the clock+drives. The hour you set is what the editor previews; it only advances in Play.+## What an hour changes- **The key light.** The scene's directional light (the one that follows a panorama's sun or casts shadows, else the first) isdiff --git a/docs/astro/src/content/docs/graphics/weather.mdx b/docs/astro/src/content/docs/graphics/weather.mdxindex c56578e0f..662f03a35 100644--- a/docs/astro/src/content/docs/graphics/weather.mdx+++ b/docs/astro/src/content/docs/graphics/weather.mdx@@ -25,6 +25,13 @@ Add a `Weather` component to one entity.A turn is eased, so it starts and ends gently, and a finished turn lands on its target and clears itself.+## In the editor++The Details panel shows the five built-in weathers as buttons (a project's own preset id still works and shows as Custom), the+move toward the next one as a progress you can drag, the cycle and what the weather drives, and a readout of what it is doing+to the picture right now — the key light's scale, the fog's, the wetness and the rain. Rain and fog reach the picture through a+Post Process Volume, which the panel says.+## What a weather changes- **Lights.** Directional lights are scaled (and tinted) and the ambient light is scaled, from the strengths they werediff --git a/docs/astro/src/content/docs/zh-cn/graphics/materials.mdx b/docs/astro/src/content/docs/zh-cn/graphics/materials.mdxindex 9d1789ee3..fd6654593 100644--- a/docs/astro/src/content/docs/zh-cn/graphics/materials.mdx+++ b/docs/astro/src/content/docs/zh-cn/graphics/materials.mdx@@ -52,6 +52,8 @@ std140 uniform 块,于是 CPU 能按名字设置、并安全地送到 GPU。一这些都由模型导入从同名的 glTF 扩展写出(`KHR_materials_clearcoat`、`_sheen`、`_anisotropy`、`_ior`、`_specular`、`_iridescence`、`_transmission`、`_volume`、`_diffuse_transmission`)——见[模型](/docs/zh-cn/assets/models/)。+在编辑器里,Model 材质把每一层显示为带开关的独立分区:关闭把该层强度设为 0(绒面则是把颜色设为黑),开启给它一个能看出效果的强度,分区里的字段用来调节它。反射率(折射率和镜面缩放)没有开关。+**限制。** 这些是便宜的实时模型,下面说清楚它们止步在哪里:- **透射只折射不透明场景。** `u_transmission` 大于 0 的材质在场景其余部分之后绘制,读取的是之前刚拍下的画面副本:光线穿过表面厚度后被折弯,在落点处读取副本。所以玻璃不会折射另一块玻璃,薄壳对画面的偏折是固定的量,而不是像透镜那样把画面翻转。它需要引擎能拷贝的场景,也就是有后处理链在运行(任意效果、输出变换,或小于 1 的渲染比例);没有时表面退回 alpha 混合覆盖,背景不会变形。diff --git a/docs/astro/src/content/docs/zh-cn/graphics/post-processing.mdx b/docs/astro/src/content/docs/zh-cn/graphics/post-processing.mdxindex 528ff2555..3e22e44a4 100644--- a/docs/astro/src/content/docs/zh-cn/graphics/post-processing.mdx+++ b/docs/astro/src/content/docs/zh-cn/graphics/post-processing.mdx@@ -282,6 +282,8 @@ registerEffect({## 使用 `PostProcessVolume`+在编辑器里,体积的效果按执行顺序列出,每个都有开关和参数(包括颜色参数)、一个用来收起参数的折叠,以及说明它用途的标签(镜头、色彩、光照、大气、抗锯齿、风格化);需要计算着色器的效果会标出**仅 WebGPU**。添加菜单按同样的方式分组。+加一个 `PostProcessVolume`,启用效果,设置参数。体积**在重叠处混合**,所以你可以按区域驱动效果(比如一个"水下"体积),或在过渡中淡入。diff --git a/docs/astro/src/content/docs/zh-cn/graphics/time-of-day.mdx b/docs/astro/src/content/docs/zh-cn/graphics/time-of-day.mdxindex e5f6b9dc9..a873516be 100644--- a/docs/astro/src/content/docs/zh-cn/graphics/time-of-day.mdx+++ b/docs/astro/src/content/docs/zh-cn/graphics/time-of-day.mdx@@ -20,6 +20,10 @@ description: 一个 TimeOfDay 组件,让太阳和月亮在天空中运行,调暗| `north` | 世界相对罗盘正北(+Z)朝 +X 转了多少度——太阳从哪边升起。 || `drive` | 时间驱动什么:灯光、天空、雾、曝光、反射。 |+## 在编辑器里++选中该实体,Details 面板显示的是一天,而不是一串数字:24 小时里太阳的高度,按这个组件自己的纬度和赤纬画出(冬天是低而短的弧,极地夏天太阳不落),还有一根可以拖动来设置时刻的指针——也可以点一下表盘用方向键调整,每次 15 分钟,按住 Shift 为一小时。旁边是该时刻太阳的高度、日照和主光的缩放,下面是它驱动的每一项的开关。你设置的时刻就是编辑器预览的时刻,只有运行时才会推进。+## 一个钟点改变什么- **主光。** 场景里的方向光(跟随全景图太阳的、投射阴影的,否则取第一盏)对准太阳,并按白天的曲线缩放:贴近地平线时偏暖偏弱,diff --git a/docs/astro/src/content/docs/zh-cn/graphics/weather.mdx b/docs/astro/src/content/docs/zh-cn/graphics/weather.mdxindex 83387e960..3b4b8c85f 100644--- a/docs/astro/src/content/docs/zh-cn/graphics/weather.mdx+++ b/docs/astro/src/content/docs/zh-cn/graphics/weather.mdx@@ -23,6 +23,10 @@ description: 一个 Weather 组件,让场景处于晴、薄雾、阴天、雨或转变带缓动,开始和结束都平缓,完成的转变落在目标上并清空自己。+## 在编辑器里++Details 面板把五种内建天气显示为按钮(项目自己的预设 id 仍然有效,显示为自定义),把向下一种天气的过渡显示为可拖动的进度,还有循环、它驱动的内容,以及它此刻对画面做了什么的读数——主光的缩放、雾的缩放、潮湿和降雨。雨和雾通过 Post Process Volume 进入画面,面板里会这样说明。+## 天气改变什么- **灯光。** 方向光被缩放(并着色),环境光被缩放,依据的是它们创作时的强度——天气缩放的是你的数字,而不是它自己上一次的结果——diff --git a/sdk/etc/index.api.md b/sdk/etc/index.api.mdindex e7911ab17..5cb1ce910 100644--- a/sdk/etc/index.api.md+++ b/sdk/etc/index.api.md@@ -3576,6 +3576,7 @@ v: WorldAxis## EffectDef — interface @experimental```+category: EffectCategory | undefinedcolors: EffectColorDef[] | undefinedcompute: ComputeEffectSource | undefinedfactory: (() => ShaderHandle) | undefined@@ -5018,7 +5019,7 @@ sceneName: string | undefinedsource: RuntimeAssetSourcespineManager: SpineManager | null | undefinedspineModule: SpineWasmModule | null | undefined-uiTheme: "dark" | "light" | undefined+uiTheme: "light" | "dark" | undefineduiThemeOverrides: ThemeOverrides | undefined```@@ -5618,7 +5619,7 @@ send: (data: string | ArrayBuffer) => void## NodeParamSpec — interface @beta```key: string-kind: "texture" | "text" | "bool" | "float" | "channel" | "color"+kind: "texture" | "text" | "bool" | "float" | "color" | "channel"label: string```@@ -6480,7 +6481,7 @@ physicsConfig: Physics2DPluginConfig | undefinedphysicsEnabled: boolean | undefinedremoteRoot: string | undefinedsceneData: SceneData-uiTheme: "dark" | "light" | undefined+uiTheme: "light" | "dark" | undefineduiThemeOverrides: ThemeOverrides | undefinedwasmBaseUrl: string | undefined```@@ -6508,7 +6509,7 @@ module: ESEngineModulephysicsConfig: Physics2DPluginConfig | undefinedphysicsEnabled: boolean | undefinedscenes: { name: string; data: SceneData; }[]-uiTheme: "dark" | "light" | undefined+uiTheme: "light" | "dark" | undefineduiThemeOverrides: ThemeOverrides | undefinedySortLayers: number | undefined```@@ -7515,7 +7516,7 @@ source: RuntimeAssetSourcespineManager: SpineManager | null | undefinedspineModule: SpineWasmModule | null | undefinedsteamAppId: number | undefined-uiTheme: "dark" | "light" | undefined+uiTheme: "light" | "dark" | undefineduiThemeOverrides: ThemeOverrides | undefinedworlds: WorldManifest[] | undefined```diff --git a/sdk/etc/index.native.api.md b/sdk/etc/index.native.api.mdindex 720f90d67..c35c8efc4 100644--- a/sdk/etc/index.native.api.md+++ b/sdk/etc/index.native.api.md@@ -3584,6 +3584,7 @@ v: WorldAxis## EffectDef — interface @experimental```+category: EffectCategory | undefinedcolors: EffectColorDef[] | undefinedcompute: ComputeEffectSource | undefinedfactory: (() => ShaderHandle) | undefined@@ -5026,7 +5027,7 @@ sceneName: string | undefinedsource: RuntimeAssetSourcespineManager: SpineManager | null | undefinedspineModule: SpineWasmModule | null | undefined-uiTheme: "dark" | "light" | undefined+uiTheme: "light" | "dark" | undefineduiThemeOverrides: ThemeOverrides | undefined```@@ -5816,7 +5817,7 @@ send: (data: string | ArrayBuffer) => void## NodeParamSpec — interface @beta```key: string-kind: "texture" | "text" | "bool" | "float" | "channel" | "color"+kind: "texture" | "text" | "bool" | "float" | "color" | "channel"label: string```@@ -6683,7 +6684,7 @@ physicsConfig: Physics2DPluginConfig | undefinedphysicsEnabled: boolean | undefinedremoteRoot: string | undefinedsceneData: SceneData-uiTheme: "dark" | "light" | undefined+uiTheme: "light" | "dark" | undefineduiThemeOverrides: ThemeOverrides | undefinedwasmBaseUrl: string | undefined```@@ -6711,7 +6712,7 @@ module: ESEngineModulephysicsConfig: Physics2DPluginConfig | undefinedphysicsEnabled: boolean | undefinedscenes: { name: string; data: SceneData; }[]-uiTheme: "dark" | "light" | undefined+uiTheme: "light" | "dark" | undefineduiThemeOverrides: ThemeOverrides | undefinedySortLayers: number | undefined```@@ -7728,7 +7729,7 @@ source: RuntimeAssetSourcespineManager: SpineManager | null | undefinedspineModule: SpineWasmModule | null | undefinedsteamAppId: number | undefined-uiTheme: "dark" | "light" | undefined+uiTheme: "light" | "dark" | undefineduiThemeOverrides: ThemeOverrides | undefinedworlds: WorldManifest[] | undefined```diff --git a/sdk/etc/index.node.api.md b/sdk/etc/index.node.api.mdindex 6cfb61956..1c2d13aff 100644--- a/sdk/etc/index.node.api.md+++ b/sdk/etc/index.node.api.md@@ -3571,6 +3571,7 @@ v: WorldAxis## EffectDef — interface @experimental```+category: EffectCategory | undefinedcolors: EffectColorDef[] | undefinedcompute: ComputeEffectSource | undefinedfactory: (() => ShaderHandle) | undefined@@ -5013,7 +5014,7 @@ sceneName: string | undefinedsource: RuntimeAssetSourcespineManager: SpineManager | null | undefinedspineModule: SpineWasmModule | null | undefined-uiTheme: "dark" | "light" | undefined+uiTheme: "light" | "dark" | undefineduiThemeOverrides: ThemeOverrides | undefined```@@ -5613,7 +5614,7 @@ send: (data: string | ArrayBuffer) => void## NodeParamSpec — interface @beta```key: string-kind: "texture" | "text" | "bool" | "float" | "channel" | "color"+kind: "texture" | "text" | "bool" | "float" | "color" | "channel"label: string```@@ -6475,7 +6476,7 @@ physicsConfig: Physics2DPluginConfig | undefinedphysicsEnabled: boolean | undefinedremoteRoot: string | undefinedsceneData: SceneData-uiTheme: "dark" | "light" | undefined+uiTheme: "light" | "dark" | undefineduiThemeOverrides: ThemeOverrides | undefinedwasmBaseUrl: string | undefined```@@ -6503,7 +6504,7 @@ module: ESEngineModulephysicsConfig: Physics2DPluginConfig | undefinedphysicsEnabled: boolean | undefinedscenes: { name: string; data: SceneData; }[]-uiTheme: "dark" | "light" | undefined+uiTheme: "light" | "dark" | undefineduiThemeOverrides: ThemeOverrides | undefinedySortLayers: number | undefined```@@ -7510,7 +7511,7 @@ source: RuntimeAssetSourcespineManager: SpineManager | null | undefinedspineModule: SpineWasmModule | null | undefinedsteamAppId: number | undefined-uiTheme: "dark" | "light" | undefined+uiTheme: "light" | "dark" | undefineduiThemeOverrides: ThemeOverrides | undefinedworlds: WorldManifest[] | undefined```diff --git a/sdk/etc/minigame.api.md b/sdk/etc/minigame.api.mdindex b73f8f67a..d36f265d9 100644--- a/sdk/etc/minigame.api.md+++ b/sdk/etc/minigame.api.md@@ -3571,6 +3571,7 @@ v: WorldAxis## EffectDef — interface @experimental```+category: EffectCategory | undefinedcolors: EffectColorDef[] | undefinedcompute: ComputeEffectSource | undefinedfactory: (() => ShaderHandle) | undefined@@ -5013,7 +5014,7 @@ sceneName: string | undefinedsource: RuntimeAssetSourcespineManager: SpineManager | null | undefinedspineModule: SpineWasmModule | null | undefined-uiTheme: "dark" | "light" | undefined+uiTheme: "light" | "dark" | undefineduiThemeOverrides: ThemeOverrides | undefined```@@ -5678,7 +5679,7 @@ screenFit: { designWidth: number; designHeight: number; scaleMode: number; matchsideModuleFactories: Partial<Record<SideModuleId, EmscriptenFactory>> | undefinedsideModuleSuffix: string | undefinedsideModules: { id: string; file: string; globalName?: string; }[] | undefined-uiTheme: "dark" | "light" | undefined+uiTheme: "light" | "dark" | undefineduiThemeOverrides: ThemeOverrides | undefinedySortLayers: number | undefined```@@ -5906,7 +5907,7 @@ send: (data: string | ArrayBuffer) => void## NodeParamSpec — interface @beta```key: string-kind: "texture" | "text" | "bool" | "float" | "channel" | "color"+kind: "texture" | "text" | "bool" | "float" | "color" | "channel"label: string```@@ -6768,7 +6769,7 @@ physicsConfig: Physics2DPluginConfig | undefinedphysicsEnabled: boolean | undefinedremoteRoot: string | undefinedsceneData: SceneData-uiTheme: "dark" | "light" | undefined+uiTheme: "light" | "dark" | undefineduiThemeOverrides: ThemeOverrides | undefinedwasmBaseUrl: string | undefined```@@ -6796,7 +6797,7 @@ module: ESEngineModulephysicsConfig: Physics2DPluginConfig | undefinedphysicsEnabled: boolean | undefinedscenes: { name: string; data: SceneData; }[]-uiTheme: "dark" | "light" | undefined+uiTheme: "light" | "dark" | undefineduiThemeOverrides: ThemeOverrides | undefinedySortLayers: number | undefined```@@ -7803,7 +7804,7 @@ source: RuntimeAssetSourcespineManager: SpineManager | null | undefinedspineModule: SpineWasmModule | null | undefinedsteamAppId: number | undefined-uiTheme: "dark" | "light" | undefined+uiTheme: "light" | "dark" | undefineduiThemeOverrides: ThemeOverrides | undefinedworlds: WorldManifest[] | undefined```diff --git a/sdk/etc/wechat.api.md b/sdk/etc/wechat.api.mdindex 43aa59e78..facafb958 100644--- a/sdk/etc/wechat.api.md+++ b/sdk/etc/wechat.api.md@@ -3571,6 +3571,7 @@ v: WorldAxis## EffectDef — interface @experimental```+category: EffectCategory | undefinedcolors: EffectColorDef[] | undefinedcompute: ComputeEffectSource | undefinedfactory: (() => ShaderHandle) | undefined@@ -5020,7 +5021,7 @@ sceneName: string | undefinedsource: RuntimeAssetSourcespineManager: SpineManager | null | undefinedspineModule: SpineWasmModule | null | undefined-uiTheme: "dark" | "light" | undefined+uiTheme: "light" | "dark" | undefineduiThemeOverrides: ThemeOverrides | undefined```@@ -5620,7 +5621,7 @@ send: (data: string | ArrayBuffer) => void## NodeParamSpec — interface @beta```key: string-kind: "texture" | "text" | "bool" | "float" | "channel" | "color"+kind: "texture" | "text" | "bool" | "float" | "color" | "channel"label: string```@@ -6482,7 +6483,7 @@ physicsConfig: Physics2DPluginConfig | undefinedphysicsEnabled: boolean | undefinedremoteRoot: string | undefinedsceneData: SceneData-uiTheme: "dark" | "light" | undefined+uiTheme: "light" | "dark" | undefineduiThemeOverrides: ThemeOverrides | undefinedwasmBaseUrl: string | undefined```@@ -6510,7 +6511,7 @@ module: ESEngineModulephysicsConfig: Physics2DPluginConfig | undefinedphysicsEnabled: boolean | undefinedscenes: { name: string; data: SceneData; }[]-uiTheme: "dark" | "light" | undefined+uiTheme: "light" | "dark" | undefineduiThemeOverrides: ThemeOverrides | undefinedySortLayers: number | undefined```@@ -7517,7 +7518,7 @@ source: RuntimeAssetSourcespineManager: SpineManager | null | undefinedspineModule: SpineWasmModule | null | undefinedsteamAppId: number | undefined-uiTheme: "dark" | "light" | undefined+uiTheme: "light" | "dark" | undefineduiThemeOverrides: ThemeOverrides | undefinedworlds: WorldManifest[] | undefined```@@ -10898,7 +10899,7 @@ screenFit: { designWidth: number; designHeight: number; scaleMode: number; matchsideModuleFactories: Partial<Record<SideModuleId, EmscriptenFactory>> | undefinedsideModuleSuffix: string | undefinedsideModules: { id: string; file: string; globalName?: string; }[] | undefined-uiTheme: "dark" | "light" | undefined+uiTheme: "light" | "dark" | undefineduiThemeOverrides: ThemeOverrides | undefinedySortLayers: number | undefined```diff --git a/sdk/src/postprocess/effects.ts b/sdk/src/postprocess/effects.tsindex 13c05ff57..bd73edca9 100644--- a/sdk/src/postprocess/effects.ts+++ b/sdk/src/postprocess/effects.ts@@ -60,9 +60,14 @@ export interface ComputeEffectSource {workgroupSize?: [number, number];}+/** What an effect is for, which is how an editor groups a list of thirty: the camera, the colour, the light, the air, the edges, a look. */+export type EffectCategory = 'lens' | 'color' | 'light' | 'atmosphere' | 'aa' | 'stylize';+export interface EffectDef {type: string;label: string;+ /** Set for every built-in effect, by the table at the end of this file. */+ category?: EffectCategory;/** What compiles the effect's draw shader. Absent for a compute effect (see {@link compute}). */factory?: () => ShaderHandle;/** Set instead of `factory` for an effect that runs as a compute shader. */@@ -688,3 +693,18 @@ registerEffect({{ name: 'u_lut', label: 'LUT (1024x32, 32 slices)' },],});++const CATEGORIES: Record<EffectCategory, string[]> = {+ lens: ['bloom', 'depthOfField', 'motionBlur', 'lensFlare', 'filmGrain', 'chromaticAberration', 'lensDistortion', 'vignette', 'sharpen'],+ color: ['tonemap', 'colorGrade', 'lutGrade', 'autoExposure', 'grayscale'],+ light: ['ssao', 'gtao', 'ssgi', 'ssr', 'voxelGI', 'contactShadows', 'lightShafts', 'subsurface'],+ atmosphere: ['distanceFog', 'heightFog', 'skyAtmosphere', 'rain'],+ aa: ['fxaa', 'taa'],+ stylize: ['blur', 'pixelate', 'outline', 'depthOutline'],+};+for (const [category, types] of Object.entries(CATEGORIES) as [EffectCategory, string[]][]) {+ for (const type of types) {+ const def = effectRegistry.get(type);+ if (def) def.category = category;+ }+}diff --git a/tools/releaseNotes.mjs b/tools/releaseNotes.mjsindex b17b9ae0a..86f05b73f 100644--- a/tools/releaseNotes.mjs+++ b/tools/releaseNotes.mjs@@ -2493,6 +2493,8 @@ export const NOTED = {{"note":"Skinned meshes are followed by their bones, from the palette they were last drawn with."},"feat(render): fog follows the scene's sun and can walk the air against its shadow map":{"note":"Height Fog and Light Shafts follow the scene's own sun, and Height Fog can carry the sun's shadows as volumetric light."},+ "feat(editor): Time Of Day and Weather have Details panels of their own, the effect stack is grouped, and a material's surface layers are switches":+ {"note":"Time Of Day shows the day as a curve with a hand for the hour, Weather as preset buttons with a live readout, a volume's effects are grouped and tagged, and a Model material's surface layers are sections with switches."},"feat(render): screen-space subsurface scattering blurs the lit colour of surfaces a material marks":{"note":"A Subsurface Scattering effect blurs the lit colour of the surfaces a material marks as scattering, red furthest, without bleeding across a depth edge."},"feat(render): a transmissive material refracts the opaque scene behind it":