rayzee 9.1.0 → 9.1.1

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": "rayzee",
3
- "version": "9.1.0",
3
+ "version": "9.1.1",
4
4
  "type": "module",
5
5
  "description": "Real-time WebGPU path tracing engine built on Three.js",
6
6
  "main": "dist/rayzee.umd.js",
@@ -163,7 +163,10 @@ export class KernelManager {
163
163
 
164
164
  const node = this.kernels.get( name );
165
165
  if ( ! node ) return;
166
- node.dispatchSize = [ Math.ceil( count / node.workgroupSize[ 0 ] ), 1, 1 ];
166
+ const groups = Math.ceil( count / node.workgroupSize[ 0 ] );
167
+ // Past the per-dimension limit the grid spills into rows; instanceIndex folds them back in.
168
+ const max = this.renderer?.backend?.device?.limits.maxComputeWorkgroupsPerDimension ?? 65535;
169
+ node.dispatchSize = groups > max ? [ max, Math.ceil( groups / max ), 1 ] : [ groups, 1, 1 ];
167
170
 
168
171
  }
169
172