Help with topographic post process material

I’ve been working on this topographic map-style post process material, but I’m stuck on two issues. As you can see not all of the lines are drawing correctly, they kind of flicker when I move the camera. This seems to happen when the normal z is very close to 1, but I don’t know how to fix it. I’m also getting an awful amount of moiré in areas with high line density.

The lines are actually drawing correctly, have a look at a side-view. You can improve the topo line “height smoothness” by mesh tessellation however this is faking topo data which is usually a bad practice for civils…

Getting to your issues; the flickering is due to the resulting viewport line thickness and antialiasing combined. You could improve it by increasing in the settings. I don’t think you’ll achieve what you’re after though. My advice is scale the line thickness with screen distance, do you really need to see that many thin lines? Think about major line scaling and hide minor lines at X distance away…

To get a true consistent topographical line thickness I think you will have to draw the lines as an overlay in the viewport (3d vector to 2d screen).