Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

Merge main

Nguyen Xuan An216e0c4cff35
diff --cc CHANGELOG.md
index 2ed99900,96e484d4..e3bf709a
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@@ -2,7 -2,7 +2,8 @@@
## Unreleased
+- 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.