WGSLNodeBuilder or Compute: I can't understand what is required of me to launch?


When I send an argument to the compute method that is greater than the specified value, I get this error.

const render = new WebGPURenderer();
const nodeMaterial = new THREE.SpriteMaterial();
const mesh = new THREE.Mesh(new THREE.PlaneGeometry( 1, 1 ), nodeMaterial );
mesh.count = 5000;
const update = tslFn().compute(mesh.count);

function animate () {
renderer.computeAsync(update)
}

The error you showed indicates that builder.geometry is null.

but I would like to know how to make the builder have geometry, well, do I need to create another material or add additional parameters to node

I would start from some working sample code.

Easier to break something that is working than fix something you don’t understand.

I thought someone would suddenly tell me how to solve it)

Well, the code seems to work until the argument for compute starts to be higher than 4096