I’m not exactly sure what you mean. Would mixing textures, one of which is a grid pattern, accomplish the same thing? A texture is, by definition(?), “aligned to uv.”
You have four different constants in the NodeMaterial. I can change the line thickness to get it to look good when zoomed out, but then it looks too thick when zoomed in.
I can think of two ways to improve it: 1) somehow modify the thickness based on how close you’re zoomed in (or how close the lines are on-screen), or 2) implement a different kind of anti-aliasing in the min/max/lerping thing you’re doing. I can’t decode what anti-aliasing you’ve implemented, or how to change it (or what to change it to).
You might be able to implement a sort of “minimum black” so the anti-aliasing doesn’t make thin lines disappear.
@pcace one of the things you can do is to make your grid lines’ thickness scalable so that you can increase the weight of the line based on distance from camera. An example of this can be seen in this node material. Basically, you can set the resolution of the grid to whatever you like by multiplying UV space by a scalar. Then we are creating a gradient for each set of lines (horizontal and vertical) using a sin node. Then it’s simply adding a smooth step node with a scalar value and a falloff value. Changing those two scalars will allow you to thicken the weight of the grid lines. Then it’s a simple matter of setting up some rules that when your camera radius changes, you scale your line thickness by a certain amount based on distance to the camera. Hope this helps.