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.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
test(render): the WebGPU frames were read by a colour-managed instrument
esenginef1130141ac6b
diff --git a/desktop/scripts/headless-verify.mjs b/desktop/scripts/headless-verify.mjsindex 4baaf9bf2..fd33e64f8 100644--- a/desktop/scripts/headless-verify.mjs+++ b/desktop/scripts/headless-verify.mjs@@ -279,6 +279,9 @@ app.whenReady().then(async () => {// page origin at its backing size, so the page pixels ARE the frame.// Converted to the RGBA bottom-up order of ViewportCapture so both// backends share the assertion math below.+ // NOT the same instrument as GL's: this composite is colour managed, so a+ // page painted rgb(0,255,0) reads back as rgb(58,254,32) and every colour+ // assertion carries that shift. Geometry is what it can answer.const grabWebGPU = async () => {const image = await win.webContents.capturePage({ x: 0, y: 0, width: W, height: H });const bmp = image.toBitmap(); // BGRA, top-downdiff --git a/tools/renderScenes.mjs b/tools/renderScenes.mjsindex 1cbee5e82..6bb36bcb2 100644--- a/tools/renderScenes.mjs+++ b/tools/renderScenes.mjs@@ -23,13 +23,14 @@export const TIERS = ['pr', 'nightly'];/**- * What the second backend is worth, measured rather than assumed. CI cannot- * answer it (Dawn gets no adapter on a runner); the scenes declaring `webgpu`- * are what a machine with a GPU settles by `--backend webgpu`. The gap that- * answer reports is the renderer's, not the runner's.+ * Why the second backend's answer cannot be trusted yet: the two are read by+ * different instruments. GL reports the engine's buffer; WebGPU has no web+ * readback, so the runner captures the composited page — a colour-managed path+ * that reads a painted rgb(0,255,0) as rgb(58,254,32).*/-export const WEBGPU_GAP = 'no CI adapter, and on a real GPU 1 of the 10 passes: '- + 'a systematic colour shift (pure green reads 58,254,32), and editor-grid and bloom-ldr draw nothing';+export const WEBGPU_GAP = 'no CI adapter; and where one exists the frames are read by capturePage, '+ + 'which colour-manages them (rgb(0,255,0) captures as rgb(58,254,32)) — the backend needs an '+ + 'engine-side readback before these ten mean anything';/*** Every pixel gate. `env` is handed to desktop/scripts/headless-verify.mjs