I assume this is an OpenGL thing and probably also a GLGraphics thing.
I am trying to make a cellular automata running on the GPU and it is working except for one problem. The problem can be demonstrated the easiest with a very simple rule like this:
Code:
//GLSL code
if (sum != 0 ){gl_FragColor = vec4(1.);}
where
sum = 8 minus the number of white pixels surrounding the current pixel. Sorry to be confusing with the "8 minus" part, if the rule doesn't make sense just keep reading.
On a completely black starting texture this should cause all the pixels to flicker back and forth between white and black. On the first pass they do indeed all turn white, but then things go strange as you can see in the screenshot.
When they are supposed to flip back to black some of them stay stuck as white in this weird random grid pattern with a diagonal line, which means the shader thought it counted some black pixels in those areas even though everything was clearly white. Each generation the random grid changes its randomness, adding or removing lines here and there. I swear I solved this problem the other day and I thought it was done by setting the minFilter and magFilter for my texture to GLTexture.NEAREST. But now the problem is back.
I noticed that adjusting the grid resolution (nx and ny) values in the filter's xml file change the random pattern that is produced but I can't get it to go away entirely. What causes this