I am trying to texturize some vertex objects with animated textures but it looks as if the different textures melts into eachother. The colors of the images gets 'sucked' up to the top of the screen.
The code I'm experimenting with is pretty straightforward.
Its a bunch of quads with separate textures rendered on top of eachother.
int numFrames = 11; int frame = 0;
PImage[] images = new PImage[numFrames];
void setup(){
size(800, 600,P3D);
frameRate(30);
for(int i=0; i<numFrames; i++) {
String imageName = "test/test"+nf(i,2)+".jpg"; // images have names like 'test02.jpg'
This produces a most weird result where the texture appears to be sucked to one of the edges. I believe it has to do with the the previous texture(s) not being cleared and the new texture just appears on top of the old.
When i translate each quad horizontally it clearly shows that each texture has been corrupted.
Above is the image rendered as a texture on a vertex, below is the image rendered with image()