I am told that my mesh is displaying wrong because the graphics card is receiving different binary values for shared seam vertices, but unity is printing that the vertices are the same decimal floating point number.
A graphics rendering engineer tells me that the binary values sent to the graphics card must be wrong, if the graphics card is not displaying shared vertices properly.
Say that i send a grapics card two meshes with shared vertices like:
Hi, yes the normals at the seams are averaged. Here is a screenshot of the problem. He has told me to make sure the graphics API is receiving the same binary data for triangle seams, and to enable the “precise” keyword on the shader to prevent refactoring of maths by the graphics drivers.
You have to make sure that all edges lines up 100%. This means that each and every corner vertex has a twin in the other mesh / polygon with an identical position.
Hello Big Bug, I have found the solution to the problem. I don’t believe that anyone on the forums has ever mentioned what’s the solution is. Anyone making a procedural terrain will have seams in the mesh, even if this seams have the same shared vertices. I printed all the shared vertices, their values in unity world space, and it prints that they have identical position. However, that is completely misleading, and I have found how to ensure that they have identical position, it’s a completely nonobvious solution, and unless someone else knows, having taken more than a year to find the solution, I am quite happy for a donation or 2 before I tell everyone! it should be explained somewhere on the unity forums and unity answers, and after having searched comprehensively , for thread that were unanswered, posted multiple times since last year asking for help, i had to find out the reason all by myself it was harsh!!!
unity can do this AAAAHERGhghrkk!!! do you know why? I do! :)))))
I checked a different fix to force the mesh to have identical vertices, in these procedural unity meshes that can sometimes have errors,
I added this to the vertex shader:
and, fascinatingly, unity was still showing major errors in the given test scenario. Even when all vertices were on integer positions. It is an idiosyncrasy of the unity engine, I have also figured out how to control physics using transform position so that 2 unity tricks that I am holding onto for the moment.