@plasius/gpu-renderer 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.
package/CHANGELOG.md CHANGED
@@ -23,16 +23,39 @@ All notable changes to this project will be documented in this file.
23
23
  - **Security**
24
24
  - (placeholder)
25
25
 
26
- ## [0.2.2] - 2026-06-07
26
+ ## [0.2.4] - 2026-06-11
27
27
 
28
28
  - **Added**
29
- - (placeholder)
29
+ - Added `updateCamera(...)` support for wavefront renderers so validation
30
+ views can animate camera movement without rebuilding mesh buffers.
31
+ - Added `gpuParallelism` diagnostics to wavefront frame stats and snapshots so
32
+ consumers can inspect adapter compute limits, direct workgroups,
33
+ indirect-dispatch estimates, and whether a frame exposes multi-workgroup GPU
34
+ parallelism.
35
+ - Added optional equirectangular `environmentMap` sampling for wavefront
36
+ tracing so environment misses and surface environment estimates can use a
37
+ bound radiance texture before falling back to procedural sky/ambient values.
38
+ - Added default-on `deferredPathResolve` support for wavefront tracing so
39
+ surface traversal records material responses and terminal source radiance
40
+ before the output pass resolves the path backward into pixel accumulation.
30
41
 
31
42
  - **Changed**
32
- - (placeholder)
43
+ - Changed wavefront frame dispatch to split large tile/sample workloads into
44
+ bounded command submissions instead of encoding an entire high-resolution
45
+ frame into one command buffer.
46
+ - Changed display-quality wavefront tracing to require one additional
47
+ path-vertex storage buffer, raising the trace-stage storage-buffer request
48
+ from 9 to 10.
49
+ - Changed wavefront terminal/direct environment estimates to consume
50
+ `environmentLighting.sunlitBaseline` as a time-of-day daylight floor instead
51
+ of relying only on restrained ambient colour.
33
52
 
34
53
  - **Fixed**
35
- - (placeholder)
54
+ - Fixed low-sample wavefront renders so non-emissive surface hits receive a
55
+ deterministic sky, sun, and portal-light estimate before random continuation.
56
+ - Reduced deterministic environment fill on direct surface hits so ambient
57
+ rescue lighting no longer washes dark materials toward the full scene
58
+ ambient colour.
36
59
 
37
60
  - **Security**
38
61
  - (placeholder)
@@ -326,4 +349,4 @@ All notable changes to this project will be documented in this file.
326
349
  [0.1.12]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.1.12
327
350
  [0.1.14]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.1.14
328
351
  [0.2.1]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.1
329
- [0.2.2]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.2
352
+ [0.2.4]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.4
package/README.md CHANGED
@@ -196,25 +196,50 @@ tone mapping into the presented `rgba8unorm` output. Filtering in linear
196
196
  radiance space lets the denoise pass cross tile boundaries without compressing
197
197
  energy/detail before the final resolve. The renderer also stores compact
198
198
  emissive-triangle metadata in the existing BVH buffer tail and uses it to guide
199
- diffuse continuation rays toward finite mesh light geometry without adding a
200
- ninth trace storage buffer. This is not a separate shadow/direct-light pass: the
201
- active ray still has to hit emissive geometry or miss into the environment
202
- before radiance is accumulated. Guided emissive hits carry a bounded estimator
203
- weight so finite light guidance does not over-expose low-sample renders before
204
- full material PDFs/MIS are implemented. High-energy samples are clamped in
205
- linear radiance space to keep low-sample preview output stable while production
206
- sampling, temporal accumulation, and better material PDFs are hardened.
199
+ diffuse continuation rays toward finite mesh light geometry. This is not a
200
+ separate shadow/direct-light pass: the active ray still has to hit emissive
201
+ geometry or miss into the environment before radiance is committed. Guided
202
+ emissive hits carry a bounded estimator weight so finite light guidance does not
203
+ over-expose low-sample renders before full material PDFs/MIS are implemented.
204
+ High-energy samples are clamped in linear radiance space to keep low-sample
205
+ preview output stable while production sampling, temporal accumulation, and
206
+ better material PDFs are hardened. By default, `deferredPathResolve` records
207
+ per-bounce material responses in a tile-bounded path buffer and records the
208
+ terminal emissive/HDRI/environment source in the final path slot. The output
209
+ pass then resolves that recorded path backward and adds the weighted sample to
210
+ the pixel accumulation, so surface traversal no longer injects broad visible
211
+ ambient/direct environment light before a terminal source is known. Set
212
+ `deferredPathResolve: false` only for legacy forward-accumulation comparison.
213
+ When an `environmentMap` is provided, the wavefront trace shader samples it as
214
+ an equirectangular radiance source for environment misses and uses the same
215
+ mapped radiance for terminal residuals before falling back to static ambient.
216
+ The procedural horizon/zenith/sun model remains the fallback for callers that
217
+ have not supplied an HDRI/radiance texture. `environmentLighting.sunlitBaseline`
218
+ adds a time-of-day daylight floor to terminal and direct environment estimates,
219
+ so bright presets retain colour at the last collision without returning to a
220
+ whitewashed global ambient term.
207
221
  For static mesh scenes, the GPU acceleration build is submitted once and then
208
222
  reused by subsequent frames. Per-frame tracing writes one dynamic uniform slot
209
223
  per tile/sample or post-process pass and batches tile tracing, tile output,
210
- optional denoise, and presentation into a single command submission. After each
224
+ optional denoise, and presentation into bounded command submissions controlled
225
+ by `maxFramePassesPerSubmission` to keep 4K/high-spp command buffers from
226
+ becoming oversized. `updateCamera(...)` can update the per-frame camera uniforms
227
+ between renders without rebuilding mesh buffers. Frame stats and snapshots expose
228
+ `gpuParallelism` diagnostics with adapter compute limits, configured workgroup
229
+ size, direct compute dispatches, known workgroups/invocations, indirect dispatch
230
+ counts, and upper-bound indirect work estimates. WebGPU does not expose physical
231
+ GPU core counts, so `physicalCoreCount` remains `null`; use
232
+ `exposesMultiWorkgroupParallelism`, `largestDirectWorkgroupsPerDispatch`, and
233
+ `largestEstimatedIndirectWorkgroupsPerDispatch` to confirm the renderer is
234
+ submitting work that can occupy more than one GPU execution unit. After each
211
235
  primary-ray or compaction pass, the GPU writes the active-ray workgroup count
212
236
  into the counter buffer and the encoder copies it into an indirect-dispatch
213
237
  argument buffer. Intersection and surface-resolution passes therefore scale
214
238
  with active continuation rays instead of the maximum tile capacity, while still
215
239
  avoiding CPU readback between bounces. WebGPU
216
- still preserves ordering between dependent bounce passes, but the renderer no
217
- longer forces one CPU queue submission per tile/sample.
240
+ still preserves ordering between dependent bounce passes, but the renderer
241
+ keeps CPU queue submissions bounded rather than forcing one submission per
242
+ tile/sample.
218
243
  Environment-light portals can additionally guide and gate sky/HDRI contribution
219
244
  through rectangular openings such as windows. `environmentPortalMode: "guide"`
220
245
  biases diffuse continuation rays toward configured openings, while