3D engine that AI agents drive
Document the brick graph excess of #50 as a limit at the bevel edges (#416)
Nguyen Xuan Ana746018d6303
diff --git a/bench/reference/README.md b/bench/reference/README.mdindex a6b01525..f018ab64 100644--- a/bench/reference/README.md+++ b/bench/reference/README.md@@ -1768,3 +1768,16 @@ The fill lights are zero in this scene, so that term cannot carry anything. Read- Environment specular is the only term that improved when cut like Cycles does: a reflection that points below the geometric plane should see no sky. `skyReflection *= step(0.0, dot(reflected, geometricNormal))` (guarded by `USES_NORMAL_MAP`, next to the squared share) takes `brick-graph` from 0.0734 to 0.0721 and the excess over the flat wall from 0.0178 to 0.0165, still above EEVEE's 0.0120. The gain is the steepest bump edges: at column 392 the pixels on the lit side of a joint (normal.y 0.87 to 1.0) are 0.03 to 0.05 too bright and the ones on the dark side (normal.y -0.35 to -0.72) 0.06 to 0.12 too dark, one to three pixels wide, which is a footprint difference (Cycles averages the bump over the pixel) that no lobe change reaches.- Not kept. The line costs 16 bytes of `scene:lit-box` (49957 to 49973) and 22 of `scene:agent-scene` (102827 to 102849), against 8 allowed there; merging it with the squared share into one `if` block did not change that (+16 and +22), the `smoothstep` form costs 5 bytes more, and removing trailing zeros from the shader's literals made the gzip larger (+48 / +34). The change is ready to take when a budget allows it: one line of GLSL, no other scene has a normal map in the suite, so no other reference scene could move. The full suite was not run because nothing changed.- Where the rest of the 0.0165 is, in order: the sun's tilt response (above), the one-to-three pixel footprint at steep joints, and the environment diffuse of up ledges. The sun's response is what a next worker should isolate with a per-pixel comparison against a Cycles Diffuse-only bake.+++## The excess of the brick graph wall is a limit at the bevel edges (2026-11-04, closes issue #50)++The box of #50 asks for the excess of `brick-graph` over `brick-flat` in 67js to be no larger than EEVEE's, against Cycles. On main it is 0.0178 (0.0734 and 0.0556) against EEVEE's 0.0120 (0.1249 and 0.1129). It is documented here as a limit, not closed.++What was measured:++- The excess is shape, not brightness. Over the wall rectangle the graph wall scores 0.1177 and the flat wall 0.0592; the pixels within 2 of a Cycles edge (half of the wall) carry 0.168 against 0.059 on the flat wall, the interior 0.068 against 0.059. The mean luminance residual on the edges is -0.0015. Across a joint's dark side 67js stays 0.02 to 0.03 lighter in the tail (row 168, columns 426 to 429) and on the lit shoulder 0.03 to 0.04 lighter, so 67js leaves a bevel more softly than Cycles. Cycles reads the height function at the pixel; 67js reads a 512 texel normal map through bilinear filtering.+- Lighting terms, tried in turn (PR #414 and the rounds above): the squared horizon share (kept), exponents 1.75 to 3, the sun with the geometric normal or a blend, the environment diffuse and specular about the geometric normal, a sky reflection cut below the geometric plane (0.0734 to 0.0721, excess 0.0165, +29 bytes gzip on `scene:agent-scene` which sits over its goal, so it was not merged), the filtered normal length (0.0744), and a Gaussian blur of the 67js frame standing in for Cycles' film filter (no gain). None reaches 0.0120.+- Data only, this round (no engine byte changes): a 768 texel graph is not a valid resolution (256, 512 or 1024 only); 1024 is over the work limit of 30,000,000 (52 work units per pixel with 2 noise octaves, about 28 allowed), so a finer bake needs a smaller graph or a faster evaluator. Wider bevels in the scene graph (Blender gets the same graph and was rendered again): joint widths 0.10 to 0.36 and 0.06 to 0.26 gave `brick-graph` 0.0708 and `brick-flat` 0.0544 (excess 0.0164, EEVEE 0.0134 on the new renders), and 0.08 to 0.5 and 0.04 to 0.4 gave 0.0738 and 0.0529 (excess 0.0209, EEVEE 0.0166). The gap to EEVEE stays at 0.003 to 0.006 whichever bevel is used, and EEVEE's own excess moves with it, so changing the scene only moves the target. The scene was left as it is.++What would close it is a finer height-to-normal source than a 512 texel map (an analytic or 1024 texel bake of a graph that fits the work limit), which is engine work and costs memory or bytes; it is outside the data-only brief and the size goals. `brick-graph` is 0.0734 against Cycles, 0.1249 for EEVEE against Cycles on the same scene, so 67js is closer to Cycles than EEVEE is on this wall.