Skip to content

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

fix(render): a fixed shadow map stays on what casts, and gtao takes a strand for a strand

yhh8cde4dca6c87
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3787acd49..318cb893e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,6 +22,8 @@ published separately; it ships inside the editor.
- **Glyphs can be put on the atlas before they are shown.** The first page of a novel is hundreds of new characters, all landing in one frame. `preloadGlyphs(app, label, text, { budgetMs })` makes them ahead of time, a slice a frame, drawn as that `Text` will draw them, and returns `progress`, `done` and `release()`. On a Snapdragon 8 Elite a book's 2992 characters at 28 px took 145 ms over 25 frames with the worst frame at 9.5 ms, after which the first page's frame went from 49 to 11 ms and no page made a new glyph. Preloaded glyphs hold their atlas pages (4 MB each, a few hundred characters at that size) until `release()`.
- **Voxel GI lights what the camera does not see, and bounces light more than once.** The cache now reads the sun's shadow map back into the world, so a surface the sun lights behind or beside the camera still sends light into the view. Each surface also gives off again the bounce light it received, so a corner or a floor in shade gets light that took two or more bounces to reach it. A ray now brings what it meets at full strength however far it went (it used to fade with distance, 40% at 4 m with 12 cm voxels). Each voxel is weighed by how much of it a surface covers, so a bright patch no longer lights like the whole voxel around it. Together these keep the result close to a path tracer's whatever the voxel size. In a sunlit test room the whole frame carries 0.95 of Cycles' light at the default size and 0.74 at 12 cm voxels; before, it was 0.54 at the default and darker the finer the grid. With the lit patch behind the camera, the walls went from no bounce light to 25–57%. A closed room the sun only lights from outside stays dark. Two inspector controls tune it: **Off-screen Sun Albedo** (the colour the shadow map cannot give, assumed) and **Multi-bounce**. A fine grid no longer drops every voxel: a count truncated by the cache's ageing had kept them below the two samples a ray asks for. The WebGL2 fallback does the same in its own passes: each voxel asks the sun's map whether a sunlit surface stands in it, and traces two rays through last frame's grid for the light it is given. In the test room it carries 1.00 of Cycles' light at the default size (it was 0.56) and 0.80 at 12 cm; with the lit patch behind the camera 0.20 (it was 0). Its voxel pass costs about 1.3 ms more at 720p on a desktop.
+- **A fixed shadow map stays on what casts, and ambient occlusion leaves hair alone.** A sun's `shadowExtent` was centred on every mesh, so a far backdrop with `castShadows: false` took the map away from the character in front of it and her shadows disappeared; it is centred on what casts now, and the docs, which said the camera, say so. `gtao` took a strand in front of a surface for a wall and turned what was behind it black: a horizon now falls back when what lies beyond is lower, and a pixel-wide strand no longer has a normal guessed from depth. On a test head the black went from 1.17% of lit pixels to 0.07%, and shade round a solid block stays.
+
- **An AI can read a shape off a picture and model it.** `reference_view` takes a `ruler`, a numbered grid of where the picture falls in the world through a camera, so a nose or a fold can be read off as coordinates. An `organic` part can be an `outline`, a closed drawing stood up as a rounded solid, so a traced profile is the silhouette. `sculpt` works a surface stroke by stroke: `press` along a line for a fold or a seam, `inflate`, `move`, `smooth`, and with `from` a stroke or a `stain` line is given in the two axes of a view and lands on what that view sees.
- **`reference_compare` with a `region` shows the same part of both pictures.** Through a camera it drew the game at the shape of the part, so the cut took another place from another picture. `field_sweep` did the same.
diff --git a/desktop b/desktop
index 6424ca765..fa1d8c6fe 160000
--- a/desktop
+++ b/desktop
@@ -1 +1 @@
-Subproject commit 6424ca7657534201c33397596050f56885ba412b
+Subproject commit fa1d8c6fe288e7b76038efb7b021bf98214b4ea1
diff --git a/docs/astro/src/content/docs/graphics/lighting.mdx b/docs/astro/src/content/docs/graphics/lighting.mdx
index ae8b1f878..8437da9ee 100644
--- a/docs/astro/src/content/docs/graphics/lighting.mdx
+++ b/docs/astro/src/content/docs/graphics/lighting.mdx
@@ -58,7 +58,7 @@ const addSun = defineSystem([Commands()], (cmds) => {
| `layerMin` / `layerMax` | `-128` / `127` | The sprite layers a Point / Spot / Directional light reaches (see [Which layers a light reaches](#which-layers-a-light-reaches)). |
| `sourceAngle` | `0.53` | Directional only: the angular diameter of the source in degrees (the sun is 0.53); `0` = hard edge. |
| `meshShadows` | `false` | Cast a shadow map over 3D meshes (Directional, Spot, Point). |
-| `shadowExtent` | `0` | Directional only: radius the mesh shadow map covers, centred on the camera; `0` fits the view. |
+| `shadowExtent` | `0` | Directional only: radius the mesh shadow map covers, centred on the meshes that cast shadows and not moving with the camera; `0` fits the view. |
| `followEnvironmentSun` | `false` | Directional only: take direction and strength from the environment's sun, and light the sky without it. |
| `aimFollowedSun` | `false` | With `followEnvironmentSun`: aim by this light's `Transform` instead of the panorama's sun. |
| `hemisphere` | `false` | Ambient only: light from above in `color`, from below in `groundColor`, blended by which way a surface faces. |
@@ -353,8 +353,9 @@ cmds.spawn()
- One light per frame casts a map — the first that asks for one.
- Only `MeshRenderer` geometry the GPU holds casts and receives. Sprites are lit by the same
light but shadow through `ShadowCaster2D`, which is the 2D answer.
-- Coverage follows the camera. `shadowExtent` fixes it to a radius instead, trading
- sharpness for reach.
+- Coverage follows the camera. `shadowExtent` fixes it instead, to one map of that radius
+ over the meshes that cast shadows, trading sharpness for reach. Give a far backdrop
+ `castShadows: false` and it does not pull the map away from what stands in front of it.
<Aside type="caution">
A shadow map is a second pass over the scene's meshes. It costs a draw call per
diff --git a/docs/astro/src/content/docs/zh-cn/graphics/lighting.mdx b/docs/astro/src/content/docs/zh-cn/graphics/lighting.mdx
index d4e470cbf..17fb259c6 100644
--- a/docs/astro/src/content/docs/zh-cn/graphics/lighting.mdx
+++ b/docs/astro/src/content/docs/zh-cn/graphics/lighting.mdx
@@ -56,7 +56,7 @@ const addSun = defineSystem([Commands()], (cmds) => {
| `layerMin` / `layerMax` | `-128` / `127` | Point / Spot / Directional 灯能照到的精灵层范围(见[灯照到哪些层](#灯照到哪些层))。 |
| `sourceAngle` | `0.53` | 仅 Directional:光源的角直径,度(太阳是 0.53);`0` = 硬边。 |
| `meshShadows` | `false` | 在 3D mesh 上投射阴影图(Directional、Spot、Point)。 |
-| `shadowExtent` | `0` | 仅 Directional:mesh 阴影图覆盖的半径,以相机为中心;`0` 表示贴合视野。 |
+| `shadowExtent` | `0` | 仅 Directional:mesh 阴影图覆盖的半径,以投射阴影的网格为中心,不随相机移动;`0` 表示贴合视野。 |
| `followEnvironmentSun` | `false` | 仅 Directional:方向和强度取自环境里的太阳,天空光则不再带太阳。 |
| `aimFollowedSun` | `false` | 配合 `followEnvironmentSun`:按这盏灯自己的 `Transform` 定向,而不是全景图里的太阳。 |
| `hemisphere` | `false` | 仅 Ambient:上方来的光用 `color`,下方来的光用 `groundColor`,按表面朝向混合。 |
@@ -326,7 +326,7 @@ cmds.spawn()
- 每帧只有一盏灯投出这张图 —— 第一盏要求它的。
- 只有 GPU 持有的 `MeshRenderer` 几何参与投射与接收。精灵被同一盏灯照亮,但它们的阴影走
`ShadowCaster2D`,那才是 2D 的答案。
-- 覆盖范围跟着相机走。`shadowExtent` 把它固定成一个半径,用锐度换范围。
+- 覆盖范围跟着相机走。`shadowExtent` 把它固定成一张该半径的图,覆盖投射阴影的网格,用锐度换范围。给远处的背景设 `castShadows: false`,它就不会把这张图从前景拉走。
<Aside type="caution">
阴影贴图是对场景 mesh 的第二遍绘制,每个投射者一次 draw call。没有灯要求它时它根本不跑,
diff --git a/fixtures/scenes/mesh-shadow-far-backdrop.esscene b/fixtures/scenes/mesh-shadow-far-backdrop.esscene
new file mode 100644
index 000000000..f6a6154fa
--- /dev/null
+++ b/fixtures/scenes/mesh-shadow-far-backdrop.esscene
@@ -0,0 +1,192 @@
+{
+ "version": 4,
+ "name": "MeshShadowFarBackdrop",
+ "entities": [
+ {
+ "id": 0,
+ "name": "Camera",
+ "parent": null,
+ "children": [],
+ "visible": true,
+ "components": [
+ {
+ "type": "Transform",
+ "data": {
+ "position": {
+ "x": 0,
+ "y": 0,
+ "z": 500
+ }
+ }
+ },
+ {
+ "type": "Camera",
+ "data": {
+ "projectionType": 0,
+ "fov": 45,
+ "nearPlane": 10,
+ "farPlane": 4000,
+ "isActive": true,
+ "priority": 0
+ }
+ }
+ ]
+ },
+ {
+ "id": 1,
+ "name": "Ground",
+ "parent": null,
+ "children": [],
+ "visible": true,
+ "components": [
+ {
+ "type": "Transform",
+ "data": {
+ "position": {
+ "x": 0,
+ "y": 0,
+ "z": 250
+ },
+ "scale": {
+ "x": 600,
+ "y": 600,
+ "z": 1
+ }
+ }
+ },
+ {
+ "type": "MeshRenderer",
+ "data": {
+ "mesh": "/scenes/shadow-quad.esmesh",
+ "color": {
+ "r": 1,
+ "g": 1,
+ "b": 1,
+ "a": 1
+ },
+ "lit": true,
+ "opaque": true,
+ "enabled": true
+ }
+ }
+ ]
+ },
+ {
+ "id": 2,
+ "name": "Caster",
+ "parent": null,
+ "children": [],
+ "visible": true,
+ "components": [
+ {
+ "type": "Transform",
+ "data": {
+ "position": {
+ "x": 0,
+ "y": 60,
+ "z": 900
+ },
+ "scale": {
+ "x": 60,
+ "y": 60,
+ "z": 1
+ }
+ }
+ },
+ {
+ "type": "MeshRenderer",
+ "data": {
+ "mesh": "/scenes/shadow-quad.esmesh",
+ "color": {
+ "r": 1,
+ "g": 1,
+ "b": 1,
+ "a": 1
+ },
+ "lit": true,
+ "opaque": true,
+ "enabled": true
+ }
+ }
+ ]
+ },
+ {
+ "id": 3,
+ "name": "Sun",
+ "parent": null,
+ "children": [],
+ "visible": true,
+ "components": [
+ {
+ "type": "Transform",
+ "data": {
+ "position": {
+ "x": 0,
+ "y": 0,
+ "z": 0
+ }
+ }
+ },
+ {
+ "type": "Light",
+ "data": {
+ "type": 1,
+ "color": {
+ "r": 1,
+ "g": 1,
+ "b": 1,
+ "a": 1
+ },
+ "intensity": 1,
+ "direction": {
+ "x": 0.05,
+ "y": 0
+ },
+ "meshShadows": true,
+ "shadowExtent": 400
+ }
+ }
+ ]
+ },
+ {
+ "id": 4,
+ "name": "Backdrop",
+ "parent": null,
+ "children": [],
+ "visible": true,
+ "components": [
+ {
+ "type": "Transform",
+ "data": {
+ "position": {
+ "x": 6000,
+ "y": 0,
+ "z": 250
+ },
+ "scale": {
+ "x": 600,
+ "y": 600,
+ "z": 1
+ }
+ }
+ },
+ {
+ "type": "MeshRenderer",
+ "data": {
+ "mesh": "/scenes/shadow-quad.esmesh",
+ "color": {
+ "r": 1,
+ "g": 1,
+ "b": 1,
+ "a": 1
+ },
+ "lit": true,
+ "opaque": true,
+ "enabled": true,
+ "castShadows": false
+ }
+ }
+ ]
+ }
+ ]
+}
diff --git a/sdk/src/postprocess/gtao.ts b/sdk/src/postprocess/gtao.ts
index b41097973..ac3148371 100644
--- a/sdk/src/postprocess/gtao.ts
+++ b/sdk/src/postprocess/gtao.ts
@@ -37,6 +37,8 @@ const int SLICES = 3;
const int STEPS = 6;
const float PI = 3.14159265359;
const float HALF_PI = 1.57079632679;
+// How far a horizon falls back, at full thickness, each time what lies beyond the thing that raised it is lower again. A wall goes on standing and keeps it; a strand does not.
+const float FALL_BACK = 0.6;
float fastAcos(float x) { return acos(clamp(x, -1.0, 1.0)); }
@@ -58,6 +60,11 @@ void main() {
vec3 N = normalize(cross(ax, ay));
vec3 V = viewDirection(P);
if (dot(N, V) < 0.0) N = -N;
+ // A strand a pixel wide: both neighbours on an axis lie the same way off it, far off. Depth cannot say which way such a thing faces, so it faces the eye.
+ float texelW = max(length(worldFromDepth(cuv + vec2(1.0 / float(size.x), 0.0), d) - P), 1e-6);
+ float lx = dot(worldAt(c + ivec2(-1, 0), size) - P, V), rx = dot(worldAt(c + ivec2(1, 0), size) - P, V);
+ float ly = dot(worldAt(c + ivec2(0, -1), size) - P, V), ry = dot(worldAt(c + ivec2(0, 1), size) - P, V);
+ if ((lx * rx > 0.0 && min(abs(lx), abs(rx)) > texelW * 3.0) || (ly * ry > 0.0 && min(abs(ly), abs(ry)) > texelW * 3.0)) N = V;
// What a texel step is in the world along each screen axis: the frame the slices are laid in.
vec3 right = normalize(worldFromDepth(cuv + vec2(1.0 / float(size.x), 0.0), d) - P);
@@ -103,14 +110,14 @@ void main() {
// Past the radius a sample is another surface: faded, not cut, or the term pops as geometry crosses it.
float weight = clamp(2.0 * (1.0 - len / u_radius), 0.0, 1.0);
float shc = dot(delta, V) / max(len, 1e-5);
- hCos0 = max(hCos0, mix(lowCos0, shc, weight));
+ hCos0 = shc < hCos0 && weight > 0.0 ? mix(hCos0, lowCos0, FALL_BACK * u_thickness) : max(hCos0, mix(lowCos0, shc, weight));
}
if (z1 < 1.0) {
vec3 delta = worldAt(s1, size) - P;
float len = length(delta);
float weight = clamp(2.0 * (1.0 - len / u_radius), 0.0, 1.0);
float shc = dot(delta, V) / max(len, 1e-5);
- hCos1 = max(hCos1, mix(lowCos1, shc, weight));
+ hCos1 = shc < hCos1 && weight > 0.0 ? mix(hCos1, lowCos1, FALL_BACK * u_thickness) : max(hCos1, mix(lowCos1, shc, weight));
}
}
// Thin occluders: a horizon that has just climbed a wall does not climb forever, so it falls back a little.
@@ -138,6 +145,7 @@ const SLICES : i32 = 3;
const STEPS : i32 = 6;
const PI : f32 = 3.14159265359;
const HALF_PI : f32 = 1.57079632679;
+const FALL_BACK : f32 = 0.6;
fn fastAcos(x : f32) -> f32 { return acos(clamp(x, -1.0, 1.0)); }
@@ -160,6 +168,12 @@ fn fastAcos(x : f32) -> f32 { return acos(clamp(x, -1.0, 1.0)); }
var N = normalize(cross(ax, ay));
let V = viewDirection(P);
if (dot(N, V) < 0.0) { N = -N; }
+ let texelW = max(length(worldFromDepth(cuv + vec2f(1.0 / f32(size.x), 0.0), d) - P), 1e-6);
+ let lx = dot(worldAt(c + vec2i(-1, 0), size) - P, V);
+ let rx = dot(worldAt(c + vec2i(1, 0), size) - P, V);
+ let ly = dot(worldAt(c + vec2i(0, -1), size) - P, V);
+ let ry = dot(worldAt(c + vec2i(0, 1), size) - P, V);
+ if ((lx * rx > 0.0 && min(abs(lx), abs(rx)) > texelW * 3.0) || (ly * ry > 0.0 && min(abs(ly), abs(ry)) > texelW * 3.0)) { N = V; }
let right = normalize(worldFromDepth(cuv + vec2f(1.0 / f32(size.x), 0.0), d) - P);
let up = normalize(worldFromDepth(cuv + vec2f(0.0, 1.0 / f32(size.y)), d) - P);
@@ -201,14 +215,14 @@ fn fastAcos(x : f32) -> f32 { return acos(clamp(x, -1.0, 1.0)); }
let len = length(delta);
let weight = clamp(2.0 * (1.0 - len / mc.u_radius), 0.0, 1.0);
let shc = dot(delta, V) / max(len, 1e-5);
- hCos0 = max(hCos0, mix(lowCos0, shc, weight));
+ if (shc < hCos0 && weight > 0.0) { hCos0 = mix(hCos0, lowCos0, FALL_BACK * mc.u_thickness); } else { hCos0 = max(hCos0, mix(lowCos0, shc, weight)); }
}
if (z1 < 1.0) {
let delta = worldAt(p1, size) - P;
let len = length(delta);
let weight = clamp(2.0 * (1.0 - len / mc.u_radius), 0.0, 1.0);
let shc = dot(delta, V) / max(len, 1e-5);
- hCos1 = max(hCos1, mix(lowCos1, shc, weight));
+ if (shc < hCos1 && weight > 0.0) { hCos1 = mix(hCos1, lowCos1, FALL_BACK * mc.u_thickness); } else { hCos1 = max(hCos1, mix(lowCos1, shc, weight)); }
}
}
hCos0 = mix(hCos0, lowCos0, mc.u_thickness * 0.35);
diff --git a/src/esengine/ecs/components/Light.hpp b/src/esengine/ecs/components/Light.hpp
index 7753b2846..b704df713 100644
--- a/src/esengine/ecs/components/Light.hpp
+++ b/src/esengine/ecs/components/Light.hpp
@@ -167,8 +167,9 @@ struct Light {
tooltip="Cast a shadow map over 3D meshes (Directional, Spot, Point).")
bool meshShadows{false};
- /** @brief Half-extent of the shadow map's world coverage, centred on the camera.
- * 0 = fit what the camera can see. Larger trades sharpness for reach. */
+ /** @brief Half-extent of the shadow map's world coverage: one map of this radius, centred
+ * on the middle of the meshes that cast shadows, and not moving with the camera.
+ * 0 = cascades fitted to what the camera can see. Larger trades sharpness for reach. */
ES_PROPERTY(min=0, advanced, shown_when=type:Directional,
tooltip="Shadow map coverage radius; 0 = fit the view.")
f32 shadowExtent{0.0f};
diff --git a/src/esengine/renderer/frame/RenderFrame.cpp b/src/esengine/renderer/frame/RenderFrame.cpp
index 60afdfa96..7687922a3 100644
--- a/src/esengine/renderer/frame/RenderFrame.cpp
+++ b/src/esengine/renderer/frame/RenderFrame.cpp
@@ -1930,15 +1930,15 @@ bool RenderFrame::collectEnvironment(const ecs::Light& light, const glm::vec3& s
return true;
}
-/// The world box every GPU-resident mesh occupies, or false when none does — what a
-/// shadow map covers, and what a face is tested against before it gathers. Each mesh
-/// contributes the box MeshPlugin culls it by, so a frustum missing this misses all.
-bool RenderFrame::meshWorldBounds(ecs::Registry& registry, glm::vec3& outMin, glm::vec3& outMax) {
+/// The world box every GPU-resident mesh occupies, or false when none does: what a shadow map
+/// covers, and what a face is tested against before it gathers. MeshPlugin culls by the same
+/// boxes, so a frustum missing this misses all. @p castersOnly leaves out what casts nothing.
+bool RenderFrame::meshWorldBounds(ecs::Registry& registry, glm::vec3& outMin, glm::vec3& outMax, bool castersOnly) {
auto meshes = registry.activeView<ecs::Transform, ecs::MeshRenderer>();
bool any = false;
for (auto entity : meshes) {
const auto& mesh = meshes.get<ecs::MeshRenderer>(entity);
- if (!mesh.enabled || !mesh.mesh.isValid()) continue;
+ if (!mesh.enabled || !mesh.mesh.isValid() || (castersOnly && !mesh.castShadows)) continue;
const Mesh* resident = resource_manager_.getMesh(mesh.mesh);
if (!resident) continue;
auto& transform = meshes.get<ecs::Transform>(entity);
@@ -2093,6 +2093,10 @@ void RenderFrame::buildShadowPlan(ecs::Registry& registry) {
frustumCorners(invVP, corners);
glm::vec3 boundsMin(0.0f), boundsMax(0.0f);
const bool haveBounds = meshWorldBounds(registry, boundsMin, boundsMax);
+ // A map of a fixed size goes where the shadows come from. Centred on everything, a backdrop far behind a character takes it away from her: a large
+ // receiver says nothing of where a shadow can start.
+ glm::vec3 castersMin(0.0f), castersMax(0.0f);
+ const bool haveCasters = meshWorldBounds(registry, castersMin, castersMax, true);
// Hair is layers of cards a few millimetres apart, which a cascade spread over the view cannot tell apart: its texel is as wide as the gap.
// So a perspective sun with cascades of its own also gets one fitted to the hair alone, first in its list (the nearest tile covering a
// fragment wins), and everything that falls inside it, the face under a fringe included, is shadowed at that resolution.
@@ -2221,8 +2225,9 @@ void RenderFrame::buildShadowPlan(ecs::Registry& registry) {
: 0.5f * glm::length(glm::vec2(view.right - view.left,
view.top - view.bottom));
radius = caster.extent > 0.0f ? caster.extent : std::max(fitted, 1.0f);
- centre = haveBounds ? (boundsMin + boundsMax) * 0.5f
- : glm::vec3(view.center.x, view.center.y, 0.0f);
+ centre = caster.extent > 0.0f && haveCasters ? (castersMin + castersMax) * 0.5f
+ : haveBounds ? (boundsMin + boundsMax) * 0.5f
+ : glm::vec3(view.center.x, view.center.y, 0.0f);
} else if (hasFocus && c == 0) {
// The hair, as a sphere a little wider than its box so the face under it is inside, its radius stepped by quarter octaves
// so the texel does not change every frame, and the centre snapped to the map's grid so the edges do not crawl.
diff --git a/src/esengine/renderer/frame/RenderFrame.hpp b/src/esengine/renderer/frame/RenderFrame.hpp
index 78336c451..28f87a43b 100644
--- a/src/esengine/renderer/frame/RenderFrame.hpp
+++ b/src/esengine/renderer/frame/RenderFrame.hpp
@@ -872,7 +872,7 @@ private:
/// The world box the resident meshes occupy — what a shadow map must cover.
/// False when nothing 3D is in the scene.
- bool meshWorldBounds(ecs::Registry& registry, glm::vec3& outMin, glm::vec3& outMax);
+ bool meshWorldBounds(ecs::Registry& registry, glm::vec3& outMin, glm::vec3& outMax, bool castersOnly = false);
/// The box the meshes drawn with a hair-shadow material occupy (MaterialStore::hairShadowDensity above zero), or false when there are none:
/// what the sun's focus cascade is fitted to.
bool hairWorldBounds(ecs::Registry& registry, glm::vec3& outMin, glm::vec3& outMax);
diff --git a/tools/releaseNotes.mjs b/tools/releaseNotes.mjs
index 75431119b..753e09078 100644
--- a/tools/releaseNotes.mjs
+++ b/tools/releaseNotes.mjs
@@ -3884,6 +3884,10 @@ export const NOTED = {
{"note":"A material's normal and metal-rough maps are read as data in the editor's Play."},
"fix(minigame): no mini-game module needs BigInt64Array, so WeChat DevTools boots the game":
{"note":"A WeChat mini-game opens in WeChat DevTools."},
+ "fix(render): a fixed shadow map stays on what casts, and gtao takes a strand for a strand":
+ {"note":"A fixed shadow map stays on what casts, and ambient occlusion leaves hair alone."},
+ "test(mcp): gtao keeps hair from going black and still shades round a solid block":
+ {"note":"A fixed shadow map stays on what casts, and ambient occlusion leaves hair alone."},
"feat(modeling): a drawing stands up as a solid, sculpt works a surface by stroke, and a view takes coordinates off a picture":
{"note":"An AI can read a shape off a picture and model it."},
"feat(mcp): reference_view numbers a grid on a picture, and a close-up shows the same part of both":
diff --git a/tools/renderScenes.mjs b/tools/renderScenes.mjs
index b6e5adcf9..793a6fc6d 100644
--- a/tools/renderScenes.mjs
+++ b/tools/renderScenes.mjs
@@ -235,6 +235,7 @@ export const SCENES = [
// The caster behind the camera still shades the floor in front of it (the sun-shadow cull keeps what reaches the view); one far off to the side, whose shadow falls outside it, is left out of the map.
{ id: "mesh-shadow-cull", tier: "pr", webgpu: true, env: { ESTELLA_VERIFY_SCENE: "/scenes/mesh-shadow-cull.esscene", ESTELLA_VERIFY_W: "256", ESTELLA_VERIFY_H: "256", ESTELLA_VERIFY_STEPS: "2", ESTELLA_VERIFY_COUNTERS: "{\"render.shadow.castersCulled\": 1}", ESTELLA_VERIFY_EXPECT: "[{\"x\":0.7,\"y\":0.21,\"rgb\":[0,0,0],\"tol\":20},{\"x\":0.48,\"y\":0.21,\"rgb\":[255,255,255],\"tol\":20},{\"x\":0.7,\"y\":0.6,\"rgb\":[255,255,255],\"tol\":20}]" } },
// A sun whose map spans 16000 units has texels of 31: a 60-unit caster is two of them wide, and the blocker search's sparse wide disc used to step over it, so it cast nothing.
+ { id: "mesh-shadow-far-backdrop", tier: "pr", webgpu: true, env: { ESTELLA_VERIFY_SCENE: "/scenes/mesh-shadow-far-backdrop.esscene", ESTELLA_VERIFY_W: "256", ESTELLA_VERIFY_H: "256", ESTELLA_VERIFY_STEPS: "2", ESTELLA_VERIFY_EXPECT: "[{\"x\":0.656,\"y\":0.22,\"rgb\":[0,0,0],\"tol\":30},{\"x\":0.2,\"y\":0.5,\"rgb\":[255,255,255],\"tol\":20}]" } },
{ id: "mesh-shadow-small", tier: "pr", webgpu: true, env: { ESTELLA_VERIFY_SCENE: "/scenes/mesh-shadow-small.esscene", ESTELLA_VERIFY_W: "256", ESTELLA_VERIFY_H: "256", ESTELLA_VERIFY_STEPS: "2", ESTELLA_VERIFY_EXPECT: "[{\"x\":0.656,\"y\":0.22,\"rgb\":[0,0,0],\"tol\":30},{\"x\":0.2,\"y\":0.5,\"rgb\":[255,255,255],\"tol\":20}]" } },
{ id: "mesh-shadow-caster-behind", tier: "pr", webgpu: true, env: { ESTELLA_VERIFY_SCENE: "/scenes/mesh-shadow-caster-behind.esscene", ESTELLA_VERIFY_W: "256", ESTELLA_VERIFY_H: "256", ESTELLA_VERIFY_STEPS: "2", ESTELLA_VERIFY_EXPECT: "[{\"x\":0.7,\"y\":0.21,\"rgb\":[0,0,0],\"tol\":20},{\"x\":0.48,\"y\":0.21,\"rgb\":[255,255,255],\"tol\":20},{\"x\":0.7,\"y\":0.6,\"rgb\":[255,255,255],\"tol\":20}]" } },
// A CONE casting, through the tile and the pass a cascade uses. The shadow is offset