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(ci): the changelog names the performance work and the notes name the commits that landed it

yhh4fb12da716b0
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5b36731e5..6af36c6ab 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -48,6 +48,10 @@ published separately; it ships inside the editor.
### Changed
+- **UI text costs less: labels are laid out when they change and submitted by the engine.** A `Text` label is laid out in the script only when its text, font or box changes and hands the engine its glyph quads once; the engine clips and submits them every frame. 600 static labels cost 2.7 ms a frame and now cost 1.1 ms, with the same draws and triangles. **UI text costs a third less again** because the engine itself watches the world scale an automatic label picks its bitmap or signed-distance glyph pipeline from.
+- **Tilemaps that have not changed cost almost nothing per frame.** A layer that stands still draws from strips of tiles the GPU already holds, one chunk row wide, in the order the old merged draw used, so nothing is uploaded or copied per frame: a far view of 47 thousand tiles went from 5.8 ms to 0.5 ms of CPU. A layer that is faded, tinted, rotated or carried keeps the per-frame path until it has stood still for a while.
+- **Fewer GL calls when a draw changes buffer.** Each combination of vertex layout and buffers has its own vertex array object, so a draw that moves between a tilemap's strips or a mesh's buffers no longer re-points its vertex attributes.
+- **A frame of sprites is not sorted again when its draw keys have not changed.** The 2D sprite sort is skipped when the keys are the previous frame's, and the order is the same.
- **The temporal anti-aliasing pass samples its history with a Catmull-Rom fit instead of one bilinear fetch.** A fetch at a fractional offset blurs a little, and every frame resamples the frame before it, so the blur accumulates: the softness of the pass and the smear of a moving camera. The detail the pass keeps in water goes from 44% to 64% of what 4x multisampling gives, and leaves stop being softer than it. Five taps, 0.18 ms of a 1080p frame.
- **A draw that changes buffer no longer re-points its vertex attributes.** The WebGL2 device kept one vertex array object per vertex layout, so every draw from a different buffer (each strip of a tilemap, each mesh sharing a layout) rebound the buffer and set its five attributes again: 15 GL calls a draw that a vertex array object exists to save. It now keeps one per layout and the buffers it reads, and deletes them with the buffer. The 47,000-tile view goes from 651 GL calls a frame to 190 and the 3,300-tile view from 188 to 73, with the same picture; the 3D example is unchanged (about 2,000 calls, a few more vertex array switches).
- **A tilemap that has not changed uploads nothing and copies no vertex.** Every frame the layer copied the vertices of each visible chunk into a list, placed them, copied them again into the frame's buffer and uploaded all of it: 47,000 visible tiles were 6 MB a frame and 5.8 ms of CPU. The layer now keeps its geometry on the GPU in strips (a row of up to 32 chunks, in world space) and a frame in which no chunk changed submits them as they are. 47,000 tiles go from 5.8 ms to 0.5 ms; a 3,300-tile view from 0.59 ms to 0.40 ms. The picture is the same: the strips are submitted slot by slot and row by row, the order the merged draw laid tiles out in, which matters where tiles overlap, and the near and far views are pixel-identical to before (the far one within the run-to-run noise of its animated tiles). A strip is made again only when a chunk in it changes, the layer is placed somewhere else, or the device was lost; a layer faded, tinted or carried along is placed anew every frame, and a strip is every chunk of a row, so such a layer (and one with parallax) keeps the old per-frame path until it has stood still for thirty frames. What the strips hold is bounded (96 MB, the ones not drawn lately go first). The cost is more, smaller draws: 8 for the near view and 32 for the far one, and about four times the triangles in the near view, which the GPU clips.
diff --git a/tools/releaseNotes.mjs b/tools/releaseNotes.mjs
index 53d487b44..a11676f1e 100644
--- a/tools/releaseNotes.mjs
+++ b/tools/releaseNotes.mjs
@@ -3090,8 +3090,10 @@ export const NOTED = {
{"note":"Fewer GL calls when a draw changes buffer"},
"fix(render): the sky's clouds are worked out at half size again":
{"internal":"Undoes the quarter-size clouds, which showed a coarse checkerboard in the cloud and streaks near the horizon."},
- "feat(render): a quality level can smooth edges temporally":
+ "feat(render): a quality level can smooth edges temporally, and the temporal pass keeps more detail":
{"note":"A quality level can smooth edges temporally."},
- "perf(render): the temporal anti-aliasing pass samples its history with a Catmull-Rom fit":
- {"note":"Temporal anti-aliasing keeps more detail"},
+ "feat(render): the medium quality level smooths edges temporally by default":
+ {"note":"The medium level uses it"},
+ "fix(ci): the net modules build no TextEncoder at load, the API snapshots take the new surface, the retained-text harness reads its cases under node":
+ {"internal":"Repairs the build: a module made a TextEncoder when the SDK loaded, which a native host does not have, and the API snapshots and one C++ harness's data path were out of date."},
};