How to use filter on PGraphics in thread?
void setup() {
size(512, 512, P2D);
thread("thread");
}
void thread() {
PGraphics graphic = createGraphics(512, 512, P2D);
PShader blur = loadShader("blur.glsl");
graphic.beginDraw();
graphic.background(200);
graphic.ellipse(255, 255, 255, 255);
graphic.filter(blur);
graphic.endDraw();
}