- Home /
Reflections not seamless
Hello. I already asked this question once, but unfortunately no one could / wanted to answer, so I'll give it another try, because I really have no idea how to solve this, as a game programming beginner.
As you can see in the picture below, I have made tiles of water. They are supposed to look seamless. However, while the vertices are perfectly seamless, the reflections are not. It seems like there is some kind of "offset" :
I have no idea what this could be due to. I knew very little about shaders, reflections, etc. The normals of my water meshes are computed using Mesh.RecalculateNormals().
Here is the standard shader I used, based on a simple uniform color material :
Any clue ? Thanks ! :)
I suspect that while the vertices position perfectly overlap, the computed normals are not the same.
You can check this from scene view by clicking on the top-left dropdown of the scene-view and selecting "Normal", to view normals. (You may have to switch to Deferred rendering temporarily).
If that is the case, you should be able to fix this by averaging the normals of all the overlapping vertices of the meshes.
Thanks for your help. I suspected that after reading some articles. Since normals are "averaged", and there is nothing to average with on the borders, then they are wrong there. I guess I'll have to compute them manually by considering the surrounding vertices that do not exist.
Answer by Bunny83 · Jan 06, 2018 at 10:19 AM
Looks like you did not unify the vertex normals at the seam. The vertex normals of the duplicated vertices need to be identical. If you generate each section independently you need a way to produce the exact same normals for the seam. Keep in mind that where 4 seconds meet you have 4 vertices which need to be identical (the corner vertex of each section).