Very basic gpgpu particles not updating correctly

Hello
I’ve been trying to create a super basic gpgpu particles base, with particle positions udating, making the cloud of particles move toward the camera. Super super bare bones basic setup.

For some reason, the texture updates but with all the same position, so it looks like there’s only one particle on the screen moving toward the camera…

I put my code here if anyone wants minds peeking at it :

I’ve managed to log the initial and updated particles out the console, and as you can see, all the same positions. I can’t see where I’ve gone wrong updating and passing the texture around… would really appreciate a second pair of eyes.

Hi!

Line 93:

gpuCompute.init();

Move it right after the line 121:

fillPositions(dtPosition);

Thus it’ll be like this:

fillPositions(dtPosition);
gpuCompute.init();
console.log('Initial Positions:', dtPosition.image.data);

4 Likes

Ohhh thank you so much :blush: :pray:

1 Like