Closed
Description
Created by: cacheflowe
With the latest core.jar
, a technique I've been using for GPGPU particles is now incredibly slow. I'm guessing it's something to do with changes to the way that geometry is cached in the latest update. I've gone from 60fps with lots of headroom to draw more graphics, down to 10fps. I've tested with POINTS geometry, but I'm guessing other types of geometry might be impacted.
Steps to Reproduce
Run this code in the latest version of Processing (4.0.b3), and then run it in an older version - even 3.5.4 works great. This makes a PShape with about 1 million points, which used to run great on a decent GPU. Now it is very slow.
PShape s;
void settings() {
size(800, 800, P3D);
}
void setup() {
s = buildPointsShape(1024, 1024);
}
PShape buildPointsShape(int w, int h) {
int vertices = w * h;
s = createShape();
s.beginShape(POINTS);
for (int i = 0; i < vertices; i++) {
s.stroke(255);
s.vertex(random(-256, 256), random(-256, 256), random(-256, 256));
}
s.endShape();
return s;
}
void draw() {
background(0);
text(frameRate, 30, 30);
translate(width/2, height/2);
rotateY(frameCount/20.);
shape(s);
}
Your Environment
- Processing version: 4.0.b3
- Operating System and OS version: Windows 11, NVIDIA RTX3080