Shading - How do I remove overlapping seams in X- and Y-direction while using vectors? While trying to create a pixelated effect, I noticed that using vectors causes overlapping lines in x- and y-direction. As far as I can see, there is no good solution to create pixelated faces...
Has anyone got good solution for this kind of problem?
The origin is in the bottom of the object.
As I wrote in the comments, some seams are inevitable. Even on a cube, if a side is 1.1 m long, and a tile is 0.2 m long, then 5 tiles will fit completely and half of a tile will be cut off in middle (giving an impression of a seam). What if you don't have a cube? Any non-vertical face will be visible from side as a diagonal line, which will not be compatible with squares that you look at en face.
Another way to look at it is this: if you were able to procedurally draw squares on an arbitrary figure without seams, it would mean you tessellate that figure with squares, which I think is fair to say is impossible - spheres in Blender are made either from triangles or from heavily stretched quads (and some triangles on top and bottom if you don't cast a subdivided cube into a sphere).
So while some seams (on the left) seem to be unavoidable, the seams inside NSWE, top, bottom sides can be avoided (on the right):

I came up with a basic setup like this:

By increasing Epsilons, you remove the inner seams by removing the normal-aligned axis information from the vector:

You will still get seams on areas between those &quot;flattened&quot; areas.
You could improve that node setup, or maybe instead create a black texture and use R/G/B information, and draw on that texture:

Best to draw in Add mode to add flattening (use the color of an axis visible on the gizmo: X:red, Y:green, Z:blue), and Subtract mode to remove flattening. I'd recommend falloff set to constant.
Perhaps a better idea is to make that information only offset the coordinates, so you're not forced to draw on an entire side of the object, and can just draw on a part of a square on one side of a seam.