@plasius/gpu-lighting 0.2.5 → 0.2.7

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.
package/CHANGELOG.md CHANGED
@@ -20,7 +20,27 @@ The format is based on **[Keep a Changelog](https://keepachangelog.com/en/1.1.0/
20
20
  - **Security**
21
21
  - (placeholder)
22
22
 
23
- ## [0.2.5] - 2026-06-15
23
+ ## [0.2.7] - 2026-06-16
24
+
25
+ - **Added**
26
+ - Extended the wavefront lighting contract with compact medium-state carry,
27
+ visibility-probe ray helpers, MIS/exclusive-emissive probe controls, and
28
+ deterministic CPU reference fixtures for continuation validation.
29
+
30
+ - **Changed**
31
+ - Wavefront ray-record documentation now mirrors the current renderer payload
32
+ shape, including medium-stack and spectral-state fields used for transport
33
+ validation.
34
+
35
+ - **Fixed**
36
+ - Wavefront continuation helpers now report total internal reflection
37
+ explicitly and keep refraction/transparency medium transitions stable in the
38
+ published reference contract.
39
+
40
+ - **Security**
41
+ - (placeholder)
42
+
43
+ ## [0.2.6] - 2026-06-16
24
44
 
25
45
  - **Added**
26
46
  - Added concrete volumetric WGSL kernels for `volumetricShadow` and
@@ -28,14 +48,25 @@ The format is based on **[Keep a Changelog](https://keepachangelog.com/en/1.1.0/
28
48
  integration for the published realtime and reference profiles.
29
49
  - Added concrete HDRI/IBL WGSL kernels for `irradianceConvolution`,
30
50
  `specularPrefilter`, and `brdfLut`.
51
+ - Added a renderer-aligned `wavefront` lighting technique with concrete
52
+ WGSL jobs for terminal radiance accumulation and continuation scattering.
53
+ - Added `createWavefrontLightingPlan()`,
54
+ `evaluateWavefrontTerminalRadiance()`, and
55
+ `evaluateWavefrontContinuationEvent()` so downstream packages and tests can
56
+ validate emissive-hit, environment-hit, miss-darkening, reflection,
57
+ refraction, and transparency behavior without reimplementing the contract.
31
58
 
32
59
  - **Changed**
33
60
  - README now documents the delivered volumetrics and HDRI kernel scope with
34
61
  technique-level descriptions instead of leaving those exported jobs implied.
62
+ - Eames capture helpers now resolve workspace roots correctly from both
63
+ ordinary repo checkouts and `git worktree` paths.
35
64
 
36
65
  - **Fixed**
37
66
  - Package tests now fail if any exported `hybrid`, `volumetrics`, or `hdri`
38
67
  job regresses to placeholder text or an empty/no-op `process_job` body.
68
+ - Eames asset-path and capture-bridge tests are now worktree-safe instead of
69
+ assuming the package always lives under a literal `/gpu-lighting/` path.
39
70
 
40
71
  ## [0.2.2] - 2026-06-11
41
72
 
@@ -464,7 +495,8 @@ The format is based on **[Keep a Changelog](https://keepachangelog.com/en/1.1.0/
464
495
  [0.1.16]: https://github.com/Plasius-LTD/gpu-lighting/releases/tag/v0.1.16
465
496
  [0.1.17]: https://github.com/Plasius-LTD/gpu-lighting/releases/tag/v0.1.17
466
497
  [0.1.19]: https://github.com/Plasius-LTD/gpu-lighting/releases/tag/v0.1.19
467
- [Unreleased]: https://github.com/Plasius-LTD/gpu-lighting/compare/v0.2.5...HEAD
498
+ [Unreleased]: https://github.com/Plasius-LTD/gpu-lighting/compare/v0.2.7...HEAD
468
499
  [0.2.0]: https://github.com/Plasius-LTD/gpu-lighting/releases/tag/v0.2.0
469
500
  [0.2.2]: https://github.com/Plasius-LTD/gpu-lighting/releases/tag/v0.2.2
470
- [0.2.5]: https://github.com/Plasius-LTD/gpu-lighting/releases/tag/v0.2.5
501
+ [0.2.6]: https://github.com/Plasius-LTD/gpu-lighting/releases/tag/v0.2.6
502
+ [0.2.7]: https://github.com/Plasius-LTD/gpu-lighting/releases/tag/v0.2.7
package/README.md CHANGED
@@ -162,6 +162,104 @@ const profileManifest = getLightingProfileWorkerManifest("realtime");
162
162
  console.log(profileManifest.jobs.map((job) => job.worker.jobType));
163
163
  ```
164
164
 
165
+ ## Wavefront Lighting Contracts
166
+
167
+ `@plasius/gpu-lighting` now also publishes a renderer-aligned `wavefront`
168
+ technique for the first active-ray lighting slice. It keeps the queue layout,
169
+ buffer contract names, and terminal-hit policy aligned with
170
+ `@plasius/gpu-renderer` while owning the lighting-specific WGSL for terminal
171
+ radiance accumulation and continuation scattering.
172
+
173
+ ```js
174
+ import {
175
+ createWavefrontLightingPlan,
176
+ createWavefrontReferenceFixture,
177
+ createWavefrontVisibilityProbeRay,
178
+ evaluateWavefrontMaterialReference,
179
+ evaluateWavefrontTerminalRadiance,
180
+ evaluateWavefrontVisibilityProbe,
181
+ loadLightingTechniqueWorkerBundle,
182
+ } from "@plasius/gpu-lighting";
183
+
184
+ const plan = createWavefrontLightingPlan({
185
+ maxDepth: 6,
186
+ queueCapacity: 4096,
187
+ explicitLightSampling: true,
188
+ visibilityProbeMode: "mis-balanced",
189
+ });
190
+
191
+ const bundle = await loadLightingTechniqueWorkerBundle("wavefront");
192
+ const emissive = evaluateWavefrontTerminalRadiance({
193
+ hitType: "emissive",
194
+ throughput: [0.5, 0.5, 0.5],
195
+ emission: [8, 6, 4],
196
+ });
197
+ const material = evaluateWavefrontMaterialReference({
198
+ hitType: "surface",
199
+ eventKind: "refraction",
200
+ throughput: [1, 1, 1],
201
+ transmission: [0.92, 0.95, 0.98],
202
+ ior: 1.45,
203
+ shadingNormal: [0, 1, 0],
204
+ viewDirection: [0, 1, 0],
205
+ currentMediumRefId: 0,
206
+ surfaceMediumRefId: 7,
207
+ });
208
+ const probeRay = createWavefrontVisibilityProbeRay({
209
+ rayId: 12,
210
+ parentRayId: 4,
211
+ sourcePixelId: 9,
212
+ sampleId: 2,
213
+ bounce: 1,
214
+ origin: [0, 1, 0],
215
+ direction: [0.25, -1, 0.15],
216
+ throughput: [0.8, 0.7, 0.6],
217
+ mediumRefId: 7,
218
+ mediumStack: [7],
219
+ });
220
+ const probe = evaluateWavefrontVisibilityProbe({
221
+ probeRay,
222
+ probeMode: "exclusive-emissive",
223
+ activeEmissiveRadiance: [4, 3, 2],
224
+ emissiveRadiance: [4, 3, 2],
225
+ transparentSegments: [[0.8, 0.8, 0.8]],
226
+ });
227
+ const fixture = createWavefrontReferenceFixture({
228
+ hitType: "emissive",
229
+ throughput: [0.8, 0.7, 0.6],
230
+ emission: [4, 3, 2],
231
+ visibilityProbe: {
232
+ probeMode: "mis-balanced",
233
+ emissiveRadiance: [0.6, 0.3, 0.1],
234
+ transparentSegments: [[0.7, 0.8, 0.9]],
235
+ },
236
+ });
237
+
238
+ console.log(plan.requiredRendererPassOrder);
239
+ console.log(plan.visibilityProbeMode);
240
+ console.log(bundle.jobs.map((job) => job.label));
241
+ console.log(emissive.radiance);
242
+ console.log(material.continuation.mediumState);
243
+ console.log(probe.doubleCountPrevented);
244
+ console.log(fixture.tolerance);
245
+ ```
246
+
247
+ This slice keeps emissive hits, environment hits, and environment-miss dark
248
+ fallbacks on the lighting package surface without reintroducing a depth-first
249
+ shader dependency into the renderer-owned wavefront queue model.
250
+
251
+ The continuation/reference surface now also exposes:
252
+
253
+ - compact medium-state carry for refraction/transparency events, including
254
+ total-internal-reflection fallback reporting
255
+ - shared-ray payload helpers where visibility probes reuse the base ray layout
256
+ and encode their kind through the low bits of `flags`
257
+ - optional probe contribution helpers with `mis-balanced` and
258
+ `exclusive-emissive` modes so active emissive hits remain correct even when
259
+ explicit light sampling is enabled
260
+ - deterministic reference fixtures that publish buffer-like accumulation outputs
261
+ with a documented default tolerance of `0.0005` for CPU-vs-GPU comparisons
262
+
165
263
  ## Distance-Banded Lighting
166
264
 
167
265
  ```js