/** * Re-initialise the framebuffer with a different size. * * @param sketch Sketch with new size. */ public void setResolution(PApplet sketch) { setResolution(sketch.g); }
public void setup() { frameRate(FRAME_RATE); supervisor = new PostFXSupervisor(this); brightPass = new BrightPass(this, 0.3f); blurPass = new BlurPass(this, 40, 12f, false); sobelPass = new SobelPass(this); fx = new PostFX(this); fx.preload(VignettePass.class); canvas = createGraphics(width, height, P3D); // load test image lenna = this.loadImage("data/Lenna.png"); hdrImage = this.loadImage("data/hdr.jpg"); // initialise pass results passResult = createGraphics(width, height, P2D); }
fx.render(canvas)
/** * Re-initialise the framebuffer with a different size. * * @param texture Texture object with new size. */ public void setResolution(PGraphics texture) { setResolution(texture.width, texture.height); }