// Implementation of a "banded blending" between two textures // using GLTextureFilter. // The output image is generated by alternatively taking one // horizontal band of pixels from texture 0 and 1. // The size of the band can be adjusted. // By Andres Colubri import processing.opengl.*; import codeanticode.glgraphics.*; size(256, 256, GLConstants.GLGRAPHICS); GLTexture tex0 = new GLTexture(this, "beach.jpg"); GLTexture tex1 = new GLTexture(this, "peebles.jpg"); GLTexture tex2 = new GLTexture(this, 256, 256); GLTextureFilter bandedBlend = new GLTextureFilter(this, "BandedBlend.xml"); bandedBlend.setParameterValue("band_size", 1); bandedBlend.apply(new GLTexture[]{tex0, tex1}, tex2); image(tex2, 0, 0);