public void setup() { super.setup(); ((PGraphics) g).textureWrap(Texture.REPEAT); // _warpShader = p.loadShader(FileUtil.getFile("shaders/texturewarp/round-tunnel.glsl")); _warpShader = p.loadShader(FileUtil.getFile("shaders/texturewarp/square-tunnel.glsl")); _warpShader.set("time", p.frameCount / 100f); PImage img = p.loadImage(FileUtil.getFile("images/ello-grid-crap-512.png")); _warpShader.set("textureInput", img); }
public void drawApp() { p.background(0); _warpShader.set("time", (p.frameCount % 10f) * 0.033f); p.filter(_warpShader); }