3D engine that AI agents drive
Rescore the reference suite after merging main
Nguyen Xuan An1790ebebcef4
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex ed62c93d..aed9b215 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -2,6 +2,8 @@## Unreleased+- Let a key shadow block the sun fully. It kept 18 percent of the sun, so a sealed hall was evenly lit and every shadow was too light. **This darkens shadows in existing scenes that have no fill light.** Against Cycles, `temple-hall` goes from 0.5841 to 0.2126 (EEVEE 0.2341), `mountain-valley` from 0.3658 to 0.3473 and `long-street` from 0.1555 to 0.1407; `fog` (+0.0031) and `megacity-dusk` (+0.0044) get worse.+- Compare reference scenes under one sun, and add `mountain-valley`, `temple-hall` and `megacity-dusk`. The HDRI holds its own sun (6 pixels with 48.1 percent of its light), so Cycles and EEVEE drew two shadows of each object where 67js drew one. Both sides now cap the sky at radiance 16, and the mean of the 16 older scenes against Cycles goes from 0.2001 to 0.1751, then to 0.1732 with the shadow change. `khronos.json` and `path-tracer.json` still use the sky with two suns.- Add reflection probes and a `metal-room` reference scene (part of issue #55, which stays open). `bake.probes` ('room' or up to 4 `{ position, radius? }`) traces the room around a point once, prefilters it through `createEnvironmentResources` and lets nearby parts reflect it (specular only, no parallax, not in GLB). A recipe with `bake` places a `'room'` probe unless `bake.probes` is `false`: against Cycles a probe lowered the score in every baked room (`lit-interior` 0.1444 to 0.1213, `brick-room` 0.1515 to 0.1266, `metal-room` 0.1754 to 0.1537) and in the unbaked rooms (0.02 to 0.06), while a hand placed probe in an open scene scores worse. The bake report now keeps the placed probes under `probes` (the resolved setting used to hide it). The reference harness `--scene` option says it does not rescore, and `frame-time.mjs` prints medians of three rounds. The earlier note that a probe changed nothing on a baked room was wrong. Core growth is 48 bytes gzip (`lit-box`). `npm run reference -- --probes` and `frame-time.mjs` take the new variant.- Cut the SwiftShader frame by compiling out what a frame does not use (part of issue #74, which stays open). Measured split of `instanced-objects`: the lit shader is about 190 ms of 380, the post pass 65, the MSAA resolve 35, the environment background 25 to 30. SwiftShader runs both sides of a choice such as `environmentEnabled ? a : b` and pays for code behind a uniform that is off, so the main program now takes `ENVIRONMENT_ENABLED`, `USES_SHEEN` and `USES_CLEARCOAT` from the parts and the environment map (features `environmentMap`, `studioLighting`, `sheen`, `clearcoat`); the post program is built per set of steps in use (`createPostFragment`: transparent, occlusion, bloom, volume, explosion, finish) and a new variant is built in the background while the full program keeps drawing; the main vertex program takes `USES_SKIN`, `USES_MORPH`, `USES_WIND`, `USES_WAVES` and `USES_EXPLOSION` (`createVertexShader`); and the colour clear is skipped when the environment background covers the frame. No picture changes: all 8 benchmark scenes are pixel for pixel identical. Alternated medians of 3, before to after: `large-mesh` 1139 to 887 ms, `many-materials` 983 to 880 ms, `instanced-objects` 384 to 268 ms. See `bench/runtime/PROFILE.md`.diff --git a/bench/reference/README.md b/bench/reference/README.mdindex b90e5531..2ff584ed 100644--- a/bench/reference/README.md+++ b/bench/reference/README.md@@ -1,6 +1,6 @@# Reference renders-This suite scores how close a 67js render is to Blender on 19 fixed scenes. Later work uses these scores as its starting point.+This suite scores how close a 67js render is to Blender on 20 fixed scenes. Later work uses these scores as its starting point.## Run itdiff --git a/bench/reference/baseline.json b/bench/reference/baseline.jsonindex b562f4fd..abca9d72 100644--- a/bench/reference/baseline.json+++ b/bench/reference/baseline.json@@ -2,81 +2,9 @@"metric": "FLIP (LDR), mean error, lower is better","blenderVersion": "5.2.2 LTS","seconds": {- "brick-flat": {- "cycles": 10.8,- "eevee": 1.6- },- "brick-graph": {- "cycles": 8.9,- "eevee": 0.4- },- "brick-room": {- "cycles": 19.6,- "eevee": 0.6- },- "brushed-film": {- "cycles": 9.9,- "eevee": 0.7- },- "car-paint": {- "cycles": 14.3,- "eevee": 0.5- },- "character": {- "cycles": 7.7,- "eevee": 0.4- },- "fog": {- "cycles": 58.3,- "eevee": 1.4- },- "foliage": {- "cycles": 16.9,- "eevee": 0.6- },- "glass": {- "cycles": 18.9,- "eevee": 0.5- },- "light-linking": {- "cycles": 6.9,- "eevee": 0.6- },- "lit-interior": {- "cycles": 33.5,- "eevee": 0.6- },- "long-street": {- "cycles": 10.1,- "eevee": 0.4- },- "material-spheres": {- "cycles": 21.5,- "eevee": 0.4- },- "megacity-dusk": {- "cycles": 22.1,- "eevee": 1.5- },- "metal": {- "cycles": 21.0,- "eevee": 1.8- },- "mountain-valley": {- "cycles": 30.5,- "eevee": 11.8- },- "outdoor-hdri": {- "cycles": 12.3,- "eevee": 0.5- },- "spot-area": {- "cycles": 8.7,- "eevee": 0.6- },- "temple-hall": {- "cycles": 57.7,- "eevee": 1.1+ "metal-room": {+ "cycles": 164.9,+ "eevee": 41.9}},"graphics": {@@ -204,6 +132,14 @@"eevee-vs-cycles": 0.0916,"gpu-vs-cpu": 0.0067},+ "metal-room": {+ "gpu-vs-cycles": 0.5128,+ "gpu-vs-eevee": 0.108,+ "cpu-vs-cycles": 0.5124,+ "cpu-vs-eevee": 0.1086,+ "eevee-vs-cycles": 0.5262,+ "gpu-vs-cpu": 0.0061+ },"mountain-valley": {"gpu-vs-cycles": 0.3473,"gpu-vs-eevee": 0.242,diff --git a/bench/reference/images/metal-room.jpg b/bench/reference/images/metal-room.jpgindex ede47cf8..06a8d1fc 100644Binary files a/bench/reference/images/metal-room.jpg and b/bench/reference/images/metal-room.jpg differ