@plasius/gpu-renderer 0.2.6 → 0.2.8

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,7 +23,7 @@ All notable changes to this project will be documented in this file.
23
23
  - **Security**
24
24
  - (placeholder)
25
25
 
26
- ## [0.2.6] - 2026-06-14
26
+ ## [0.2.8] - 2026-06-20
27
27
 
28
28
  - **Added**
29
29
  - Added `updateCamera(...)` support for wavefront renderers so validation
@@ -60,6 +60,10 @@ All notable changes to this project will be documented in this file.
60
60
  highlight proxy.
61
61
  - Added ADR and design coverage for prefiltered HDRI, BRDF LUT, and MIS-based
62
62
  environment lighting in the wavefront display-quality path.
63
+ - Added ADR/design coverage and public contract support for authored volume
64
+ transport so mesh materials can derive Beer-Lambert media from glTF-style
65
+ attenuation inputs while preserving shell thickness in GPU material
66
+ packing.
63
67
  - Added adaptive `renderFrame(...)` sampling controls so callers can cap a
64
68
  frame with `frameTimeBudgetMs`, guarantee a `minimumSamplesPerPixel`, and
65
69
  inspect actual `renderedSamplesPerPixel` separately from the configured SPP
@@ -68,10 +72,31 @@ All notable changes to this project will be documented in this file.
68
72
  wavefront SPP adaptation to `@plasius/gpu-performance` without duplicating
69
73
  renderer-specific ladder construction in app or demo code.
70
74
 
75
+ - **Fixed**
76
+ - Awaited wavefront frame waits now scale their submitted-work timeout by
77
+ actual triangle load as well as pass count, preventing mesh-heavy
78
+ validation frames from failing early while the GPU is still legitimately
79
+ finishing the submitted work.
80
+ - Awaited high-SPP wavefront frames now break first-frame GPU work into
81
+ progressive 1-SPP submission slices with bounded wait windows, which avoids
82
+ queueing an entire heavy validation frame ahead of a single completion wait
83
+ and materially reduces browser-side device-loss risk on mesh renders.
84
+ - Fixed the display-quality `cpu-upload` mesh path so uploaded triangle
85
+ records preserve raw material factors, atlas rects, and texture settings
86
+ for GPU hit-time sampling instead of baking CPU-side averages that could
87
+ corrupt leather, wood, and chrome shading with the wrong atlas region.
88
+ - Fixed awaited `>= 8 spp` wavefront scheduling to stay tile-major while the
89
+ accumulation buffer is tile-local, preventing repeated-tile/striped image
90
+ corruption and stalled validation captures on higher-SPP frames.
91
+
71
92
  - **Changed**
72
93
  - Changed internal wavefront frame batching and dispatch-diagnostics plumbing
73
94
  to live in a dedicated runtime helper module so scheduling concerns stay
74
95
  separated from shader and pipeline assembly.
96
+ - Changed display-quality mesh tracing to default to `accelerationBuildMode:
97
+ "cpu-upload"` so stable CPU-built BVH uploads are used for validation and
98
+ demo rendering unless callers explicitly opt into the experimental GPU-side
99
+ BVH construction path.
75
100
  - Changed wavefront frame dispatch to split large tile/sample workloads into
76
101
  bounded command submissions instead of encoding an entire high-resolution
77
102
  frame into one command buffer.
@@ -413,4 +438,4 @@ All notable changes to this project will be documented in this file.
413
438
  [0.1.12]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.1.12
414
439
  [0.1.14]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.1.14
415
440
  [0.2.1]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.1
416
- [0.2.6]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.6
441
+ [0.2.8]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.8
package/README.md CHANGED
@@ -180,15 +180,20 @@ project-wide display-quality baseline for path-traced rendering, not a
180
180
  Product-Studio-only requirement.
181
181
 
182
182
  Mesh inputs are normalized into triangle records, packed into GPU buffers, and
183
- uploaded as source buffers for GPU triangle assembly and GPU BVH construction.
184
- Vertex normals are preserved for smooth shading; when normals are absent the
185
- triangle geometric normal is used. The display-quality path uses
186
- `accelerationBuildMode: "gpu"` and rejects CPU-built acceleration. The
187
- `createWavefrontMeshAcceleration(...)` helper remains available only for debug
188
- fixtures and deterministic layout tests. GPU BVH construction now uses
189
- Morton-style centroid keys to sort leaf references before sorted leaves and
190
- level-concurrent internal nodes are materialized. The current mesh path is the
191
- GPU runtime baseline under active hardening.
183
+ uploaded as source buffers for tracing. Vertex normals are preserved for smooth
184
+ shading; when normals are absent the triangle geometric normal is used. The
185
+ display-quality path now defaults to `accelerationBuildMode: "cpu-upload"` so
186
+ CPU-built BVH nodes and triangle records are uploaded once and then reused by
187
+ the GPU tracing passes. Set `accelerationBuildMode: "gpu"` only when you
188
+ explicitly want the experimental GPU-side BVH assembly path for validation or
189
+ development. The `createWavefrontMeshAcceleration(...)` helper is therefore no
190
+ longer debug-only; it is the stable display-quality acceleration builder,
191
+ whereas GPU BVH construction remains available behind the explicit mode switch.
192
+ CPU-upload records still preserve the raw material factors plus atlas rects and
193
+ texture settings expected by the GPU hit-time samplers; they are not meant to
194
+ replace exact UV-driven sampling with CPU-baked triangle averages.
195
+ The GPU BVH path still uses Morton-style centroid keys to sort leaf references
196
+ before sorted leaves and level-concurrent internal nodes are materialized.
192
197
  When mesh inputs also carry UVs plus decoded base-colour,
193
198
  metallic-roughness, normal, occlusion, or emissive maps, the display-quality
194
199
  path now packs them into GPU texture atlases and samples them at the resolved
@@ -201,6 +206,15 @@ response now also samples reflection-aligned environment radiance so leather,
201
206
  chrome, and other polished authored materials can read from the active
202
207
  environment map or procedural sky instead of relying mostly on a sun-direction
203
208
  proxy.
209
+ Authored participating-media inputs can also enter through the same mesh path.
210
+ A mesh may provide an explicit `medium` block or a glTF-style `material.volume`
211
+ block with `thickness`, `attenuationColor`, and `attenuationDistance`; the
212
+ renderer derives the medium-table entry, carries the active medium id on the
213
+ GPU ray, and applies Beer-Lambert transmittance to travelled segments on the
214
+ GPU. Thickness is now preserved in material packing for later shell-volume
215
+ work, but the current renderer still tracks only one active medium id per ray
216
+ and does not yet implement nested media, spectral dispersion, or a branching
217
+ reflection/refraction tree.
204
218
 
205
219
  `samplesPerPixel` controls how many GPU primary-ray samples are accumulated per
206
220
  screen pixel within a single render. This multiplies dispatch work but does not
@@ -272,7 +286,9 @@ with active continuation rays instead of the maximum tile capacity, while still
272
286
  avoiding CPU readback between bounces. WebGPU
273
287
  still preserves ordering between dependent bounce passes, but the renderer
274
288
  keeps CPU queue submissions bounded rather than forcing one submission per
275
- tile/sample.
289
+ tile/sample. Awaited higher-SPP submission slicing remains tile-major because
290
+ the accumulation buffer is tile-local; changing that order to sample-major
291
+ would mix samples across tiles and corrupt the resolved image.
276
292
  Environment-light portals can additionally guide and gate sky/HDRI contribution
277
293
  through rectangular openings such as windows. `environmentPortalMode: "guide"`
278
294
  biases diffuse continuation rays toward configured openings, while