We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm getting glitched pixels at the edges of the cells that are generated using a JFA shader that I wrote, I don't know what's causing it.
the code is on here github.com/Rupertofly/Vor_Flower
Answers
Hello can you post a very minimal, strip down version of you problem. Then is more likely someone jump into this, and spend his time debugging. Currently i have to download the project (not that bad) Clasess/classes.pde don't working for any reason, i have to copy past from github. I have to install toxi lib, ani lib. size(1920,1080,OPENGL); OPENGL is deprecated starting with Processing 3.x called P3D etc. all that sum up... i can't even see the output like the picture you posted, so i already debuging you code, and less your shader problem.
So, now after playing around with it.
It looks like you don't blend (erase) the backgrounds properly. Take a look.
here is the code running on the CPU instead of GPU and it doesn't have the problem
however when I use a shader to run the same code in parallel I get the issue, is it something to do with smoothing happening even though I used nosmooth?
Yes i understand, but your "bug" / problem, happens very early in your code somewhere. Please run a very minimal example of your code, you see then you don't clear the initial rectangle properly (*see below). And already at this stage, you can see some strange lines.
note on the right side the rect isn't cleared to white, some pixels are left.
after 2 mouse clicks.
I recommend you put everything in a single function scope. and rethink your program flow. You have multiple beginDraw() - endDraw(), also resetShader and then redrawsource() if mouseClicked? > redrawsource(); again, but what really happens in the meantime, is the shader really gets the state reset, between all the beginDraws() etc. - also it affects the frameRate, if i would be Processing i would better be totally drunk, then guessing what the programmer, want from me to do next. :)
Okay you can argument i commented something very important. Try it by your self. Line by line, and i hope you see, what i trying to explain.
@rupertofly
made a little playground for you :)
optimized version with notes