@plasius/gpu-renderer 0.2.41 → 0.2.42

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasius/gpu-renderer",
3
- "version": "0.2.41",
3
+ "version": "0.2.42",
4
4
  "description": "Framework-agnostic WebGPU renderer runtime for Plasius projects.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -297,7 +297,11 @@ export function createWavefrontFrameTelemetryResources({
297
297
  rayCountReadbackBuffer.unmap();
298
298
  rayReadbackMapped = false;
299
299
 
300
- const bounceHistogram = Array.from({ length: Math.max(0, ...bounceIndices) + 1 }, () => 0);
300
+ let maximumBounceIndex = 0;
301
+ for (const bounceIndex of bounceIndices) {
302
+ maximumBounceIndex = Math.max(maximumBounceIndex, bounceIndex);
303
+ }
304
+ const bounceHistogram = Array.from({ length: maximumBounceIndex + 1 }, () => 0);
301
305
  let observedPrimaryRays = 0;
302
306
  let secondaryRays = 0;
303
307
  let totalPathSegments = 0;