@GoToLoop Thanks for your reply !
So I’ve tried adapting my code the following way :
public void render(){
this.image.beginDraw();
this.image.filter(alphaOverlayShader);
this.image.endDraw();
}
public PGraphics getImage() {
PGraphics out = context.createGraphics(w, h);
this.image.beginDraw();
this.image.loadPixels();
out.beginDraw();
out.loadPixels();
PApplet.arrayCopy(this.image.pixels, out.pixels);
out.updatePixels();
out.endDraw();
this.image.updatePixels();
this.image.endDraw();
return out;
}
But this still doesn’t work, or at least I am still doing something wrong…