@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/dist/index.js CHANGED
@@ -6256,7 +6256,11 @@ function createWavefrontFrameTelemetryResources({
6256
6256
  const rayCounts = new Uint32Array(rayCopy, 0, recordCount);
6257
6257
  rayCountReadbackBuffer.unmap();
6258
6258
  rayReadbackMapped = false;
6259
- const bounceHistogram = Array.from({ length: Math.max(0, ...bounceIndices) + 1 }, () => 0);
6259
+ let maximumBounceIndex = 0;
6260
+ for (const bounceIndex of bounceIndices) {
6261
+ maximumBounceIndex = Math.max(maximumBounceIndex, bounceIndex);
6262
+ }
6263
+ const bounceHistogram = Array.from({ length: maximumBounceIndex + 1 }, () => 0);
6260
6264
  let observedPrimaryRays = 0;
6261
6265
  let secondaryRays = 0;
6262
6266
  let totalPathSegments = 0;