diff --git a/README.md b/README.md index b16c124..bcbb27f 100644 --- a/README.md +++ b/README.md @@ -992,12 +992,14 @@ Conventions worth knowing before changing code: There are no server integration tests; the API is exercised through the UI. -`npm run check:render` covers the one thing the unit suite cannot: real GPU upload -orientation. It encodes a two-tone 16-bit sidecar with the server's own encoder, serves -it beside the matching JPEG proxy and measures the rows that reach a WebGL2 texture in -headless Chrome. If the sidecar ever lands upside down against the proxy again, it fails -with the measured row values. It needs Chrome (`CHROME_PATH` overrides discovery) and -skips with a notice when none is installed. +`npm run check:render` covers the one thing the unit suite cannot: what a shader does to +real GPU pixels. It encodes a 16-bit sidecar with the server's own encoder, serves it +beside the matching JPEG proxy and measures the rows that reach a WebGL2 texture in +headless Chrome. Then it renders that image through the real `Renderer` with the Ctrl +clipping preview on, so the overlay has to paint red for one clipped channel and yellow +for two instead of collapsing to white. It fails on either regression, printing the +measured values, needs Chrome (`CHROME_PATH` overrides discovery) and skips with a notice +when none is installed. --- diff --git a/scripts/render-check.mjs b/scripts/render-check.mjs index e3d46de..be66101 100644 --- a/scripts/render-check.mjs +++ b/scripts/render-check.mjs @@ -58,14 +58,18 @@ function spawnSyncOk(bin) { }); } -/** Three horizontal bands, so any vertical reversal changes every row band. */ +/** + * Three horizontal bands. The first clips only red, the second clips red and + * green (the yellow warning) and the third clips nothing, so the same image + * also proves the clipping overlay still names the channels. + */ function buildSource() { const rgb16 = new Uint16Array(W * H * 3); const rgb8 = new Uint8Array(W * H * 3); const bands = [ - [0.86, 0.22, 0.16], - [0.24, 0.70, 0.28], - [0.16, 0.26, 0.88], + [1.0, 0.55, 0.08], + [1.0, 1.0, 0.08], + [0.24, 0.28, 0.35], ]; for (let y = 0; y < H; y++) { const band = bands[Math.min(bands.length - 1, Math.floor((y / H) * bands.length))]; @@ -85,6 +89,8 @@ const PAGE_HTML = `
boot