Use GPU and not CPU for processing

I have a processing script that processes and plots millions of dots to picture, I’m creating many images at once and the script seems to drive the CPU to 100%. I have a separate, modern GPU that is sitting mostly idle. How can I get this script processed with GPU and not CPU as this seems like a more efficient way to process my script.

You’re going to want to look into GLSL, shading language, best you can do with processing and GPU is use P3D, if you can code shader language then you can run that in processing
To use P3D use:

size(1000,1000,P3D);

as an example but it wont really help with millions of dots I dont think

2 Likes

Hi @BBGiraffe,

May I ask what algorithm is used to determine those dots. Are they just random?
As @Mikey83 suggested you can possibly use a simple pixelshader for it an due to lack of a build-in random function you can use ie the gold noise algorithm …

Cheers
— mnse

1 Like