@plasius/gpu-lighting 0.2.2 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +90 -3
  2. package/README.md +75 -0
  3. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -8,6 +8,20 @@ The format is based on **[Keep a Changelog](https://keepachangelog.com/en/1.1.0/
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ - **Added**
12
+ - (placeholder)
13
+
14
+ - **Changed**
15
+ - (placeholder)
16
+
17
+ - **Fixed**
18
+ - (placeholder)
19
+
20
+ - **Security**
21
+ - (placeholder)
22
+
23
+ ## [0.2.4] - 2026-06-14
24
+
11
25
  - **Added**
12
26
  - (placeholder)
13
27
 
@@ -29,14 +43,86 @@ The format is based on **[Keep a Changelog](https://keepachangelog.com/en/1.1.0/
29
43
  - Added `sunlitBaseline` to environment lighting presets and wavefront
30
44
  lighting options so renderers can apply a time-of-day daylight floor at
31
45
  terminal path collisions without raising ambient residual colour.
32
- - (placeholder)
46
+ - Added an Eames screenshot capture runbook and browser-runtime helpers so
47
+ validation scripts can attach to an existing WebGPU-capable Chrome over CDP
48
+ instead of only launching a fresh Playwright Chromium profile.
49
+ - Added generic glTF material forwarding in the Eames validation loader so
50
+ authored specular, sheen, clearcoat, transmission, emissive, and IOR values
51
+ can flow into the shared wavefront renderer without model-name overrides.
52
+ - Added Eames validation HUD/result diagnostics for GPU worker-job throughput
53
+ so validation runs can report compute-dispatch jobs per frame, per second,
54
+ and per command submission.
55
+ - Added adaptive Eames validation frame budgeting so motion-oriented runs can
56
+ request a `frameTimeBudgetMs` and inspect delivered `rendered/target spp`
57
+ in the HUD and result payload.
58
+ - Added `@plasius/gpu-performance`-governed adaptive SPP control to the Eames
59
+ validation harness so frame-budgeted runs degrade and recover through a
60
+ shared quality-ladder contract instead of a demo-local policy alone.
33
61
 
34
62
  - **Changed**
35
63
  - Reduced ambient residual strength for the grass-field, forest, warehouse,
36
64
  and cavern environment preset families to avoid low-sample whitewash.
65
+ - Eames validation capture scripts now pin deterministic render settings by
66
+ default and write canvas-only PNG artifacts plus comparable black-pixel and
67
+ luminance metrics under `output/playwright/eames-environments/`.
68
+ - Eames validation page and capture entry points now accept up to `256 spp`,
69
+ and the validation boot timeout now scales with requested render workload
70
+ instead of failing at a fixed 60-second watchdog.
71
+ - `gpu-lighting` local typecheck coverage now includes the Eames validation
72
+ page, loader, and capture helpers instead of checking only the legacy demo
73
+ entry points.
74
+ - Eames validation mesh loading now preserves authored UVs and decoded
75
+ base-colour, metallic-roughness, normal, and occlusion maps so the shared
76
+ wavefront renderer can evaluate materially richer leather, wood, and chrome
77
+ surfaces.
78
+ - Eames validation meshes now forward decoded emissive maps as well so the
79
+ shared wavefront renderer can keep all material texture evaluation in the
80
+ GPU render path.
81
+ - Eames validation mesh building now preserves authored material values
82
+ generically instead of deriving chrome, leather, and wood behaviour from
83
+ material names.
84
+ - Eames validation page can now freeze its own canvas and POST the PNG back
85
+ to a local bridge endpoint, which provides a browser-driven screenshot
86
+ fallback when Playwright cannot own the Chromium process directly.
87
+ - Eames validation capture and reverse-pass debug entry points now share one
88
+ server-selection helper so port reuse, static serving, and bridge-ready
89
+ startup rules stay aligned across local runs and CI.
37
90
 
38
91
  - **Fixed**
39
- - (placeholder)
92
+ - Eames Playwright validation pages and capture scripts now surface import,
93
+ WebGPU bootstrap, and renderer startup diagnostics instead of hanging on the
94
+ initial HUD when a browser cannot complete setup.
95
+ - Eames validation renders now collect optional output-probe figures after the
96
+ frame render completes instead of coupling probe readback to the heavy
97
+ high-SPP render submission itself.
98
+ - Eames capture helpers now resolve browser profile and temporary output paths
99
+ through the host OS temp directory instead of assuming macOS-only
100
+ `/private/tmp`, which fixes Linux CI validation.
101
+ - Eames validation query parsing now preserves documented fallback defaults
102
+ when numeric URL params are omitted, which keeps standard captures out of
103
+ accidental reverse-pass debug mode.
104
+ - Eames validation motion renders now preserve the built-in adaptive
105
+ `frameTimeBudgetMs` default when the query parameter is omitted, so the
106
+ shared `@plasius/gpu-performance` quality ladder still engages on the
107
+ standard animated validation route.
108
+ - Animated source-marker captures now reuse the injected product-studio scene
109
+ helper during per-frame rebuilds instead of throwing when motion is enabled.
110
+ - Eames capture waits now scale with requested resolution, frame count, depth,
111
+ and SPP so higher-workload validation runs are not aborted at a stale fixed
112
+ timeout.
113
+ - Eames glTF validation materials now honor `KHR_texture_transform` offsets,
114
+ scales, and rotation by baking transformed texture maps during decode so
115
+ chair screenshots reflect the authored leather and wood layouts.
116
+ - The capture bridge now rejects non-loopback browser origins and confines
117
+ capture writes to `output/playwright/eames-environments/`, which closes the
118
+ browser-driven workspace overwrite path on the local upload endpoint.
119
+ - The Eames glTF loader now honors interleaved `bufferView.byteStride` values,
120
+ which keeps positions, normals, and UVs correct for legal strided assets.
121
+ - The capture bridge now serves static assets without a pre-stat/read race,
122
+ and browser-driven capture uploads are restricted to loopback bridge URLs.
123
+ - The standalone repo now ships the Eames demo asset set referenced by the
124
+ validation page so fresh checkouts can render the chair without external
125
+ workspace-only files.
40
126
 
41
127
  - **Security**
42
128
  - (placeholder)
@@ -375,6 +461,7 @@ The format is based on **[Keep a Changelog](https://keepachangelog.com/en/1.1.0/
375
461
  [0.1.16]: https://github.com/Plasius-LTD/gpu-lighting/releases/tag/v0.1.16
376
462
  [0.1.17]: https://github.com/Plasius-LTD/gpu-lighting/releases/tag/v0.1.17
377
463
  [0.1.19]: https://github.com/Plasius-LTD/gpu-lighting/releases/tag/v0.1.19
378
- [Unreleased]: https://github.com/Plasius-LTD/gpu-lighting/compare/v0.2.2...HEAD
464
+ [Unreleased]: https://github.com/Plasius-LTD/gpu-lighting/compare/v0.2.4...HEAD
379
465
  [0.2.0]: https://github.com/Plasius-LTD/gpu-lighting/releases/tag/v0.2.0
380
466
  [0.2.2]: https://github.com/Plasius-LTD/gpu-lighting/releases/tag/v0.2.2
467
+ [0.2.4]: https://github.com/Plasius-LTD/gpu-lighting/releases/tag/v0.2.4
package/README.md CHANGED
@@ -42,6 +42,81 @@ For browser-only serving, the demo resolves `@plasius/gpu-shared` through an
42
42
  import map so the page stays on the published package surface rather than a
43
43
  package-private source path.
44
44
 
45
+ ## Screenshot Capture
46
+
47
+ The repo also carries the Eames-chair environment validation harness under
48
+ `demo/eames-environments/` plus tracked Playwright helpers under
49
+ `scripts/eames-environments/`. The referenced chair asset is tracked under
50
+ `data/models/eames-lounge-chair-ottoman/` so fresh repo checkouts can run the
51
+ validation page without depending on a parent monorepo checkout. Build
52
+ `gpu-performance`, `gpu-renderer`, and `gpu-lighting` first, then run:
53
+
54
+ ```bash
55
+ node scripts/eames-environments/capture.mjs
56
+ ```
57
+
58
+ For reverse-pass black-pixel diagnostics, run:
59
+
60
+ ```bash
61
+ node scripts/eames-environments/path-debug-capture.mjs
62
+ ```
63
+
64
+ If fresh Playwright Chromium bootstrap is unstable on macOS, start a
65
+ WebGPU-capable Chrome separately with remote debugging enabled and set
66
+ `PLASIUS_CAPTURE_CDP_URL=http://127.0.0.1:<port>` before running the capture
67
+ script. The validation page now reports bootstrap step, detail, and WebGPU
68
+ availability through `window.__plasiusCaptureState` and
69
+ `window.__plasiusCaptureError` so capture failures stop at a named phase rather
70
+ than hanging on the initial HUD.
71
+
72
+ For browser-controlled fallbacks, start
73
+ `node scripts/eames-environments/capture-bridge-server.mjs <port>` and open the
74
+ validation page with `captureBitmap=1` plus
75
+ `captureUploadPath=output/playwright/eames-environments/<name>.png`. If the page
76
+ is being served by a plain static server such as `python -m http.server`, also
77
+ pass
78
+ `captureUploadUrl=http://127.0.0.1:<port>/__plasius-capture`. The page will
79
+ freeze its own canvas and POST the PNG back to the bridge server once the
80
+ render completes. The browser-side upload helper now rejects non-loopback
81
+ capture endpoints so this fallback cannot be redirected at arbitrary remote
82
+ origins.
83
+
84
+ The main capture and reverse-pass debug capture entry points now share the same
85
+ server-selection helper, so local reuse, fresh static-server startup, and
86
+ bridge fallback all follow the same port and readiness rules across macOS and
87
+ Linux.
88
+
89
+ The capture scripts now pin deterministic validation settings unless explicitly
90
+ overridden:
91
+
92
+ - `PLASIUS_CAPTURE_MAX_DEPTH=8`
93
+ - `PLASIUS_CAPTURE_SPP=1`
94
+ - `PLASIUS_CAPTURE_FRAMES=1`
95
+ - `PLASIUS_CAPTURE_DENOISE=1`
96
+ - `PLASIUS_CAPTURE_MOTION=0`
97
+ - `PLASIUS_CAPTURE_FRAME_INDEX=777`
98
+ - `PLASIUS_CAPTURE_PROBE=1`
99
+
100
+ They save canvas-only PNGs plus per-capture JSON under
101
+ `output/playwright/eames-environments/`, including exact-black, near-black, and
102
+ average-luminance metrics so screenshot comparisons stay apples-to-apples. The
103
+ validation page now decouples optional probe readback from the heavy render
104
+ submission itself, which keeps higher-SPP screenshot validation more stable.
105
+ For motion or realtime validation, the page also accepts `frameTimeBudgetMs`
106
+ and will render at least one full-screen sample before adaptively spending the
107
+ rest of the per-frame budget on additional SPP passes. The HUD reports
108
+ `rendered/target spp` whenever the budgeted frame lands below the configured
109
+ ceiling. When `gpu-performance/dist/index.js` is available, the Eames harness
110
+ also routes that target through a `@plasius/gpu-performance` quality ladder fed
111
+ by `gpu-renderer`'s wavefront adaptive-sampling levels, so the requested SPP
112
+ becomes a release-grade ceiling rather than an ungoverned demo-local heuristic.
113
+ The Eames loader also preserves authored UVs, decoded base-colour,
114
+ metallic-roughness, normal, occlusion, and emissive maps, plus authored glTF
115
+ material factors such as clearcoat, sheen colour, specular colour,
116
+ transmission, and IOR when present. That keeps the validation scene on the
117
+ shared renderer path instead of relying on material-name-specific overrides for
118
+ leather, wood, and chrome.
119
+
45
120
  ## Usage (load one technique)
46
121
 
47
122
  ```js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasius/gpu-lighting",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Advanced lighting WGSL modules and planning profiles for @plasius/gpu-worker.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -26,7 +26,7 @@
26
26
  "scripts": {
27
27
  "build": "tsup && cp -R src/techniques dist/techniques",
28
28
  "demo": "python3 -m http.server --directory ..",
29
- "typecheck": "node --check src/index.js && node --check demo/lighting-demo-config.js && node --check demo/main.js",
29
+ "typecheck": "node --check src/index.js && node --check demo/lighting-demo-config.js && node --check demo/main.js && node --check demo/eames-environments/page.js && node --check demo/eames-environments/eames-loader.js && node --check scripts/eames-environments/capture-runtime.mjs && node --check scripts/eames-environments/capture-server.mjs && node --check scripts/eames-environments/capture.mjs && node --check scripts/eames-environments/path-debug-capture.mjs && node --check scripts/eames-environments/capture-bridge-server.mjs",
30
30
  "audit:eslint": "eslint . --max-warnings=0",
31
31
  "audit:deps": "npm ls --all --omit=optional --omit=peer > /dev/null 2>&1 || true",
32
32
  "audit:npm": "npm audit --audit-level=high --omit=dev",