Okay, so I am procedurally generating meshes in code. In this case, I have a 255x255 mesh that gets a procedural texture applied to it and the heights are defined by real geo data I am importing. Everything is working great except for some visual artifacts that I am getting when viewing the mesh from one side.
As you can see in the picture, when looking at the mesh from one side I can see through it all the way to the far off peaks. As I rotate around the mesh, this corrects itself along this weird jagged line that I captured in the image. The right side of the image is “correct” and the left side is “see through”.
I am guessing that this has something to do with the winding order of my mesh generation or perhaps the normals? Has anyone built their own meshes in code and has an idea? One thing to note, I am texturing the mesh from both sides (top and bottom) as I want to be able to go “below” the terrain and look at it from the bottom.