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
test(render): closed-form oracle scenes for lights, shadows, tone mapping, grade and fog; distance fog measures from the eye under an orthographic camera
yhh1f871d34b5c8
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 1c991f6c7..4e19af00b 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -19,6 +19,7 @@ published separately; it ships inside the editor.- **A terrain brush stroke no longer makes the ground vanish for a moment.** An edited page of the ground used to be thrown away at once and rebuilt over the next frames, so the touched area had no ground to draw until it was done; it now goes on being drawn as it was, and changes in place.- **Voxel Ground compiles on WebGPU again.** The Model shader's new wet-ground map left the voxel ground one texture past what a shader has units for, so its last texture was dropped and the whole shader was refused (`unresolved value 'u_wetMask'`). Voxel ground takes no wet map.- **Several editors open at once can be told apart by an agent, and each grants on its own.** An editor advertises itself in a file of its own (its process id, its project, its port, its permission) instead of the one file the last editor to start overwrote. An agent attached to more than one gets `list_editors` and `select_editor` (or `--instance` / `ESTELLA_MCP_INSTANCE`), and until it chooses it is refused with the list rather than sent to whichever window won. It then drives the editor it chose and no other. The Read only / Can edit permission belongs to the editor window it is switched in and every editor starts read-only; it is no longer a saved setting that a second editor inherited. The Connect AI Tools dialog shows which editor it is.+- **Distance Fog works under an orthographic camera.** The pass measured from depth 0, which for an orthographic eye is a plane as far behind the camera as the far plane is ahead (the projection runs from -far to far so 2D content behind the camera still draws), so every surface read as past the fog's end and a scene was fogged to its full colour at any near and far. It now measures from the plane the camera stands in. Perspective cameras are unchanged. Found by the closed-form render checks in `tools/oracle`, which draw spheres, floors and patches whose answer is a formula.### Changeddiff --git a/fixtures/scenes/oracle-distance-fog.esscene b/fixtures/scenes/oracle-distance-fog.esscenenew file mode 100644index 000000000..06c57e93d--- /dev/null+++ b/fixtures/scenes/oracle-distance-fog.esscene@@ -0,0 +1,408 @@+{+ "version": 4,+ "name": "oracle-distance-fog",+ "entities": [+ {+ "id": 0,+ "name": "Camera",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 400,+ "z": 0+ },+ "rotation": {+ "x": -0.7071067811865476,+ "y": 0,+ "z": 0,+ "w": 0.7071067811865476+ }+ }+ },+ {+ "type": "Camera",+ "data": {+ "projectionType": 1,+ "orthoSize": 100,+ "nearPlane": 1,+ "farPlane": 2000,+ "isActive": true,+ "priority": 0+ }+ }+ ]+ },+ {+ "id": 1,+ "name": "Patch0",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -75,+ "y": 2.5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.05,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.10800000000000001,+ "g": 0.10800000000000001,+ "b": 0.10800000000000001,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 2,+ "name": "Patch1",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -25,+ "y": 22.5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.45,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.14,+ "g": 0.14,+ "b": 0.14,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 3,+ "name": "Patch2",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 25,+ "y": 42.5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.85,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.244,+ "g": 0.244,+ "b": 0.244,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 4,+ "name": "Patch3",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 75,+ "y": 62.5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 1.25,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.5,+ "g": 0.5,+ "b": 0.5,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 5,+ "name": "Patch4",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -75,+ "y": 82.5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 1.65,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.9,+ "g": 0.9,+ "b": 0.9,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 6,+ "name": "Patch5",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -25,+ "y": 102.5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 2.05,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.9,+ "g": 0.9,+ "b": 0.9,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 7,+ "name": "Patch6",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 25,+ "y": 122.5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 2.45,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.9,+ "g": 0.9,+ "b": 0.9,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 8,+ "name": "Patch7",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 75,+ "y": 142.5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 2.85,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.9,+ "g": 0.9,+ "b": 0.9,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 9,+ "name": "Look",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ }+ }+ },+ {+ "type": "PostProcessVolume",+ "data": {+ "isGlobal": true,+ "priority": 0,+ "weight": 1,+ "effects": [+ {+ "type": "distanceFog",+ "enabled": true,+ "uniforms": {+ "u_fogNear": 100,+ "u_fogFar": 400,+ "u_intensity": 0.9+ },+ "colors": {+ "u_fogColor": {+ "r": 0.6,+ "g": 0.7,+ "b": 0.8,+ "a": 1+ }+ }+ }+ ]+ }+ }+ ]+ }+ ]+}diff --git a/fixtures/scenes/oracle-encode-linear.esscene b/fixtures/scenes/oracle-encode-linear.esscenenew file mode 100644index 000000000..052f8729b--- /dev/null+++ b/fixtures/scenes/oracle-encode-linear.esscene@@ -0,0 +1,362 @@+{+ "version": 4,+ "name": "oracle-encode-linear",+ "entities": [+ {+ "id": 0,+ "name": "Camera",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 400,+ "z": 0+ },+ "rotation": {+ "x": -0.7071067811865476,+ "y": 0,+ "z": 0,+ "w": 0.7071067811865476+ }+ }+ },+ {+ "type": "Camera",+ "data": {+ "projectionType": 1,+ "orthoSize": 100,+ "nearPlane": 1,+ "farPlane": 2000,+ "isActive": true,+ "priority": 0+ }+ }+ ]+ },+ {+ "id": 1,+ "name": "Patch0",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -75,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.01,+ "g": 0.01,+ "b": 0.01,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 2,+ "name": "Patch1",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -25,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.05,+ "g": 0.05,+ "b": 0.05,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 3,+ "name": "Patch2",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 25,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.18,+ "g": 0.18,+ "b": 0.18,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 4,+ "name": "Patch3",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 75,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.5,+ "g": 0.5,+ "b": 0.5,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 5,+ "name": "Patch4",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -75,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 6,+ "name": "Patch5",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -25,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 2,+ "g": 2,+ "b": 2,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 7,+ "name": "Patch6",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 25,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 4,+ "g": 4,+ "b": 4,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 8,+ "name": "Patch7",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 75,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 8,+ "g": 8,+ "b": 8,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ }+ ]+}diff --git a/fixtures/scenes/oracle-grade-balance.esscene b/fixtures/scenes/oracle-grade-balance.esscenenew file mode 100644index 000000000..0923ece5a--- /dev/null+++ b/fixtures/scenes/oracle-grade-balance.esscene@@ -0,0 +1,399 @@+{+ "version": 4,+ "name": "oracle-grade-balance",+ "entities": [+ {+ "id": 0,+ "name": "Camera",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 400,+ "z": 0+ },+ "rotation": {+ "x": -0.7071067811865476,+ "y": 0,+ "z": 0,+ "w": 0.7071067811865476+ }+ }+ },+ {+ "type": "Camera",+ "data": {+ "projectionType": 1,+ "orthoSize": 100,+ "nearPlane": 1,+ "farPlane": 2000,+ "isActive": true,+ "priority": 0+ }+ }+ ]+ },+ {+ "id": 1,+ "name": "Patch0",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -75,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.8,+ "g": 0.1,+ "b": 0.05,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 2,+ "name": "Patch1",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -25,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.05,+ "g": 0.6,+ "b": 0.1,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 3,+ "name": "Patch2",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 25,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.05,+ "g": 0.1,+ "b": 0.9,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 4,+ "name": "Patch3",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 75,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.9,+ "g": 0.7,+ "b": 0.1,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 5,+ "name": "Patch4",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -75,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.5,+ "g": 0.5,+ "b": 0.5,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 6,+ "name": "Patch5",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -25,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.2,+ "g": 0.3,+ "b": 0.4,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 7,+ "name": "Patch6",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 25,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.02,+ "g": 0.4,+ "b": 0.35,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 8,+ "name": "Patch7",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 75,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 1.5,+ "g": 0.6,+ "b": 0.2,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 9,+ "name": "Look",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ }+ }+ },+ {+ "type": "PostProcessVolume",+ "data": {+ "isGlobal": true,+ "priority": 0,+ "weight": 1,+ "effects": [+ {+ "type": "colorGrade",+ "enabled": true,+ "uniforms": {+ "u_temperature": 0.6,+ "u_tint": -0.5+ }+ }+ ]+ }+ }+ ]+ }+ ]+}diff --git a/fixtures/scenes/oracle-grade-contrast.esscene b/fixtures/scenes/oracle-grade-contrast.esscenenew file mode 100644index 000000000..16e28c909--- /dev/null+++ b/fixtures/scenes/oracle-grade-contrast.esscene@@ -0,0 +1,398 @@+{+ "version": 4,+ "name": "oracle-grade-contrast",+ "entities": [+ {+ "id": 0,+ "name": "Camera",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 400,+ "z": 0+ },+ "rotation": {+ "x": -0.7071067811865476,+ "y": 0,+ "z": 0,+ "w": 0.7071067811865476+ }+ }+ },+ {+ "type": "Camera",+ "data": {+ "projectionType": 1,+ "orthoSize": 100,+ "nearPlane": 1,+ "farPlane": 2000,+ "isActive": true,+ "priority": 0+ }+ }+ ]+ },+ {+ "id": 1,+ "name": "Patch0",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -75,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.8,+ "g": 0.1,+ "b": 0.05,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 2,+ "name": "Patch1",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -25,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.05,+ "g": 0.6,+ "b": 0.1,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 3,+ "name": "Patch2",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 25,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.05,+ "g": 0.1,+ "b": 0.9,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 4,+ "name": "Patch3",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 75,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.9,+ "g": 0.7,+ "b": 0.1,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 5,+ "name": "Patch4",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -75,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.5,+ "g": 0.5,+ "b": 0.5,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 6,+ "name": "Patch5",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -25,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.2,+ "g": 0.3,+ "b": 0.4,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 7,+ "name": "Patch6",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 25,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.02,+ "g": 0.4,+ "b": 0.35,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 8,+ "name": "Patch7",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 75,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 1.5,+ "g": 0.6,+ "b": 0.2,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 9,+ "name": "Look",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ }+ }+ },+ {+ "type": "PostProcessVolume",+ "data": {+ "isGlobal": true,+ "priority": 0,+ "weight": 1,+ "effects": [+ {+ "type": "colorGrade",+ "enabled": true,+ "uniforms": {+ "u_contrast": 1.4+ }+ }+ ]+ }+ }+ ]+ }+ ]+}diff --git a/fixtures/scenes/oracle-grade-exposure.esscene b/fixtures/scenes/oracle-grade-exposure.esscenenew file mode 100644index 000000000..98e3a904f--- /dev/null+++ b/fixtures/scenes/oracle-grade-exposure.esscene@@ -0,0 +1,398 @@+{+ "version": 4,+ "name": "oracle-grade-exposure",+ "entities": [+ {+ "id": 0,+ "name": "Camera",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 400,+ "z": 0+ },+ "rotation": {+ "x": -0.7071067811865476,+ "y": 0,+ "z": 0,+ "w": 0.7071067811865476+ }+ }+ },+ {+ "type": "Camera",+ "data": {+ "projectionType": 1,+ "orthoSize": 100,+ "nearPlane": 1,+ "farPlane": 2000,+ "isActive": true,+ "priority": 0+ }+ }+ ]+ },+ {+ "id": 1,+ "name": "Patch0",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -75,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.01,+ "g": 0.01,+ "b": 0.01,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 2,+ "name": "Patch1",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -25,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.05,+ "g": 0.05,+ "b": 0.05,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 3,+ "name": "Patch2",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 25,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.18,+ "g": 0.18,+ "b": 0.18,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 4,+ "name": "Patch3",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 75,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.5,+ "g": 0.5,+ "b": 0.5,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 5,+ "name": "Patch4",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -75,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 6,+ "name": "Patch5",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -25,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 2,+ "g": 2,+ "b": 2,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 7,+ "name": "Patch6",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 25,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 4,+ "g": 4,+ "b": 4,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 8,+ "name": "Patch7",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 75,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 8,+ "g": 8,+ "b": 8,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 9,+ "name": "Look",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ }+ }+ },+ {+ "type": "PostProcessVolume",+ "data": {+ "isGlobal": true,+ "priority": 0,+ "weight": 1,+ "effects": [+ {+ "type": "colorGrade",+ "enabled": true,+ "uniforms": {+ "u_exposure": -2+ }+ }+ ]+ }+ }+ ]+ }+ ]+}diff --git a/fixtures/scenes/oracle-grade-saturation.esscene b/fixtures/scenes/oracle-grade-saturation.esscenenew file mode 100644index 000000000..242fa8d03--- /dev/null+++ b/fixtures/scenes/oracle-grade-saturation.esscene@@ -0,0 +1,398 @@+{+ "version": 4,+ "name": "oracle-grade-saturation",+ "entities": [+ {+ "id": 0,+ "name": "Camera",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 400,+ "z": 0+ },+ "rotation": {+ "x": -0.7071067811865476,+ "y": 0,+ "z": 0,+ "w": 0.7071067811865476+ }+ }+ },+ {+ "type": "Camera",+ "data": {+ "projectionType": 1,+ "orthoSize": 100,+ "nearPlane": 1,+ "farPlane": 2000,+ "isActive": true,+ "priority": 0+ }+ }+ ]+ },+ {+ "id": 1,+ "name": "Patch0",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -75,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.8,+ "g": 0.1,+ "b": 0.05,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 2,+ "name": "Patch1",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -25,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.05,+ "g": 0.6,+ "b": 0.1,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 3,+ "name": "Patch2",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 25,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.05,+ "g": 0.1,+ "b": 0.9,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 4,+ "name": "Patch3",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 75,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.9,+ "g": 0.7,+ "b": 0.1,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 5,+ "name": "Patch4",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -75,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.5,+ "g": 0.5,+ "b": 0.5,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 6,+ "name": "Patch5",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -25,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.2,+ "g": 0.3,+ "b": 0.4,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 7,+ "name": "Patch6",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 25,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.02,+ "g": 0.4,+ "b": 0.35,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 8,+ "name": "Patch7",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 75,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 1.5,+ "g": 0.6,+ "b": 0.2,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 9,+ "name": "Look",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ }+ }+ },+ {+ "type": "PostProcessVolume",+ "data": {+ "isGlobal": true,+ "priority": 0,+ "weight": 1,+ "effects": [+ {+ "type": "colorGrade",+ "enabled": true,+ "uniforms": {+ "u_saturation": 0.4+ }+ }+ ]+ }+ }+ ]+ }+ ]+}diff --git a/fixtures/scenes/oracle-hemisphere-gamma.esscene b/fixtures/scenes/oracle-hemisphere-gamma.esscenenew file mode 100644index 000000000..bd45888a7--- /dev/null+++ b/fixtures/scenes/oracle-hemisphere-gamma.esscene@@ -0,0 +1,121 @@+{+ "version": 4,+ "name": "oracle-hemisphere-gamma",+ "entities": [+ {+ "id": 0,+ "name": "Camera",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 400,+ "z": 0+ },+ "rotation": {+ "x": -0.7071067811865476,+ "y": 0,+ "z": 0,+ "w": 0.7071067811865476+ }+ }+ },+ {+ "type": "Camera",+ "data": {+ "projectionType": 1,+ "orthoSize": 100,+ "nearPlane": 1,+ "farPlane": 2000,+ "isActive": true,+ "priority": 0+ }+ }+ ]+ },+ {+ "id": 1,+ "name": "Ball",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 50,+ "z": 0+ },+ "scale": {+ "x": 1,+ "y": 1,+ "z": 1+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:sphere",+ "color": {+ "r": 0.8,+ "g": 0.8,+ "b": 0.8,+ "a": 1+ },+ "lit": true,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 2,+ "name": "Ambient",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ }+ }+ },+ {+ "type": "Light",+ "data": {+ "type": 2,+ "color": {+ "r": 0.3,+ "g": 0.5,+ "b": 1,+ "a": 1+ },+ "intensity": 1,+ "hemisphere": true,+ "groundColor": {+ "r": 0.6,+ "g": 0.4,+ "b": 0.2,+ "a": 1+ }+ }+ }+ ]+ }+ ]+}diff --git a/fixtures/scenes/oracle-hemisphere.esscene b/fixtures/scenes/oracle-hemisphere.esscenenew file mode 100644index 000000000..7678ce661--- /dev/null+++ b/fixtures/scenes/oracle-hemisphere.esscene@@ -0,0 +1,121 @@+{+ "version": 4,+ "name": "oracle-hemisphere",+ "entities": [+ {+ "id": 0,+ "name": "Camera",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 400,+ "z": 0+ },+ "rotation": {+ "x": -0.7071067811865476,+ "y": 0,+ "z": 0,+ "w": 0.7071067811865476+ }+ }+ },+ {+ "type": "Camera",+ "data": {+ "projectionType": 1,+ "orthoSize": 100,+ "nearPlane": 1,+ "farPlane": 2000,+ "isActive": true,+ "priority": 0+ }+ }+ ]+ },+ {+ "id": 1,+ "name": "Ball",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 50,+ "z": 0+ },+ "scale": {+ "x": 1,+ "y": 1,+ "z": 1+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:sphere",+ "color": {+ "r": 0.8,+ "g": 0.8,+ "b": 0.8,+ "a": 1+ },+ "lit": true,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 2,+ "name": "Ambient",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ }+ }+ },+ {+ "type": "Light",+ "data": {+ "type": 2,+ "color": {+ "r": 0.3,+ "g": 0.5,+ "b": 1,+ "a": 1+ },+ "intensity": 1.2,+ "hemisphere": true,+ "groundColor": {+ "r": 0.6,+ "g": 0.4,+ "b": 0.2,+ "a": 1+ }+ }+ }+ ]+ }+ ]+}diff --git a/fixtures/scenes/oracle-lambert-sun-gamma.esscene b/fixtures/scenes/oracle-lambert-sun-gamma.esscenenew file mode 100644index 000000000..d70a5e433--- /dev/null+++ b/fixtures/scenes/oracle-lambert-sun-gamma.esscene@@ -0,0 +1,152 @@+{+ "version": 4,+ "name": "oracle-lambert-sun-gamma",+ "entities": [+ {+ "id": 0,+ "name": "Camera",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 400,+ "z": 0+ },+ "rotation": {+ "x": -0.7071067811865476,+ "y": 0,+ "z": 0,+ "w": 0.7071067811865476+ }+ }+ },+ {+ "type": "Camera",+ "data": {+ "projectionType": 1,+ "orthoSize": 100,+ "nearPlane": 1,+ "farPlane": 2000,+ "isActive": true,+ "priority": 0+ }+ }+ ]+ },+ {+ "id": 1,+ "name": "Ball",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 50,+ "z": 0+ },+ "scale": {+ "x": 1,+ "y": 1,+ "z": 1+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:sphere",+ "color": {+ "r": 0.9,+ "g": 0.5,+ "b": 0.2,+ "a": 1+ },+ "lit": true,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 2,+ "name": "Sun",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "rotation": {+ "w": 0.875426098065593,+ "x": -0.40821789367673483,+ "y": 0.23456971600980447,+ "z": 0.109381654946615+ }+ }+ },+ {+ "type": "Light",+ "data": {+ "type": 1,+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "intensity": 1+ }+ }+ ]+ },+ {+ "id": 3,+ "name": "Ambient",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ }+ }+ },+ {+ "type": "Light",+ "data": {+ "type": 2,+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "intensity": 0.1+ }+ }+ ]+ }+ ]+}diff --git a/fixtures/scenes/oracle-lambert-sun.esscene b/fixtures/scenes/oracle-lambert-sun.esscenenew file mode 100644index 000000000..0583ad8eb--- /dev/null+++ b/fixtures/scenes/oracle-lambert-sun.esscene@@ -0,0 +1,152 @@+{+ "version": 4,+ "name": "oracle-lambert-sun",+ "entities": [+ {+ "id": 0,+ "name": "Camera",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 400,+ "z": 0+ },+ "rotation": {+ "x": -0.7071067811865476,+ "y": 0,+ "z": 0,+ "w": 0.7071067811865476+ }+ }+ },+ {+ "type": "Camera",+ "data": {+ "projectionType": 1,+ "orthoSize": 100,+ "nearPlane": 1,+ "farPlane": 2000,+ "isActive": true,+ "priority": 0+ }+ }+ ]+ },+ {+ "id": 1,+ "name": "Ball",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 50,+ "z": 0+ },+ "scale": {+ "x": 1,+ "y": 1,+ "z": 1+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:sphere",+ "color": {+ "r": 0.9,+ "g": 0.5,+ "b": 0.2,+ "a": 1+ },+ "lit": true,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 2,+ "name": "Sun",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "rotation": {+ "w": 0.875426098065593,+ "x": -0.40821789367673483,+ "y": 0.23456971600980447,+ "z": 0.109381654946615+ }+ }+ },+ {+ "type": "Light",+ "data": {+ "type": 1,+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "intensity": 1.5+ }+ }+ ]+ },+ {+ "id": 3,+ "name": "Ambient",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ }+ }+ },+ {+ "type": "Light",+ "data": {+ "type": 2,+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "intensity": 0.1+ }+ }+ ]+ }+ ]+}diff --git a/fixtures/scenes/oracle-output-aces-colour.esscene b/fixtures/scenes/oracle-output-aces-colour.esscenenew file mode 100644index 000000000..0a43414c9--- /dev/null+++ b/fixtures/scenes/oracle-output-aces-colour.esscene@@ -0,0 +1,362 @@+{+ "version": 4,+ "name": "oracle-output-aces-colour",+ "entities": [+ {+ "id": 0,+ "name": "Camera",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 400,+ "z": 0+ },+ "rotation": {+ "x": -0.7071067811865476,+ "y": 0,+ "z": 0,+ "w": 0.7071067811865476+ }+ }+ },+ {+ "type": "Camera",+ "data": {+ "projectionType": 1,+ "orthoSize": 100,+ "nearPlane": 1,+ "farPlane": 2000,+ "isActive": true,+ "priority": 0+ }+ }+ ]+ },+ {+ "id": 1,+ "name": "Patch0",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -75,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.8,+ "g": 0.1,+ "b": 0.05,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 2,+ "name": "Patch1",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -25,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.05,+ "g": 0.6,+ "b": 0.1,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 3,+ "name": "Patch2",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 25,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.05,+ "g": 0.1,+ "b": 0.9,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 4,+ "name": "Patch3",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 75,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.9,+ "g": 0.7,+ "b": 0.1,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 5,+ "name": "Patch4",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -75,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.5,+ "g": 0.5,+ "b": 0.5,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 6,+ "name": "Patch5",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -25,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.2,+ "g": 0.3,+ "b": 0.4,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 7,+ "name": "Patch6",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 25,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.02,+ "g": 0.4,+ "b": 0.35,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 8,+ "name": "Patch7",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 75,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 1.5,+ "g": 0.6,+ "b": 0.2,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ }+ ]+}diff --git a/fixtures/scenes/oracle-output-aces.esscene b/fixtures/scenes/oracle-output-aces.esscenenew file mode 100644index 000000000..af9de1b09--- /dev/null+++ b/fixtures/scenes/oracle-output-aces.esscene@@ -0,0 +1,362 @@+{+ "version": 4,+ "name": "oracle-output-aces",+ "entities": [+ {+ "id": 0,+ "name": "Camera",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 400,+ "z": 0+ },+ "rotation": {+ "x": -0.7071067811865476,+ "y": 0,+ "z": 0,+ "w": 0.7071067811865476+ }+ }+ },+ {+ "type": "Camera",+ "data": {+ "projectionType": 1,+ "orthoSize": 100,+ "nearPlane": 1,+ "farPlane": 2000,+ "isActive": true,+ "priority": 0+ }+ }+ ]+ },+ {+ "id": 1,+ "name": "Patch0",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -75,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.01,+ "g": 0.01,+ "b": 0.01,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 2,+ "name": "Patch1",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -25,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.05,+ "g": 0.05,+ "b": 0.05,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 3,+ "name": "Patch2",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 25,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.18,+ "g": 0.18,+ "b": 0.18,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 4,+ "name": "Patch3",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 75,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.5,+ "g": 0.5,+ "b": 0.5,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 5,+ "name": "Patch4",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -75,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 6,+ "name": "Patch5",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -25,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 2,+ "g": 2,+ "b": 2,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 7,+ "name": "Patch6",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 25,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 4,+ "g": 4,+ "b": 4,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 8,+ "name": "Patch7",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 75,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 8,+ "g": 8,+ "b": 8,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ }+ ]+}diff --git a/fixtures/scenes/oracle-output-neutral-colour.esscene b/fixtures/scenes/oracle-output-neutral-colour.esscenenew file mode 100644index 000000000..357d027d8--- /dev/null+++ b/fixtures/scenes/oracle-output-neutral-colour.esscene@@ -0,0 +1,362 @@+{+ "version": 4,+ "name": "oracle-output-neutral-colour",+ "entities": [+ {+ "id": 0,+ "name": "Camera",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 400,+ "z": 0+ },+ "rotation": {+ "x": -0.7071067811865476,+ "y": 0,+ "z": 0,+ "w": 0.7071067811865476+ }+ }+ },+ {+ "type": "Camera",+ "data": {+ "projectionType": 1,+ "orthoSize": 100,+ "nearPlane": 1,+ "farPlane": 2000,+ "isActive": true,+ "priority": 0+ }+ }+ ]+ },+ {+ "id": 1,+ "name": "Patch0",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -75,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.8,+ "g": 0.1,+ "b": 0.05,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 2,+ "name": "Patch1",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -25,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.05,+ "g": 0.6,+ "b": 0.1,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 3,+ "name": "Patch2",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 25,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.05,+ "g": 0.1,+ "b": 0.9,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 4,+ "name": "Patch3",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 75,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.9,+ "g": 0.7,+ "b": 0.1,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 5,+ "name": "Patch4",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -75,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.5,+ "g": 0.5,+ "b": 0.5,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 6,+ "name": "Patch5",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -25,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.2,+ "g": 0.3,+ "b": 0.4,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 7,+ "name": "Patch6",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 25,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.02,+ "g": 0.4,+ "b": 0.35,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 8,+ "name": "Patch7",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 75,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 1.5,+ "g": 0.6,+ "b": 0.2,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ }+ ]+}diff --git a/fixtures/scenes/oracle-output-neutral.esscene b/fixtures/scenes/oracle-output-neutral.esscenenew file mode 100644index 000000000..fb091b2d4--- /dev/null+++ b/fixtures/scenes/oracle-output-neutral.esscene@@ -0,0 +1,362 @@+{+ "version": 4,+ "name": "oracle-output-neutral",+ "entities": [+ {+ "id": 0,+ "name": "Camera",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 400,+ "z": 0+ },+ "rotation": {+ "x": -0.7071067811865476,+ "y": 0,+ "z": 0,+ "w": 0.7071067811865476+ }+ }+ },+ {+ "type": "Camera",+ "data": {+ "projectionType": 1,+ "orthoSize": 100,+ "nearPlane": 1,+ "farPlane": 2000,+ "isActive": true,+ "priority": 0+ }+ }+ ]+ },+ {+ "id": 1,+ "name": "Patch0",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -75,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.01,+ "g": 0.01,+ "b": 0.01,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 2,+ "name": "Patch1",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -25,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.05,+ "g": 0.05,+ "b": 0.05,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 3,+ "name": "Patch2",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 25,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.18,+ "g": 0.18,+ "b": 0.18,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 4,+ "name": "Patch3",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 75,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.5,+ "g": 0.5,+ "b": 0.5,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 5,+ "name": "Patch4",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -75,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 6,+ "name": "Patch5",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -25,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 2,+ "g": 2,+ "b": 2,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 7,+ "name": "Patch6",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 25,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 4,+ "g": 4,+ "b": 4,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 8,+ "name": "Patch7",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 75,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 8,+ "g": 8,+ "b": 8,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ }+ ]+}diff --git a/fixtures/scenes/oracle-point-isq.esscene b/fixtures/scenes/oracle-point-isq.esscenenew file mode 100644index 000000000..657f571d1--- /dev/null+++ b/fixtures/scenes/oracle-point-isq.esscene@@ -0,0 +1,116 @@+{+ "version": 4,+ "name": "oracle-point-isq",+ "entities": [+ {+ "id": 0,+ "name": "Camera",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 400,+ "z": 0+ },+ "rotation": {+ "x": -0.7071067811865476,+ "y": 0,+ "z": 0,+ "w": 0.7071067811865476+ }+ }+ },+ {+ "type": "Camera",+ "data": {+ "projectionType": 1,+ "orthoSize": 100,+ "nearPlane": 1,+ "farPlane": 2000,+ "isActive": true,+ "priority": 0+ }+ }+ ]+ },+ {+ "id": 1,+ "name": "Floor",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "scale": {+ "x": 4,+ "y": 0.1,+ "z": 4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "lit": true,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 2,+ "name": "Lamp",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 105,+ "z": 0+ }+ }+ },+ {+ "type": "Light",+ "data": {+ "type": 0,+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "intensity": 0.8,+ "radius": 800,+ "inverseSquare": true+ }+ }+ ]+ }+ ]+}diff --git a/fixtures/scenes/oracle-point-linear-curve.esscene b/fixtures/scenes/oracle-point-linear-curve.esscenenew file mode 100644index 000000000..b83bc3f1a--- /dev/null+++ b/fixtures/scenes/oracle-point-linear-curve.esscene@@ -0,0 +1,116 @@+{+ "version": 4,+ "name": "oracle-point-linear-curve",+ "entities": [+ {+ "id": 0,+ "name": "Camera",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 400,+ "z": 0+ },+ "rotation": {+ "x": -0.7071067811865476,+ "y": 0,+ "z": 0,+ "w": 0.7071067811865476+ }+ }+ },+ {+ "type": "Camera",+ "data": {+ "projectionType": 1,+ "orthoSize": 100,+ "nearPlane": 1,+ "farPlane": 2000,+ "isActive": true,+ "priority": 0+ }+ }+ ]+ },+ {+ "id": 1,+ "name": "Floor",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "scale": {+ "x": 4,+ "y": 0.1,+ "z": 4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "lit": true,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 2,+ "name": "Lamp",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 105,+ "z": 0+ }+ }+ },+ {+ "type": "Light",+ "data": {+ "type": 0,+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "intensity": 1.2,+ "radius": 400,+ "falloff": 2.5+ }+ }+ ]+ }+ ]+}diff --git a/fixtures/scenes/oracle-point-linear.esscene b/fixtures/scenes/oracle-point-linear.esscenenew file mode 100644index 000000000..b2a918316--- /dev/null+++ b/fixtures/scenes/oracle-point-linear.esscene@@ -0,0 +1,116 @@+{+ "version": 4,+ "name": "oracle-point-linear",+ "entities": [+ {+ "id": 0,+ "name": "Camera",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 400,+ "z": 0+ },+ "rotation": {+ "x": -0.7071067811865476,+ "y": 0,+ "z": 0,+ "w": 0.7071067811865476+ }+ }+ },+ {+ "type": "Camera",+ "data": {+ "projectionType": 1,+ "orthoSize": 100,+ "nearPlane": 1,+ "farPlane": 2000,+ "isActive": true,+ "priority": 0+ }+ }+ ]+ },+ {+ "id": 1,+ "name": "Floor",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "scale": {+ "x": 4,+ "y": 0.1,+ "z": 4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "lit": true,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 2,+ "name": "Lamp",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 105,+ "z": 0+ }+ }+ },+ {+ "type": "Light",+ "data": {+ "type": 0,+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "intensity": 1.2,+ "radius": 400,+ "falloff": 1+ }+ }+ ]+ }+ ]+}diff --git a/fixtures/scenes/oracle-point-shadow.esscene b/fixtures/scenes/oracle-point-shadow.esscenenew file mode 100644index 000000000..f77bd85d4--- /dev/null+++ b/fixtures/scenes/oracle-point-shadow.esscene@@ -0,0 +1,229 @@+{+ "version": 4,+ "name": "oracle-point-shadow",+ "entities": [+ {+ "id": 0,+ "name": "Camera",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 400,+ "z": 0+ },+ "rotation": {+ "x": -0.7071067811865476,+ "y": 0,+ "z": 0,+ "w": 0.7071067811865476+ }+ }+ },+ {+ "type": "Camera",+ "data": {+ "projectionType": 1,+ "orthoSize": 100,+ "nearPlane": 1,+ "farPlane": 2000,+ "isActive": true,+ "priority": 0+ }+ }+ ]+ },+ {+ "id": 1,+ "name": "Floor",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "scale": {+ "x": 4,+ "y": 0.1,+ "z": 4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.8,+ "g": 0.8,+ "b": 0.8,+ "a": 1+ },+ "lit": true,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 2,+ "name": "Box",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 30,+ "y": 35,+ "z": -20+ },+ "scale": {+ "x": 0.4,+ "y": 0.6,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.6,+ "g": 0.6,+ "b": 0.6,+ "a": 1+ },+ "lit": true,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 3,+ "name": "Ball",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -45,+ "y": 23,+ "z": 25+ },+ "scale": {+ "x": 0.36,+ "y": 0.36,+ "z": 0.36+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:sphere",+ "color": {+ "r": 0.6,+ "g": 0.6,+ "b": 0.6,+ "a": 1+ },+ "lit": true,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 4,+ "name": "Lamp",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -10,+ "y": 145,+ "z": 60+ }+ }+ },+ {+ "type": "Light",+ "data": {+ "type": 0,+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "intensity": 1.4,+ "radius": 500,+ "falloff": 1,+ "meshShadows": true+ }+ }+ ]+ },+ {+ "id": 5,+ "name": "Ambient",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ }+ }+ },+ {+ "type": "Light",+ "data": {+ "type": 2,+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "intensity": 0.15+ }+ }+ ]+ }+ ]+}diff --git a/fixtures/scenes/oracle-spot-cone.esscene b/fixtures/scenes/oracle-spot-cone.esscenenew file mode 100644index 000000000..9cf2bf405--- /dev/null+++ b/fixtures/scenes/oracle-spot-cone.esscene@@ -0,0 +1,124 @@+{+ "version": 4,+ "name": "oracle-spot-cone",+ "entities": [+ {+ "id": 0,+ "name": "Camera",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 400,+ "z": 0+ },+ "rotation": {+ "x": -0.7071067811865476,+ "y": 0,+ "z": 0,+ "w": 0.7071067811865476+ }+ }+ },+ {+ "type": "Camera",+ "data": {+ "projectionType": 1,+ "orthoSize": 100,+ "nearPlane": 1,+ "farPlane": 2000,+ "isActive": true,+ "priority": 0+ }+ }+ ]+ },+ {+ "id": 1,+ "name": "Floor",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "scale": {+ "x": 4,+ "y": 0.1,+ "z": 4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "lit": true,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 2,+ "name": "Lamp",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 105,+ "z": 0+ },+ "rotation": {+ "x": -0.7071067811865475,+ "y": 0,+ "z": 0,+ "w": 0.7071067811865476+ }+ }+ },+ {+ "type": "Light",+ "data": {+ "type": 3,+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "intensity": 0.6,+ "radius": 600,+ "falloff": 1,+ "innerAngle": 20,+ "outerAngle": 50+ }+ }+ ]+ }+ ]+}diff --git a/fixtures/scenes/oracle-sun-colour.esscene b/fixtures/scenes/oracle-sun-colour.esscenenew file mode 100644index 000000000..fdb18f253--- /dev/null+++ b/fixtures/scenes/oracle-sun-colour.esscene@@ -0,0 +1,152 @@+{+ "version": 4,+ "name": "oracle-sun-colour",+ "entities": [+ {+ "id": 0,+ "name": "Camera",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 400,+ "z": 0+ },+ "rotation": {+ "x": -0.7071067811865476,+ "y": 0,+ "z": 0,+ "w": 0.7071067811865476+ }+ }+ },+ {+ "type": "Camera",+ "data": {+ "projectionType": 1,+ "orthoSize": 100,+ "nearPlane": 1,+ "farPlane": 2000,+ "isActive": true,+ "priority": 0+ }+ }+ ]+ },+ {+ "id": 1,+ "name": "Ball",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 50,+ "z": 0+ },+ "scale": {+ "x": 1,+ "y": 1,+ "z": 1+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:sphere",+ "color": {+ "r": 0.8,+ "g": 0.8,+ "b": 0.8,+ "a": 1+ },+ "lit": true,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 2,+ "name": "Sun",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "rotation": {+ "w": 0.8259431073677969,+ "x": -0.2604188614360106,+ "y": -0.4768584753741134,+ "z": -0.15035289975213653+ }+ }+ },+ {+ "type": "Light",+ "data": {+ "type": 1,+ "color": {+ "r": 1,+ "g": 0.5,+ "b": 0.25,+ "a": 1+ },+ "intensity": 2+ }+ }+ ]+ },+ {+ "id": 3,+ "name": "Ambient",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ }+ }+ },+ {+ "type": "Light",+ "data": {+ "type": 2,+ "color": {+ "r": 0.4,+ "g": 0.6,+ "b": 1,+ "a": 1+ },+ "intensity": 0.2+ }+ }+ ]+ }+ ]+}diff --git a/fixtures/scenes/oracle-sun-shadow-low.esscene b/fixtures/scenes/oracle-sun-shadow-low.esscenenew file mode 100644index 000000000..7b6ada9a5--- /dev/null+++ b/fixtures/scenes/oracle-sun-shadow-low.esscene@@ -0,0 +1,235 @@+{+ "version": 4,+ "name": "oracle-sun-shadow-low",+ "entities": [+ {+ "id": 0,+ "name": "Camera",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 400,+ "z": 0+ },+ "rotation": {+ "x": -0.7071067811865476,+ "y": 0,+ "z": 0,+ "w": 0.7071067811865476+ }+ }+ },+ {+ "type": "Camera",+ "data": {+ "projectionType": 1,+ "orthoSize": 100,+ "nearPlane": 1,+ "farPlane": 2000,+ "isActive": true,+ "priority": 0+ }+ }+ ]+ },+ {+ "id": 1,+ "name": "Floor",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "scale": {+ "x": 4,+ "y": 0.1,+ "z": 4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.8,+ "g": 0.8,+ "b": 0.8,+ "a": 1+ },+ "lit": true,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 2,+ "name": "Box",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 30,+ "y": 35,+ "z": -20+ },+ "scale": {+ "x": 0.4,+ "y": 0.6,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.6,+ "g": 0.6,+ "b": 0.6,+ "a": 1+ },+ "lit": true,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 3,+ "name": "Ball",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -45,+ "y": 23,+ "z": 25+ },+ "scale": {+ "x": 0.36,+ "y": 0.36,+ "z": 0.36+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:sphere",+ "color": {+ "r": 0.6,+ "g": 0.6,+ "b": 0.6,+ "a": 1+ },+ "lit": true,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 4,+ "name": "Sun",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "rotation": {+ "w": 0.5274279012090257,+ "x": -0.10252159848486846,+ "y": -0.827895969497156,+ "z": -0.16092667448472833+ }+ }+ },+ {+ "type": "Light",+ "data": {+ "type": 1,+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "intensity": 1,+ "meshShadows": true,+ "sourceAngle": 0,+ "shadowSoftness": 0+ }+ }+ ]+ },+ {+ "id": 5,+ "name": "Ambient",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ }+ }+ },+ {+ "type": "Light",+ "data": {+ "type": 2,+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "intensity": 0.15+ }+ }+ ]+ }+ ]+}diff --git a/fixtures/scenes/oracle-sun-shadow-soft.esscene b/fixtures/scenes/oracle-sun-shadow-soft.esscenenew file mode 100644index 000000000..e9a94d38c--- /dev/null+++ b/fixtures/scenes/oracle-sun-shadow-soft.esscene@@ -0,0 +1,235 @@+{+ "version": 4,+ "name": "oracle-sun-shadow-soft",+ "entities": [+ {+ "id": 0,+ "name": "Camera",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 400,+ "z": 0+ },+ "rotation": {+ "x": -0.7071067811865476,+ "y": 0,+ "z": 0,+ "w": 0.7071067811865476+ }+ }+ },+ {+ "type": "Camera",+ "data": {+ "projectionType": 1,+ "orthoSize": 100,+ "nearPlane": 1,+ "farPlane": 2000,+ "isActive": true,+ "priority": 0+ }+ }+ ]+ },+ {+ "id": 1,+ "name": "Floor",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "scale": {+ "x": 4,+ "y": 0.1,+ "z": 4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.8,+ "g": 0.8,+ "b": 0.8,+ "a": 1+ },+ "lit": true,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 2,+ "name": "Box",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 30,+ "y": 35,+ "z": -20+ },+ "scale": {+ "x": 0.4,+ "y": 0.6,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.6,+ "g": 0.6,+ "b": 0.6,+ "a": 1+ },+ "lit": true,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 3,+ "name": "Ball",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -45,+ "y": 23,+ "z": 25+ },+ "scale": {+ "x": 0.36,+ "y": 0.36,+ "z": 0.36+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:sphere",+ "color": {+ "r": 0.6,+ "g": 0.6,+ "b": 0.6,+ "a": 1+ },+ "lit": true,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 4,+ "name": "Sun",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "rotation": {+ "w": 0.9254165783983234,+ "x": -0.33682408883346515,+ "y": 0.16317591116653482,+ "z": 0.0593911746138847+ }+ }+ },+ {+ "type": "Light",+ "data": {+ "type": 1,+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "intensity": 1,+ "meshShadows": true,+ "sourceAngle": 8,+ "shadowSoftness": 1+ }+ }+ ]+ },+ {+ "id": 5,+ "name": "Ambient",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ }+ }+ },+ {+ "type": "Light",+ "data": {+ "type": 2,+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "intensity": 0.15+ }+ }+ ]+ }+ ]+}diff --git a/fixtures/scenes/oracle-sun-shadow.esscene b/fixtures/scenes/oracle-sun-shadow.esscenenew file mode 100644index 000000000..08b4358e6--- /dev/null+++ b/fixtures/scenes/oracle-sun-shadow.esscene@@ -0,0 +1,235 @@+{+ "version": 4,+ "name": "oracle-sun-shadow",+ "entities": [+ {+ "id": 0,+ "name": "Camera",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 400,+ "z": 0+ },+ "rotation": {+ "x": -0.7071067811865476,+ "y": 0,+ "z": 0,+ "w": 0.7071067811865476+ }+ }+ },+ {+ "type": "Camera",+ "data": {+ "projectionType": 1,+ "orthoSize": 100,+ "nearPlane": 1,+ "farPlane": 2000,+ "isActive": true,+ "priority": 0+ }+ }+ ]+ },+ {+ "id": 1,+ "name": "Floor",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "scale": {+ "x": 4,+ "y": 0.1,+ "z": 4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.8,+ "g": 0.8,+ "b": 0.8,+ "a": 1+ },+ "lit": true,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 2,+ "name": "Box",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 30,+ "y": 35,+ "z": -20+ },+ "scale": {+ "x": 0.4,+ "y": 0.6,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.6,+ "g": 0.6,+ "b": 0.6,+ "a": 1+ },+ "lit": true,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 3,+ "name": "Ball",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -45,+ "y": 23,+ "z": 25+ },+ "scale": {+ "x": 0.36,+ "y": 0.36,+ "z": 0.36+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:sphere",+ "color": {+ "r": 0.6,+ "g": 0.6,+ "b": 0.6,+ "a": 1+ },+ "lit": true,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 4,+ "name": "Sun",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ },+ "rotation": {+ "w": 0.9254165783983234,+ "x": -0.33682408883346515,+ "y": 0.16317591116653482,+ "z": 0.0593911746138847+ }+ }+ },+ {+ "type": "Light",+ "data": {+ "type": 1,+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "intensity": 1,+ "meshShadows": true,+ "sourceAngle": 0,+ "shadowSoftness": 0+ }+ }+ ]+ },+ {+ "id": 5,+ "name": "Ambient",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ }+ }+ },+ {+ "type": "Light",+ "data": {+ "type": 2,+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "intensity": 0.15+ }+ }+ ]+ }+ ]+}diff --git a/fixtures/scenes/oracle-tonemap-ev-down.esscene b/fixtures/scenes/oracle-tonemap-ev-down.esscenenew file mode 100644index 000000000..423fed194--- /dev/null+++ b/fixtures/scenes/oracle-tonemap-ev-down.esscene@@ -0,0 +1,398 @@+{+ "version": 4,+ "name": "oracle-tonemap-ev-down",+ "entities": [+ {+ "id": 0,+ "name": "Camera",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 400,+ "z": 0+ },+ "rotation": {+ "x": -0.7071067811865476,+ "y": 0,+ "z": 0,+ "w": 0.7071067811865476+ }+ }+ },+ {+ "type": "Camera",+ "data": {+ "projectionType": 1,+ "orthoSize": 100,+ "nearPlane": 1,+ "farPlane": 2000,+ "isActive": true,+ "priority": 0+ }+ }+ ]+ },+ {+ "id": 1,+ "name": "Patch0",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -75,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.01,+ "g": 0.01,+ "b": 0.01,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 2,+ "name": "Patch1",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -25,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.05,+ "g": 0.05,+ "b": 0.05,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 3,+ "name": "Patch2",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 25,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.18,+ "g": 0.18,+ "b": 0.18,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 4,+ "name": "Patch3",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 75,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.5,+ "g": 0.5,+ "b": 0.5,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 5,+ "name": "Patch4",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -75,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 6,+ "name": "Patch5",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -25,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 2,+ "g": 2,+ "b": 2,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 7,+ "name": "Patch6",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 25,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 4,+ "g": 4,+ "b": 4,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 8,+ "name": "Patch7",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 75,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 8,+ "g": 8,+ "b": 8,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 9,+ "name": "Look",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ }+ }+ },+ {+ "type": "PostProcessVolume",+ "data": {+ "isGlobal": true,+ "priority": 0,+ "weight": 1,+ "effects": [+ {+ "type": "tonemap",+ "enabled": true,+ "uniforms": {+ "u_exposure": -1.5+ }+ }+ ]+ }+ }+ ]+ }+ ]+}diff --git a/fixtures/scenes/oracle-tonemap-ev-up.esscene b/fixtures/scenes/oracle-tonemap-ev-up.esscenenew file mode 100644index 000000000..f18b91631--- /dev/null+++ b/fixtures/scenes/oracle-tonemap-ev-up.esscene@@ -0,0 +1,398 @@+{+ "version": 4,+ "name": "oracle-tonemap-ev-up",+ "entities": [+ {+ "id": 0,+ "name": "Camera",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 400,+ "z": 0+ },+ "rotation": {+ "x": -0.7071067811865476,+ "y": 0,+ "z": 0,+ "w": 0.7071067811865476+ }+ }+ },+ {+ "type": "Camera",+ "data": {+ "projectionType": 1,+ "orthoSize": 100,+ "nearPlane": 1,+ "farPlane": 2000,+ "isActive": true,+ "priority": 0+ }+ }+ ]+ },+ {+ "id": 1,+ "name": "Patch0",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -75,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.01,+ "g": 0.01,+ "b": 0.01,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 2,+ "name": "Patch1",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -25,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.05,+ "g": 0.05,+ "b": 0.05,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 3,+ "name": "Patch2",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 25,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.18,+ "g": 0.18,+ "b": 0.18,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 4,+ "name": "Patch3",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 75,+ "y": 5,+ "z": -50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 0.5,+ "g": 0.5,+ "b": 0.5,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 5,+ "name": "Patch4",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -75,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 1,+ "g": 1,+ "b": 1,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 6,+ "name": "Patch5",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": -25,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 2,+ "g": 2,+ "b": 2,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 7,+ "name": "Patch6",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 25,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 4,+ "g": 4,+ "b": 4,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 8,+ "name": "Patch7",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 75,+ "y": 5,+ "z": 50+ },+ "scale": {+ "x": 0.4,+ "y": 0.1,+ "z": 0.4+ }+ }+ },+ {+ "type": "MeshRenderer",+ "data": {+ "mesh": "builtin:cube",+ "color": {+ "r": 8,+ "g": 8,+ "b": 8,+ "a": 1+ },+ "lit": false,+ "opaque": true,+ "cullBackfaces": true,+ "enabled": true+ }+ }+ ]+ },+ {+ "id": 9,+ "name": "Look",+ "parent": null,+ "children": [],+ "visible": true,+ "components": [+ {+ "type": "Transform",+ "data": {+ "position": {+ "x": 0,+ "y": 0,+ "z": 0+ }+ }+ },+ {+ "type": "PostProcessVolume",+ "data": {+ "isGlobal": true,+ "priority": 0,+ "weight": 1,+ "effects": [+ {+ "type": "tonemap",+ "enabled": true,+ "uniforms": {+ "u_exposure": 1+ }+ }+ ]+ }+ }+ ]+ }+ ]+}diff --git a/sdk/src/postprocess/sources/atmosphere.ts b/sdk/src/postprocess/sources/atmosphere.tsindex cf60e8abb..15a9553be 100644--- a/sdk/src/postprocess/sources/atmosphere.ts+++ b/sdk/src/postprocess/sources/atmosphere.ts@@ -2627,11 +2627,12 @@ void main() {float depth = texelFetch(u_sceneDepth, ivec2(gl_FragCoord.xy), 0).r;if (depth >= 1.0) { fragColor = src; return; }- // Un-projected twice, at the sample and at the near plane along the SAME ray.- // An orthographic eye has no point to measure from, and this needs none: the- // near plane is one, per pixel, and it is where fog should start anyway.+ // Un-projected twice, at the sample and at the start of the ray: the near plane of a perspective eye. An orthographic eye has no point to+ // measure from, and its depth range runs from far BEHIND the camera to far ahead of it (the projection is built with near = -far, so 2D+ // content behind the camera plane still draws): depth 0 is that far-behind plane, which put every surface past the fog's end. Mid-depth+ // is the plane the camera stands in, and the distance a person means.vec3 world = worldFromDepth(v_texCoord, depth);- vec3 entry = worldFromDepth(v_texCoord, 0.0);+ vec3 entry = worldFromDepth(v_texCoord, u_camera.w > 0.5 ? 0.0 : 0.5);float dist = length(world - entry);float t = clamp((dist - u_fogNear) / max(u_fogFar - u_fogNear, 1e-4), 0.0, 1.0);// Authored as sRGB, like every colour: a linear frame takes it as light, not as a code.@@ -2650,7 +2651,7 @@ void main() {if (depth >= 1.0) { return src; }let world = worldFromDepth(v.v_texCoord, depth);- let entry = worldFromDepth(v.v_texCoord, 0.0);+ let entry = worldFromDepth(v.v_texCoord, select(0.5, 0.0, frame.camera.w > 0.5));let dist = length(world - entry);let t = clamp((dist - mc.u_fogNear) / max(mc.u_fogFar - mc.u_fogNear, 1e-4), 0.0, 1.0);var fog = mc.u_fogColor.rgb;diff --git a/tools/check-fixture-scenes.mjs b/tools/check-fixture-scenes.mjsindex dc9f54ede..56254281f 100644--- a/tools/check-fixture-scenes.mjs+++ b/tools/check-fixture-scenes.mjs@@ -49,6 +49,12 @@ for (const f of files) {drivers.push(readFileSync(path.join(ROOT, f), 'utf8'));}+// The oracle scenes are generated from tools/oracle/ and registered by id, so no source names their file: the generator is the driver.+{+ const { ORACLE } = await import('./oracle/index.mjs');+ for (const o of ORACLE) drivers.push(`${o.id}.esscene`);+}+const scenes = readdirSync(path.join(ROOT, SCENES)).filter((f) => f.endsWith('.esscene'));const undriven = scenes.filter((s) => !drivers.some((t) => t.includes(s)));const problems = [];diff --git a/tools/check-render-scenes.mjs b/tools/check-render-scenes.mjsindex 505ad103b..9117c9de3 100644--- a/tools/check-render-scenes.mjs+++ b/tools/check-render-scenes.mjs@@ -58,6 +58,20 @@ for (const s of SCENES) {}}+// The oracle scenes are generated from tools/oracle/, next to the numbers they must draw. A hand-edited fixture, or an edit to the+// generator that was never written out, would leave a scene and its expectation describing different frames.+{+ const { ORACLE } = await import('./oracle/index.mjs');+ for (const o of ORACLE) {+ const file = path.join(FIXTURES, 'scenes', `${o.id}.esscene`);+ const want = JSON.stringify(o.doc, null, 1) + String.fromCharCode(10);+ if (!existsSync(file) || readFileSync(file, 'utf8').split(String.fromCharCode(13)).join('') !== want) {+ fail(`"${o.id}" is not what tools/oracle generates — run node tools/make-oracle-scenes.mjs`);+ }+ if (!o.expect?.length) fail(`"${o.id}" has no probes`);+ }+}+// CI has to take its list from here. Inlining scene invocations again is exactly// how the two lists came to disagree in the first place.if (existsSync(WORKFLOW)) {diff --git a/tools/make-oracle-scenes.mjs b/tools/make-oracle-scenes.mjsnew file mode 100644index 000000000..840ed19cc--- /dev/null+++ b/tools/make-oracle-scenes.mjs@@ -0,0 +1,25 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+/**+ * @file make-oracle-scenes.mjs — write the oracle scenes under fixtures/scenes/, or `--check` that they are as generated.+ *+ * The expectations live in tools/oracle/ beside the scene that earns them, so a scene and the number it must draw cannot drift.+ */+import { mkdirSync, readFileSync, writeFileSync, existsSync } from 'node:fs';+import path from 'node:path';+import { fileURLToPath } from 'node:url';+import { ORACLE } from './oracle/index.mjs';++const OUT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', 'fixtures', 'scenes');+const check = process.argv.includes('--check');+mkdirSync(OUT, { recursive: true });+let stale = 0;+for (const o of ORACLE) {+ const file = path.join(OUT, `${o.id}.esscene`);+ const text = JSON.stringify(o.doc, null, 1) + '\n';+ if (check) {+ if (!existsSync(file) || readFileSync(file, 'utf8').replace(/\r\n/g, '\n') !== text) { console.error(`stale: ${o.id}`); stale++; }+ } else writeFileSync(file, text);+}+if (check && stale) { console.error('make-oracle-scenes: run `node tools/make-oracle-scenes.mjs`'); process.exit(1); }+console.log(`make-oracle-scenes: ${ORACLE.length} scene(s) ${check ? 'up to date' : 'written'}`);diff --git a/tools/oracle/formulas.mjs b/tools/oracle/formulas.mjsnew file mode 100644index 000000000..0b09fa002--- /dev/null+++ b/tools/oracle/formulas.mjs@@ -0,0 +1,93 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+/**+ * @file formulas.mjs — the closed-form answers the oracle scenes are checked against.+ *+ * Every function here is written from the published definition (Lambert's cosine law, the IEC 61966-2-1 sRGB curve, Narkowicz's+ * ACES fit, Khronos PBR Neutral, UE4's windowed inverse-square), never read back from a frame. A number that came from the engine+ * would make the check agree with the engine by construction; these come from the maths, so a disagreement is a finding.+ */++export const clamp01 = (x) => Math.min(1, Math.max(0, x));++/** The sRGB transfer function: linear light in, the display code (0..1) out. */+export const srgbEncode = (c) => (c <= 0.0031308 ? c * 12.92 : 1.055 * Math.pow(c, 1 / 2.4) - 0.055);+export const srgbDecode = (c) => (c <= 0.04045 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4));++/** A linear 0..1 triple as the 8-bit code a linear-light frame ends as. */+export const encodeLinear8 = (rgb) => rgb.map((c) => Math.round(255 * srgbEncode(clamp01(c))));+/** A gamma-space frame is displayed as it is computed. */+export const encodeGamma8 = (rgb) => rgb.map((c) => Math.round(255 * clamp01(c)));++/** Narkowicz's ACES filmic fit (https://knarkowicz.wordpress.com/2016/01/06/), per channel. */+export const acesNarkowicz = (x) => clamp01((x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14));++/** Khronos PBR Neutral (KhronosGroup/ToneMapping), over an RGB triple. */+export function pbrNeutral(rgb) {+ const startCompression = 0.8 - 0.04, desaturation = 0.15;+ const x = Math.min(...rgb);+ const offset = x < 0.08 ? x - 6.25 * x * x : 0.04;+ let c = rgb.map((v) => v - offset);+ const peak = Math.max(...c);+ if (peak < startCompression) return c;+ const d = 1 - startCompression;+ const newPeak = 1 - (d * d) / (peak + d - startCompression);+ c = c.map((v) => v * (newPeak / peak));+ const g = 1 - 1 / (desaturation * (peak - newPeak) + 1);+ return c.map((v) => v * (1 - g) + newPeak * g);+}++export const dot = (a, b) => a[0] * b[0] + a[1] * b[1] + a[2] * b[2];+export const norm = (a) => { const l = Math.hypot(...a); return a.map((v) => v / l); };+export const sub = (a, b) => [a[0] - b[0], a[1] - b[1], a[2] - b[2]];+export const scale = (a, s) => a.map((v) => v * s);++/** Rotate a vector by a unit quaternion {x,y,z,w}. */+export function rotate(q, v) {+ const { x, y, z, w } = q;+ const t = [2 * (y * v[2] - z * v[1]), 2 * (z * v[0] - x * v[2]), 2 * (x * v[1] - y * v[0])];+ return [v[0] + w * t[0] + (y * t[2] - z * t[1]), v[1] + w * t[1] + (z * t[0] - x * t[2]), v[2] + w * t[2] + (x * t[1] - y * t[0])];+}+/** The quaternion for `deg` about a unit axis. */+export function axisAngle(axis, deg) {+ const h = (deg * Math.PI) / 360, s = Math.sin(h);+ return { x: axis[0] * s, y: axis[1] * s, z: axis[2] * s, w: Math.cos(h) };+}+export function mulQ(a, b) {+ return { w: a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z, x: a.w * b.x + a.x * b.w + a.y * b.z - a.z * b.y,+ y: a.w * b.y - a.x * b.z + a.y * b.w + a.z * b.x, z: a.w * b.z + a.x * b.y - a.y * b.x + a.z * b.w };+}++/**+ * A directional light aimed `pitch` degrees below the horizon and turned `yaw` degrees about +Y. The light shines along its+ * entity's -Z, the way a camera looks; `toLight` is the unit vector a surface takes to the light.+ */+export function sunAim(pitch, yaw) {+ const rotation = mulQ(axisAngle([0, 1, 0], yaw), axisAngle([1, 0, 0], -pitch));+ const shines = rotate(rotation, [0, 0, -1]);+ return { rotation, shines, toLight: scale(shines, -1) };+}++/** Lambert: radiance reflected by a white-lit diffuse surface of albedo `a` under irradiance `e` and cosine `ndotl`. */+export const lambert = (albedo, e, ndotl) => albedo.map((a, k) => a * e[k] * Math.max(0, ndotl));++/** The engine's linear point/spot falloff: a ramp from the light's `reach` in to its `inner` radius, raised to `falloff`. */+export function linearFalloff(dist, reach, inner = 0, falloff = 1) {+ const ramp = clamp01((reach - dist) / Math.max(reach - inner, 1e-4));+ return Math.pow(ramp, Math.max(falloff, 1e-3));+}+/**+ * An inverse-square lamp: 1/d² with d in metres (`unitsPerMetre` world units), windowed to zero at `reach` by+ * (1 - (d/reach)^4)² — the smooth window of Karis, "Real Shading in Unreal Engine 4".+ */+export function inverseSquare(dist, reach, unitsPerMetre = 100) {+ const metres = dist / unitsPerMetre, q = dist / reach;+ const w = clamp01(1 - q ** 4);+ return (w * w) / Math.max(metres * metres, 0.01);+}++/** GLSL smoothstep: 0 below edge0, 1 above edge1, 3t^2 - 2t^3 between (edge0 > edge1 reverses it, as the spot cone uses it). */+export function smoothstep(edge0, edge1, x) {+ const t = clamp01((x - edge0) / (edge1 - edge0));+ return t * t * (3 - 2 * t);+}diff --git a/tools/oracle/index.mjs b/tools/oracle/index.mjsnew file mode 100644index 000000000..c8840bf37--- /dev/null+++ b/tools/oracle/index.mjs@@ -0,0 +1,23 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+/**+ * @file index.mjs — the oracle scenes as render-registry entries, and the fixture files they load.+ */+import { SIZE } from './scene.mjs';+import { LIGHT_SCENES } from './lights.mjs';+import { SHADOW_SCENES } from './shadows.mjs';+import { POST_SCENES } from './post.mjs';++export const ORACLE = [...LIGHT_SCENES, ...SHADOW_SCENES, ...POST_SCENES];++/** The renderScenes.mjs entry for one oracle scene. */+export const oracleEntry = (o) => ({+ id: o.id, tier: 'pr', webgpu: true,+ env: {+ ESTELLA_VERIFY_SCENE: `/scenes/${o.id}.esscene`,+ ESTELLA_VERIFY_W: String(SIZE), ESTELLA_VERIFY_H: String(SIZE), ESTELLA_VERIFY_STEPS: '3',+ ...(o.colorSpace === 'linear' ? { ESTELLA_VERIFY_COLORSPACE: 'linear' } : {}),+ ...(o.outputTransform ? { ESTELLA_VERIFY_OUTPUT_TRANSFORM: o.outputTransform } : {}),+ ESTELLA_VERIFY_EXPECT: JSON.stringify(o.expect),+ },+});diff --git a/tools/oracle/lights.mjs b/tools/oracle/lights.mjsnew file mode 100644index 000000000..300593f26--- /dev/null+++ b/tools/oracle/lights.mjs@@ -0,0 +1,115 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+/**+ * @file lights.mjs — oracle scenes for lights: a sphere's brightness is a formula.+ */+import { scene, camera, mesh, sun, ambient, lamp, probe } from './scene.mjs';+import { sunAim, axisAngle, smoothstep, dot, norm, encodeLinear8, encodeGamma8, inverseSquare, linearFalloff, srgbDecode } from './formulas.mjs';++/** A light's colour is authored as sRGB: a linear-light frame decodes it, a gamma frame uses it as it is. (MeshRenderer.color is linear already.) */+const lightColour = (colorSpace, c) => (colorSpace === 'linear' ? c.map(srgbDecode) : c);++const R = 50; // the builtin sphere is 100 units across++/** The normal of a ball of radius R, centred over the origin, at the point the camera sees at world (x, z). */+function ballNormal(x, z) {+ const r2 = x * x + z * z;+ if (r2 >= R * R) return null;+ return [x / R, Math.sqrt(R * R - r2) / R, z / R];+}++const BALL_PROBES = [[0, 0], [16, 0], [-16, 0], [0, 16], [0, -16], [30, 12], [-30, -12], [12, -34], [40, 0], [-40, 0]];++/**+ * A lit ball under a sun and one ambient light. Expected = albedo * (ambient + sun * max(N.L, 0)), sampled across the whole+ * disc: a wrong cosine, a flipped light direction or a lost channel each shows on a different probe.+ */+function ballUnderSun({ id, colorSpace, pitch, yaw, albedo, sunI, sunColor, ambientI, ambientColor }) {+ const aim = sunAim(pitch, yaw);+ const doc = scene(id, () => [+ camera(),+ mesh('Ball', 'sphere', [0, R, 0], [1, 1, 1], albedo),+ sun(aim, sunI, sunColor),+ ambient(ambientI, ambientColor),+ ]);+ const encode = colorSpace === 'linear' ? encodeLinear8 : encodeGamma8;+ const expect = BALL_PROBES.map(([x, z]) => {+ const p = probe(x, z), n = ballNormal(...p.at);+ const ac = lightColour(colorSpace, ambientColor), sc = lightColour(colorSpace, sunColor);+ const e = ac.map((c, k) => c * ambientI + sc[k] * sunI * Math.max(0, dot(n, aim.toLight)));+ return { x: p.x, y: p.y, rgb: encode(albedo.map((a, k) => a * e[k])), tol: 4 };+ });+ return { id, doc, colorSpace, expect, about: 'Lambert across a ball: albedo x (ambient + sun x N.L)' };+}++/** A flat floor with one point lamp over its middle: the falloff curve, sampled out along a radius. */+function floorUnderLamp({ id, colorSpace, height, intensity, light, fall }) {+ const floorTop = 5; // the 10-unit-thick slab's top face+ const doc = scene(id, () => [+ camera(),+ mesh('Floor', 'cube', [0, 0, 0], [4, 0.1, 4], [1, 1, 1]),+ lamp([0, floorTop + height, 0], intensity, [1, 1, 1], light),+ ]);+ const encode = colorSpace === 'linear' ? encodeLinear8 : encodeGamma8;+ const expect = [[0, 0], [40, 0], [-40, 0], [0, 70], [80, 0], [60, 60]].map(([x, z]) => {+ const p = probe(x, z), [wx, wz] = p.at;+ const toLamp = [-wx, height, -wz], dist = Math.hypot(...toLamp);+ const e = intensity * fall(dist) * Math.max(0, dot(norm(toLamp), [0, 1, 0]));+ return { x: p.x, y: p.y, rgb: encode([e, e, e]), tol: 4 };+ });+ return { id, doc, colorSpace, expect, about: 'Point lamp falloff over a floor' };+}++/** A ball under an ambient light with a hemisphere: sky colour from above, ground colour from below, blended by the facing. */+function ballUnderHemisphere({ id, colorSpace, albedo, intensity, sky, ground }) {+ const doc = scene(id, () => [+ camera(),+ mesh('Ball', 'sphere', [0, R, 0], [1, 1, 1], albedo),+ ambient(intensity, sky, { hemisphere: true, groundColor: { r: ground[0], g: ground[1], b: ground[2], a: 1 } }),+ ]);+ const encode = colorSpace === 'linear' ? encodeLinear8 : encodeGamma8;+ const skyC = lightColour(colorSpace, sky), groundC = lightColour(colorSpace, ground);+ const expect = BALL_PROBES.map(([x, z]) => {+ const p = probe(x, z), n = ballNormal(...p.at), up = 0.5 + 0.5 * n[1];+ const e = skyC.map((c, k) => intensity * (c * up + groundC[k] * (1 - up)));+ return { x: p.x, y: p.y, rgb: encode(albedo.map((a, k) => a * e[k])), tol: 4 };+ });+ return { id, doc, colorSpace, expect, about: 'Hemisphere ambient: sky x (0.5 + 0.5 N.y) + ground x (0.5 - 0.5 N.y)' };+}++/**+ * A spot lamp straight over a floor. `innerAngle` and `outerAngle` are the cone's FULL angles: the light is full strength inside+ * the inner half-angle, gone outside the outer one, and smoothstep between them in the cosine of the angle off the axis.+ */+function floorUnderSpot({ id, height, intensity, inner, outer, reach }) {+ const floorTop = 5;+ const doc = scene(id, () => [+ camera(),+ mesh('Floor', 'cube', [0, 0, 0], [4, 0.1, 4], [1, 1, 1]),+ lamp([0, floorTop + height, 0], intensity, [1, 1, 1], { type: 3, radius: reach, falloff: 1, innerAngle: inner, outerAngle: outer }),+ ]);+ // The lamp's rotation belongs to its Transform: aim it down its own -Z.+ const lampEntity = doc.entities.find((e) => e.name === 'Lamp');+ lampEntity.components[0].data.rotation = axisAngle([1, 0, 0], -90);+ const cosInner = Math.cos((inner * 0.5 * Math.PI) / 180), cosOuter = Math.cos((outer * 0.5 * Math.PI) / 180);+ const expect = [0, 10, 20, 30, 40, 50, 65].map((x) => {+ const p = probe(x, 0), [wx, wz] = p.at;+ const toLamp = [-wx, height, -wz], dist = Math.hypot(...toLamp);+ const cone = smoothstep(cosOuter, cosInner, height / dist);+ const e = intensity * linearFalloff(dist, reach, 0, 1) * cone * (height / dist);+ return { x: p.x, y: p.y, rgb: encodeLinear8([e, e, e]), tol: 4 };+ });+ return { id, doc, colorSpace: 'linear', expect, about: 'Spot cone: smoothstep(cos outer/2, cos inner/2, cos off-axis)' };+}++export const LIGHT_SCENES = [+ ballUnderSun({ id: 'oracle-lambert-sun', colorSpace: 'linear', pitch: 50, yaw: 30, albedo: [0.9, 0.5, 0.2], sunI: 1.5, sunColor: [1, 1, 1], ambientI: 0.1, ambientColor: [1, 1, 1] }),+ ballUnderSun({ id: 'oracle-lambert-sun-gamma', colorSpace: 'gamma', pitch: 50, yaw: 30, albedo: [0.9, 0.5, 0.2], sunI: 1.0, sunColor: [1, 1, 1], ambientI: 0.1, ambientColor: [1, 1, 1] }),+ ballUnderSun({ id: 'oracle-sun-colour', colorSpace: 'linear', pitch: 35, yaw: -60, albedo: [0.8, 0.8, 0.8], sunI: 2, sunColor: [1, 0.5, 0.25], ambientI: 0.2, ambientColor: [0.4, 0.6, 1] }),+ floorUnderLamp({ id: 'oracle-point-linear', colorSpace: 'linear', height: 100, intensity: 1.2, light: { radius: 400, falloff: 1 }, fall: (d) => linearFalloff(d, 400, 0, 1) }),+ floorUnderLamp({ id: 'oracle-point-linear-curve', colorSpace: 'linear', height: 100, intensity: 1.2, light: { radius: 400, falloff: 2.5 }, fall: (d) => linearFalloff(d, 400, 0, 2.5) }),+ floorUnderLamp({ id: 'oracle-point-isq', colorSpace: 'linear', height: 100, intensity: 0.8, light: { radius: 800, inverseSquare: true }, fall: (d) => inverseSquare(d, 800, 100) }),+ ballUnderHemisphere({ id: 'oracle-hemisphere', colorSpace: 'linear', albedo: [0.8, 0.8, 0.8], intensity: 1.2, sky: [0.3, 0.5, 1], ground: [0.6, 0.4, 0.2] }),+ ballUnderHemisphere({ id: 'oracle-hemisphere-gamma', colorSpace: 'gamma', albedo: [0.8, 0.8, 0.8], intensity: 1.0, sky: [0.3, 0.5, 1], ground: [0.6, 0.4, 0.2] }),+ floorUnderSpot({ id: 'oracle-spot-cone', height: 100, intensity: 0.6, inner: 20, outer: 50, reach: 600 }),+];diff --git a/tools/oracle/post.mjs b/tools/oracle/post.mjsnew file mode 100644index 000000000..c7082a80f--- /dev/null+++ b/tools/oracle/post.mjs@@ -0,0 +1,82 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+/**+ * @file post.mjs — oracle scenes for the output stage: encoding, tone mapping, exposure, grade and fog.+ *+ * Eight flat unlit patches, each a known linear colour, so what reaches the screen is the chain under test and nothing else:+ * `unlit colour -> effects -> output transform -> sRGB encode`. Each expectation applies the published curve (or, for the+ * engine's own effects, the formula their shader source states) to the patch colour; no frame was read to write it.+ */+import { scene, camera, mesh, volume, probe } from './scene.mjs';+import { encodeLinear8, clamp01, acesNarkowicz, pbrNeutral, srgbDecode, scale } from './formulas.mjs';++const SLOTS = [[-75, -50], [-25, -50], [25, -50], [75, -50], [-75, 50], [-25, 50], [25, 50], [75, 50]];++/** Greys across the range a tone mapper has to handle, the top three above 1 (HDR). */+const GREYS = [0.01, 0.05, 0.18, 0.5, 1, 2, 4, 8].map((v) => [v, v, v]);+/** Saturated and mixed colours, where a per-channel curve and a luma-based grade differ. */+const COLOURS = [[0.8, 0.1, 0.05], [0.05, 0.6, 0.1], [0.05, 0.1, 0.9], [0.9, 0.7, 0.1], [0.5, 0.5, 0.5], [0.2, 0.3, 0.4], [0.02, 0.4, 0.35], [1.5, 0.6, 0.2]];++/**+ * @param tops patch heights above the floor line; the camera looks down at each patch's top face+ * @param out (linear rgb, slot index) -> linear rgb the frame should end as, before the sRGB encode+ */+function patches({ id, colours, tops, effects, outputTransform, out, tol = 3, about }) {+ const doc = scene(id, () => [+ camera(),+ ...colours.map((c, i) => {+ const top = tops?.[i] ?? 10;+ return mesh(`Patch${i}`, 'cube', [SLOTS[i][0], top / 2, SLOTS[i][1]], [0.4, top / 100, 0.4], c, { lit: false });+ }),+ ...(effects ? [volume(effects)] : []),+ ]);+ const expect = colours.map((c, i) => {+ const p = probe(...SLOTS[i]);+ return { x: p.x, y: p.y, rgb: encodeLinear8(out(c, i)), tol };+ });+ return { id, doc, colorSpace: 'linear', outputTransform, expect, about };+}++const fx = (type, uniforms, colors) => ({ type, enabled: true, uniforms, ...(colors ? { colors } : {}) });+const perChannel = (f) => (c) => c.map(f);+const lum = (c) => 0.2126 * c[0] + 0.7152 * c[1] + 0.0722 * c[2];++/** The shader's colour grade, step by step, for a linear-light frame (see PP Color Grade in postprocess/sources/basic.ts). */+function grade(c, { exposure = 0, contrast = 1, saturation = 1, temperature = 0, tint = 0 }) {+ let v = scale(c, 2 ** exposure);+ v = [v[0] * (1 + temperature * 0.2), v[1] * (1 + tint * 0.2), v[2] * (1 - temperature * 0.2)];+ v = v.map((x) => 0.18 * Math.pow(Math.max(x, 1e-6) / 0.18, contrast));+ const l = lum(v);+ v = v.map((x) => l + (x - l) * saturation);+ return v.map(clamp01);+}++// Distance fog: the distance from the eye. An orthographic camera's eye is the plane it stands in (y = 400), so the distance to a patch is+// the vertical drop to its top face. (Before the fog measured from the projection's far-behind plane it had every patch fully fogged.)+const FOG_TOPS = [5, 45, 85, 125, 165, 205, 245, 285];+const FOG = { near: 100, far: 400, intensity: 0.9, colour: [0.6, 0.7, 0.8] };+const fogMix = (c, top) => {+ const t = clamp01((400 - top - FOG.near) / (FOG.far - FOG.near)) * FOG.intensity;+ const fog = FOG.colour.map(srgbDecode);+ return c.map((x, k) => x + (fog[k] - x) * t);+};++export const POST_SCENES = [+ patches({ id: 'oracle-encode-linear', colours: GREYS, out: perChannel(clamp01), about: 'No tone map: the linear value is sRGB-encoded as it is, clamped at 1' }),+ patches({ id: 'oracle-output-aces', colours: GREYS, outputTransform: 'aces', out: perChannel(acesNarkowicz), about: 'Output transform ACES: Narkowicz fit, then the sRGB encode' }),+ patches({ id: 'oracle-output-aces-colour', colours: COLOURS, outputTransform: 'aces', out: perChannel(acesNarkowicz), about: 'ACES acts per channel: saturated colours shift hue' }),+ patches({ id: 'oracle-output-neutral', colours: GREYS, outputTransform: 'neutral', out: (c) => pbrNeutral(c).map(clamp01), about: 'Output transform Khronos PBR Neutral' }),+ patches({ id: 'oracle-output-neutral-colour', colours: COLOURS, outputTransform: 'neutral', out: (c) => pbrNeutral(c).map(clamp01), about: 'Khronos Neutral keeps hue and saturation below the knee' }),+ patches({ id: 'oracle-tonemap-ev-up', colours: GREYS, effects: [fx('tonemap', { u_exposure: 1 })], out: perChannel((v) => acesNarkowicz(v * 2)), about: 'Tonemap effect, +1 EV: ACES of 2 x colour' }),+ patches({ id: 'oracle-tonemap-ev-down', colours: GREYS, effects: [fx('tonemap', { u_exposure: -1.5 })], out: perChannel((v) => acesNarkowicz(v * 2 ** -1.5)), about: 'Tonemap effect, -1.5 EV' }),+ patches({ id: 'oracle-grade-exposure', colours: GREYS, effects: [fx('colorGrade', { u_exposure: -2 })], out: (c) => grade(c, { exposure: -2 }), about: 'Colour grade exposure: colour x 2^EV (0.25 at -2 EV)' }),+ patches({ id: 'oracle-grade-contrast', colours: COLOURS, effects: [fx('colorGrade', { u_contrast: 1.4 })], out: (c) => grade(c, { contrast: 1.4 }), about: 'Linear-light contrast: a power curve about 0.18' }),+ patches({ id: 'oracle-grade-saturation', colours: COLOURS, effects: [fx('colorGrade', { u_saturation: 0.4 })], out: (c) => grade(c, { saturation: 0.4 }), about: 'Saturation about Rec.709 luma' }),+ patches({ id: 'oracle-grade-balance', colours: COLOURS, effects: [fx('colorGrade', { u_temperature: 0.6, u_tint: -0.5 })], out: (c) => grade(c, { temperature: 0.6, tint: -0.5 }), about: 'White balance: R and B by temperature, G by tint' }),+ patches({+ id: 'oracle-distance-fog', colours: GREYS.map((g) => g.map((v) => Math.min(v, 1) * 0.8 + 0.1)), tops: FOG_TOPS, tol: 4,+ effects: [fx('distanceFog', { u_fogNear: FOG.near, u_fogFar: FOG.far, u_intensity: FOG.intensity }, { u_fogColor: { r: FOG.colour[0], g: FOG.colour[1], b: FOG.colour[2], a: 1 } })],+ out: (c, i) => fogMix(c, FOG_TOPS[i]).map(clamp01),+ about: 'Distance fog: mix(colour, fog, clamp((distance - near) / (far - near)) x intensity)',+ }),+];diff --git a/tools/oracle/scene.mjs b/tools/oracle/scene.mjsnew file mode 100644index 000000000..ddfcb1ef7--- /dev/null+++ b/tools/oracle/scene.mjs@@ -0,0 +1,65 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+/**+ * @file scene.mjs — the little vocabulary the oracle scenes are written in, and how a world point becomes a frame point.+ *+ * Every oracle scene is seen by one orthographic camera looking straight down -Y, half-height `HALF` world units, over a square+ * frame of `SIZE` pixels: image right is +X and image DOWN is +Z. A probe is named by the world point it samples, and+ * {@link probe} turns that into the frame fraction the runner reads, so an expectation is written as "what is at (x, z)" and+ * never as a pixel number.+ */++export const SIZE = 256;+export const HALF = 100;+const CAMERA_Y = 400;++/** The world XZ of a frame pixel's centre. */+const centre = (i) => ((i + 0.5) / SIZE - 0.5) * 2 * HALF;+/** The pixel whose centre is nearest `world`, and the world point that centre actually is. */+export function snap(world) {+ const i = Math.min(SIZE - 1, Math.max(0, Math.floor((world / (2 * HALF) + 0.5) * SIZE)));+ return { i, world: centre(i) };+}+/** A frame probe at the world point (x, z); `at` is where the shading is to be evaluated. */+export function probe(x, z) {+ const px = snap(x), pz = snap(z);+ return { x: px.i / (SIZE - 1), y: pz.i / (SIZE - 1), at: [px.world, pz.world] };+}++let nextId;+const entity = (name, components) => ({ id: nextId++, name, parent: null, children: [], visible: true, components });+const transform = (position, rotation, scale) => ({+ type: 'Transform',+ data: { position: { x: position[0], y: position[1], z: position[2] }, ...(rotation ? { rotation } : {}), ...(scale ? { scale: { x: scale[0], y: scale[1], z: scale[2] } } : {}) },+});+const rgba = (c) => ({ r: c[0], g: c[1], b: c[2], a: 1 });++export const camera = (extra = {}) => entity('Camera', [+ transform([0, CAMERA_Y, 0], { x: -Math.SQRT1_2, y: 0, z: 0, w: Math.SQRT1_2 }),+ { type: 'Camera', data: { projectionType: 1, orthoSize: HALF, nearPlane: 1, farPlane: 2000, isActive: true, priority: 0, ...extra } },+]);+/** A lit, opaque mesh. `scale` multiplies the 100-unit builtin. */+export const mesh = (name, builtin, position, scale, color, extra = {}) => entity(name, [+ transform(position, null, scale),+ { type: 'MeshRenderer', data: { mesh: `builtin:${builtin}`, color: rgba(color), lit: true, opaque: true, cullBackfaces: true, enabled: true, ...extra } },+]);+export const sun = (aim, intensity, color = [1, 1, 1], extra = {}) => entity('Sun', [+ transform([0, 0, 0], aim.rotation),+ { type: 'Light', data: { type: 1, color: rgba(color), intensity, ...extra } },+]);+export const ambient = (intensity, color = [1, 1, 1], extra = {}) => entity('Ambient', [+ transform([0, 0, 0]), { type: 'Light', data: { type: 2, color: rgba(color), intensity, ...extra } },+]);+export const lamp = (position, intensity, color, light) => entity('Lamp', [+ transform(position), { type: 'Light', data: { type: 0, color: rgba(color ?? [1, 1, 1]), intensity, ...light } },+]);+export const volume = (effects) => entity('Look', [+ transform([0, 0, 0]), { type: 'PostProcessVolume', data: { isGlobal: true, priority: 0, weight: 1, effects } },+]);++/** Build a scene document; ids restart per scene so a regenerated file is byte-identical. */+export function scene(name, build) {+ nextId = 0;+ const entities = build();+ return { version: 4, name, entities };+}diff --git a/tools/oracle/shadows.mjs b/tools/oracle/shadows.mjsnew file mode 100644index 000000000..716dc39a9--- /dev/null+++ b/tools/oracle/shadows.mjs@@ -0,0 +1,136 @@+// SPDX-License-Identifier: Apache-2.0+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team+/**+ * @file shadows.mjs — oracle scenes for shadows: where a shadow falls is geometry.+ *+ * A floor point is in shadow when the ray from it to the light meets a caster, and the share of a sun's disc that ray still+ * reaches is how dark a soft shadow is there. Both are ray/box and ray/sphere tests, written below from nothing but the scene's+ * own numbers. Probes are kept clear of a shadow's edge for a hard shadow (an edge is a pixel the shadow map may take either way)+ * and put across it for a soft one, where the share is the whole point.+ */+import { scene, camera, mesh, sun, ambient, lamp, probe } from './scene.mjs';+import { sunAim, dot, norm, sub, encodeLinear8, linearFalloff } from './formulas.mjs';++const FLOOR_TOP = 5; // the 10-unit slab's upper face+const ALBEDO = 0.8;+const AMBIENT = 0.15;++/** The casters: a box and a ball standing on the floor. `min`/`max` and `centre`/`radius` are world units. */+const BOX = { min: [10, FLOOR_TOP, -40], max: [50, FLOOR_TOP + 60, 0] };+const BALL = { centre: [-45, FLOOR_TOP + 18, 25], radius: 18 };+const casters = () => [+ mesh('Box', 'cube', [30, FLOOR_TOP + 30, -20], [0.4, 0.6, 0.4], [0.6, 0.6, 0.6]),+ mesh('Ball', 'sphere', BALL.centre, [0.36, 0.36, 0.36], [0.6, 0.6, 0.6]),+];++/** Does the ray from `origin` along unit `dir` (up to `maxT`) meet the box? Slab test. */+function hitsBox(origin, dir, maxT = Infinity) {+ let t0 = 0, t1 = maxT;+ for (let a = 0; a < 3; a++) {+ if (Math.abs(dir[a]) < 1e-9) { if (origin[a] < BOX.min[a] || origin[a] > BOX.max[a]) return false; continue; }+ let ta = (BOX.min[a] - origin[a]) / dir[a], tb = (BOX.max[a] - origin[a]) / dir[a];+ if (ta > tb) [ta, tb] = [tb, ta];+ t0 = Math.max(t0, ta); t1 = Math.min(t1, tb);+ if (t0 > t1) return false;+ }+ return true;+}+/** Does the ray meet the ball? */+function hitsBall(origin, dir, maxT = Infinity) {+ const oc = sub(origin, BALL.centre), b = dot(oc, dir), c = dot(oc, oc) - BALL.radius * BALL.radius;+ const disc = b * b - c;+ if (disc < 0) return false;+ const t = -b - Math.sqrt(disc);+ return t > 0 && t < maxT;+}+const blocked = (origin, dir, maxT) => hitsBox(origin, dir, maxT) || hitsBall(origin, dir, maxT);++/** A floor point's world position (the camera sees the floor's top face). */+const floorPoint = (x, z) => [x, FLOOR_TOP + 0.01, z];++/** Under a caster's footprint the camera sees the caster, not the floor: no probe there. */+function underCaster(x, z, margin = 6) {+ const inBox = x > BOX.min[0] - margin && x < BOX.max[0] + margin && z > BOX.min[2] - margin && z < BOX.max[2] + margin;+ const inBall = Math.hypot(x - BALL.centre[0], z - BALL.centre[2]) < BALL.radius + margin;+ return inBox || inBall;+}++const GRID = (() => { const g = []; for (let x = -90; x <= 90; x += 10) for (let z = -90; z <= 90; z += 10) g.push([x, z]); return g; })();++/** The share of a sun's disc (angular radius `rho`, radians) a floor point can see: 1 = fully lit. */+function sunVisibility(p, toLight, rho) {+ if (rho < 1e-6) return blocked(p, toLight) ? 0 : 1;+ // Two axes spanning the disc, then a spiral of sample directions across it.+ const up = Math.abs(toLight[1]) < 0.99 ? [0, 1, 0] : [1, 0, 0];+ const u = norm([up[1] * toLight[2] - up[2] * toLight[1], up[2] * toLight[0] - up[0] * toLight[2], up[0] * toLight[1] - up[1] * toLight[0]]);+ const v = [toLight[1] * u[2] - toLight[2] * u[1], toLight[2] * u[0] - toLight[0] * u[2], toLight[0] * u[1] - toLight[1] * u[0]];+ const N = 1500;+ let seen = 0;+ for (let i = 0; i < N; i++) {+ const r = Math.tan(rho) * Math.sqrt((i + 0.5) / N), a = i * 2.399963229728653;+ const d = norm([toLight[0] + r * (Math.cos(a) * u[0] + Math.sin(a) * v[0]), toLight[1] + r * (Math.cos(a) * u[1] + Math.sin(a) * v[1]), toLight[2] + r * (Math.cos(a) * u[2] + Math.sin(a) * v[2])]);+ if (!blocked(p, d)) seen++;+ }+ return seen / N;+}++function sunShadow({ id, pitch, yaw, intensity, sourceAngle, soft }) {+ const aim = sunAim(pitch, yaw);+ const doc = scene(id, () => [+ camera(),+ mesh('Floor', 'cube', [0, 0, 0], [4, 0.1, 4], [ALBEDO, ALBEDO, ALBEDO]),+ ...casters(),+ sun(aim, intensity, [1, 1, 1], { meshShadows: true, sourceAngle, shadowSoftness: soft ?? 0 }),+ ambient(AMBIENT),+ ]);+ const rho = (sourceAngle * Math.PI) / 360;+ const cos = aim.toLight[1];+ const level = (vis) => ALBEDO * (AMBIENT + intensity * cos * vis);+ const visAt = (x, z) => sunVisibility(floorPoint(x, z), aim.toLight, rho);+ const hard = sourceAngle < 0.1;+ const expect = [];+ for (const [gx, gz] of GRID) {+ if (underCaster(gx, gz)) continue;+ const p = probe(gx, gz), [x, z] = p.at;+ const vis = visAt(x, z);+ if (hard) {+ // Keep only points whose neighbourhood agrees: an edge pixel is the shadow map's to take either way.+ const same = [[5, 0], [-5, 0], [0, 5], [0, -5], [4, 4], [-4, -4]].every(([dx, dz]) => visAt(x + dx, z + dz) === vis);+ if (!same) continue;+ }+ expect.push({ x: p.x, y: p.y, rgb: encodeLinear8([level(vis), level(vis), level(vis)]), tol: hard ? 4 : 20, vis });+ }+ return { id, doc, colorSpace: 'linear', expect: expect.map(({ vis, ...e }) => e), shadowed: expect.filter((e) => e.vis < 0.05).length, lit: expect.filter((e) => e.vis > 0.95).length,+ about: hard ? 'Hard sun shadow: a point is dark when the ray to the sun meets the box or the ball' : `Soft sun shadow: the share of a ${sourceAngle} degree sun disc the point sees` };+}++function pointShadow({ id, position, intensity, reach }) {+ const doc = scene(id, () => [+ camera(),+ mesh('Floor', 'cube', [0, 0, 0], [4, 0.1, 4], [ALBEDO, ALBEDO, ALBEDO]),+ ...casters(),+ lamp(position, intensity, [1, 1, 1], { radius: reach, falloff: 1, meshShadows: true }),+ ambient(AMBIENT),+ ]);+ const expect = [];+ const eval1 = (x, z) => {+ const p = floorPoint(x, z), to = sub(position, p), dist = Math.hypot(...to), dir = to.map((v) => v / dist);+ const vis = blocked(p, dir, dist) ? 0 : 1;+ return { vis, level: ALBEDO * (AMBIENT + intensity * linearFalloff(dist, reach, 0, 1) * dir[1] * vis) };+ };+ for (const [gx, gz] of GRID) {+ if (underCaster(gx, gz)) continue;+ const p = probe(gx, gz), [x, z] = p.at, here = eval1(x, z);+ if (![[5, 0], [-5, 0], [0, 5], [0, -5]].every(([dx, dz]) => eval1(x + dx, z + dz).vis === here.vis)) continue;+ expect.push({ x: p.x, y: p.y, rgb: encodeLinear8([here.level, here.level, here.level]), tol: 4, vis: here.vis });+ }+ return { id, doc, colorSpace: 'linear', expect: expect.map(({ vis, ...e }) => e), shadowed: expect.filter((e) => e.vis === 0).length, lit: expect.filter((e) => e.vis === 1).length,+ about: 'Point-lamp shadow: the ray from a floor point to the lamp meets the box or the ball' };+}++export const SHADOW_SCENES = [+ sunShadow({ id: 'oracle-sun-shadow', pitch: 40, yaw: 20, intensity: 1.0, sourceAngle: 0 }),+ sunShadow({ id: 'oracle-sun-shadow-low', pitch: 22, yaw: -115, intensity: 1.0, sourceAngle: 0 }),+ sunShadow({ id: 'oracle-sun-shadow-soft', pitch: 40, yaw: 20, intensity: 1.0, sourceAngle: 8, soft: 1 }),+ pointShadow({ id: 'oracle-point-shadow', position: [-10, FLOOR_TOP + 140, 60], intensity: 1.4, reach: 500 }),+];diff --git a/tools/render-host/host.ts b/tools/render-host/host.tsindex 83a8d1195..ffa9c56c5 100644--- a/tools/render-host/host.ts+++ b/tools/render-host/host.ts@@ -43,7 +43,8 @@ const width = Number(params.get('w')) || 1280;const height = Number(params.get('h')) || 720;const backend = params.get('backend') === 'webgpu' ? 'webgpu' : 'webgl2';const colorSpace = params.get('colorSpace') === 'linear' ? 'linear' : undefined;-const outputTransform = params.get('outputTransform') === 'aces' ? 'aces' : undefined;+const requestedTransform = params.get('outputTransform');+const outputTransform = requestedTransform === 'aces' || requestedTransform === 'neutral' ? requestedTransform : undefined;const msaaSamples = Number(params.get('msaa')) || undefined;/** The opaque scene drawn twice, depth alone first: the quality levels turn it on, and this host has none. */const depthPrepass = params.get('prepass') === '1';diff --git a/tools/render-host/run.mjs b/tools/render-host/run.mjsindex 10f409089..74e7fdb82 100644--- a/tools/render-host/run.mjs+++ b/tools/render-host/run.mjs@@ -44,7 +44,7 @@* ESTELLA_VERIFY_TWINS pairs of points that must match (JSON: pairs [[x1,y1,x2,y2]], tol)* ESTELLA_VERIFY_MINIFIED how much a far-off texture shimmers pixel to pixel (JSON: box, maxRipple, minMean)* ESTELLA_VERIFY_SCALE copy the scene's content onto a grid (JSON), for a cost gate- * ESTELLA_VERIFY_OUTPUT_TRANSFORM the frame's output curve ("aces")+ * ESTELLA_VERIFY_OUTPUT_TRANSFORM the frame's output curve ("aces" or "neutral")* ESTELLA_VERIFY_MSAA multisample count the scene asks for (the app's default otherwise)* ESTELLA_VERIFY_PREPASS 1: draw the opaque scene twice, depth alone first (what a quality level does)* ESTELLA_VERIFY_TEXTURES "runtime": images upload through the engine, as a shipped game's do@@ -104,7 +104,7 @@ const BACKEND = process.env.ESTELLA_VERIFY_BACKEND === 'webgpu' ? 'webgpu' : 'weconst COLORSPACE = process.env.ESTELLA_VERIFY_COLORSPACE === 'linear' ? 'linear' : '';// ESTELLA_VERIFY_OUTPUT_TRANSFORM=aces boots the project output transform, which// is a curve on the way out and engages the capture on its own.-const OUTPUT_TRANSFORM = process.env.ESTELLA_VERIFY_OUTPUT_TRANSFORM === 'aces' ? 'aces' : '';+const OUTPUT_TRANSFORM = ['aces', 'neutral'].includes(process.env.ESTELLA_VERIFY_OUTPUT_TRANSFORM) ? process.env.ESTELLA_VERIFY_OUTPUT_TRANSFORM : '';const MSAA = process.env.ESTELLA_VERIFY_MSAA ?? '';const PREPASS = process.env.ESTELLA_VERIFY_PREPASS === '1';const TEXTURES = process.env.ESTELLA_VERIFY_TEXTURES === 'runtime' ? 'runtime' : '';diff --git a/tools/renderScenes.mjs b/tools/renderScenes.mjsindex 7315d875d..053493dd0 100644--- a/tools/renderScenes.mjs+++ b/tools/renderScenes.mjs@@ -20,6 +20,8 @@*//** Cheapest tier a scene runs at; tiers are cumulative. */+import { ORACLE, oracleEntry } from './oracle/index.mjs';+export const TIERS = ['pr', 'nightly'];/** Electron's own bundled SwiftShader is the adapter a GPU-less runner gets, and@@ -1119,6 +1121,8 @@ export const SCENES = [{ id: "device-roundtrip-editor-3d", tier: "pr", host: "editor", env: { ESTELLA_VERIFY_DEVICE_LOSS: "roundtrip", ESTELLA_VERIFY_LOSS_ROUNDS: "2", ESTELLA_VERIFY_SCENE: "/scenes/mesh-lit.esscene", ESTELLA_VERIFY_MANIFEST: "/scenes/mesh-lit.textures.json", ESTELLA_VERIFY_W: "256", ESTELLA_VERIFY_H: "256", ESTELLA_VERIFY_STEPS: "3" } },{ id: "device-roundtrip-editor-grid", tier: "pr", host: "editor", env: { ESTELLA_VERIFY_DEVICE_LOSS: "roundtrip", ESTELLA_VERIFY_LOSS_ROUNDS: "2", ESTELLA_VERIFY_LOSS_GRID: "64", ESTELLA_VERIFY_SCENE: "/scenes/sprite-rendering.esscene", ESTELLA_VERIFY_MANIFEST: "/scenes/sprite-rendering.textures.json", ESTELLA_VERIFY_W: "256", ESTELLA_VERIFY_H: "256", ESTELLA_VERIFY_STEPS: "3" } },{ id: "device-roundtrip-post", tier: "pr", webgpu: true, env: { ESTELLA_VERIFY_DEVICE_LOSS: "roundtrip", ESTELLA_VERIFY_LOSS_ROUNDS: "2", ESTELLA_VERIFY_PLAY: "1", ESTELLA_VERIFY_SCENE: "/scenes/ui-screen-post.esscene", ESTELLA_VERIFY_MANIFEST: "/scenes/ui-screen-post.textures.json", ESTELLA_VERIFY_W: "640", ESTELLA_VERIFY_H: "360", ESTELLA_VERIFY_STEPS: "4" } },+ // Closed-form oracles (tools/oracle): the number each scene must draw comes from the maths, not from a frame.+ ...ORACLE.map(oracleEntry),];/**