Grainy / fuzzy artifacts on flatshaded material

I have a procedural generated mesh and I have a simple PBR Graph for creating the flat shade style, but if I run around for a a few seconds to generate a couple more new tiles my materials for water and the land get a grainy / fuzzy look to them when looking at them up close instead of the solid color.

It does look fine if I use the standard URP lit shader if I use a custom mesh for the flatshade style.

I would like to address this if I can in the shader as I am using it for water, and it suffers from the same issue

Thanks in advance,
Steve

Unsolvable for the URP at this time. The issue comes from reduced floating point precision as you get further from the world origin. Once you get maybe 100 ~ 200 units from the origin these kinds of artifacts will start to show.

It’s unfortunate because it’s a solvable problem, but not with Shader Graph for the URP. If you keep the camera near the world origin and move the world around the camera the issue goes away.

The HDRP doesn’t have this problem because, by default, the rendered world is treated as if it’s moving around a fixed camera explicitly to avoid precision issues like this.

One option you do have is you could modify the generated shader code. Subtracting the camera position from the world position that’s passed from the vertex to the fragment shader stages can help avoid the issue as well, at least until you start getting far enough away from the origin that you’d be able to see precision issues with just the basic geometry.

Thanks for the response, glad to know i’m not going crazy. I will see if I can implement what you recommended as an option there. I was planning on clamping the map sizes anyways, so its not a big deal if I have to limit its size to avoid this.