public BloomPass(PApplet sketch) { this.sketch = sketch; blurPass = new BlurPass(sketch); brightPass = new BrightPass(sketch); }
/** * Run a bright pass pass on the texture. * * @param threshold Threshold of the brightness. * @return Builder object. */ public PostFXBuilder brightPass(float threshold) { BrightPass pass = getPass(BrightPass.class); pass.setThreshold(threshold); supervisor.pass(pass); return this; }
brightPass.setThreshold(threshold); brightPass.prepare(supervisor);
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); }