@plasius/gpu-renderer 0.2.40 → 0.2.41

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
@@ -23,6 +23,28 @@ All notable changes to this project will be documented in this file.
23
23
  - **Security**
24
24
  - (placeholder)
25
25
 
26
+ ## [0.2.41] - 2026-08-30
27
+
28
+ - **Added**
29
+ - Added opt-in fixed-SPP ray-count and timing telemetry to awaited
30
+ `renderFrame({ readStats: true })` results, including exact primary,
31
+ continuation, total path-segment, and per-bounce counts plus WebGPU
32
+ timestamp-query timing with an explicit queue-completion fallback.
33
+
34
+ - **Changed**
35
+ - Switched WGSL preflight diagnostics to the standard
36
+ `GPUShaderModule.getCompilationInfo()` API and request the 21 sampled
37
+ textures already required by the final material shader when the adapter
38
+ exposes that limit.
39
+
40
+ - **Fixed**
41
+ - Fixed final assembled WGSL compilation by making triangle initialization
42
+ resilient to record-field additions and aligning the trace bind-group
43
+ layout with all declared material-extension textures.
44
+
45
+ - **Security**
46
+ - (placeholder)
47
+
26
48
  ## [0.2.40] - 2026-08-30
27
49
 
28
50
  - **Added**
@@ -1006,3 +1028,4 @@ All notable changes to this project will be documented in this file.
1006
1028
  [0.2.38]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.38
1007
1029
  [0.2.39]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.39
1008
1030
  [0.2.40]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.40
1031
+ [0.2.41]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.41
package/README.md CHANGED
@@ -450,7 +450,47 @@ drop in jobs/submission or jobs/s versus the approved baseline as a
450
450
  release-validation failure unless a linked ticket explicitly approves the
451
451
  regression; `submission-batching` warns when the renderer falls back to roughly
452
452
  one GPU job per submission despite a higher pass ceiling.
453
- submitting work that can occupy more than one GPU execution unit. After each
453
+
454
+ Awaited fixed-SPP renders can opt into exact ray and timing evidence:
455
+
456
+ ```js
457
+ const frame = await renderer.renderFrame({
458
+ readStats: true,
459
+ readOutputProbe: false,
460
+ });
461
+
462
+ console.log({
463
+ primaryRays: frame.primaryRays,
464
+ secondaryRays: frame.secondaryRays,
465
+ totalPathSegments: frame.totalPathSegments,
466
+ bounceHistogram: frame.rayCounts.bounceHistogram,
467
+ gpuTimeMs: frame.timings.totalGpuTimeMs,
468
+ renderJobTimeMs: frame.timings.totalRenderJobTimeMs,
469
+ timingSource: frame.timings.source,
470
+ });
471
+ ```
472
+
473
+ `primaryRays` is the exact number of camera samples. `secondaryRays` is the
474
+ sum of active continuation records intersected after bounce zero, including
475
+ bounded reflection/transmission branches, and `totalPathSegments` is their sum.
476
+ The renderer copies the existing active-queue counter once per bounce into a
477
+ lazily allocated telemetry buffer; it does not add diagnostic shader atomics or
478
+ change WGSL transport. `rayCounts.status` distinguishes available,
479
+ unavailable, failed, and not-requested evidence. A mismatch between scheduled
480
+ and observed primary rays fails the `ray-count-telemetry` transport guardrail.
481
+
482
+ When the adapter exposes `timestamp-query`, the device requests it
483
+ opportunistically and two timestamps measure the GPU span from the first
484
+ primary pass through presentation. Set `gpuTimestamps: false` at renderer
485
+ creation to prevent that optional feature request. Where timestamp queries are
486
+ not exposed or fail, `timings` reports `source: "queue-completion"`, leaves
487
+ `totalGpuTimeMs` null, and retains the awaited
488
+ `totalRenderJobTimeMs`. Classification, compaction, and sampling sub-pass times
489
+ remain null until the corresponding adaptive passes exist. Without
490
+ `readStats: true`, and for `renderOnce()`, the fixed dispatcher creates no
491
+ telemetry buffers, query sets, readbacks, or timestamped pass descriptors.
492
+
493
+ After each
454
494
  primary-ray or compaction pass, the GPU writes the active-ray workgroup count
455
495
  into the counter buffer and the encoder copies it into an indirect-dispatch
456
496
  argument buffer. Intersection and surface-resolution passes therefore scale