Dear Designers, hope you can help me with the issue I’ve been struggling for weeks and just hitting a brick wall. Let me try explain it all…
I’m drawing a grid of poligons in GLSL and want their size be determined by an input TOP.
It all works well with one polygon in each cell but as I want to make poligons go outside 0-1 coordinates and overlap I decided to draw 9 poligons: main center and 8 poligons around that are outside coordinate system but sides are visible if they are large enough. And it all almost works, apart from the lines that sometimes appear on the edges of each cell.
Those glitches definetely depend on the number of rows/columns and resolution (when the reminder is zero, ie 1000x1000px with 10x10 grid). But as I understand it’s not just an odd pixels as TD definetely trying to draw something there, it is pretty consistant line that matches the size of the opposite cell… Also when I make similar gradient without input TOP it all works well without any glitches.
Please excuse my poor TD vocablurary. Any help with tips on where I can educate myself about the issues above will be greatly appreciated.
from what it looks like, for certain conditions the st calculations end up between 2 pixels and the wrong values are retrieved.
When defining the sts for all different directions, calculate first the input pixel, then offset by the required amount plus half a pixel width and convert that back to a float uv to be used in the texture lookup: