3D engine that AI agents drive
Merge main
Nguyen Xuan An05da268500a4
diff --cc CHANGELOG.mdindex 6da2c34c,e3bf709a..ed62c93d--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -2,8 -2,8 +2,10 @@@## Unreleased+- 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`.+ - Add the suite task `render-pick` and measure branches on it (part of issue #67, which stays open). A gallery with a pillar and a spotlight offered at three places; the `litPainting` check traces rays from the exported light to 15 painting points against the pillar, so it grades the pick and not the method. 10 runs (Haiku 3 and Sonnet 2, branches on and off) all passed, none called `branch`, and calls did not drop (Haiku 4 to 6 on, 4 to 5 off; Sonnet 3 either way). With `best-of-three` that is 22 runs on two tasks with no measured gain from branches. `npm run smoke:agent-branches` passes on SwiftShader. Bench only; core did not change.- Add the `weighted_normal` and `smooth_by_angle` modifiers as edits and stack nodes (part of issue #42). `smooth_by_angle` marks edges over an angle sharp and the rest smooth, overriding the geometry `smoothAngle`; `weighted_normal` stores an area-weighted normal per corner that the render extraction uses as is. The edge attribute `smooth` is new.- Add the `lattice`, `curve`, `hook` and `wave` modifiers as edits and stack nodes (part of issue #42). `lattice` moves up to 64 control points of a grid over the mesh bounds, `curve` bends a mesh along a Catmull-Rom path, `hook` pulls the vertices near a point and `wave` is a travelling ripple that matches Blender 5.2 at the same frame on two cases. Lists are bounded and the errors name the limit.- Add the `screw`, `wireframe` and `skin` modifiers as edits and stack nodes (part of issue #42). `screw` revolves the edges of a mesh about an axis with steps, iterations and lift, and `wireframe` leaves a rim on every face with thickness, offset and even offset; both match Blender 5.2 on counts, area and positions (`wireframe` on three cases, `screw` on two). `skin` is a simple version, a closed square tube per edge with a radius per vertex and no branch solver. Sizes are bounded and the errors say what to lower. Details are in `scene_capabilities` `meshModifiers`, and the modifier entry of the mesh tool schemas is now one free record that the backend validates, so the schemas no longer grow with each modifier.