- Is the vertex shader doing anything which could result in identical input positions producing non-identical output positions?
Well, VS is just the regular VS there is doing the typical
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
- Are you using alpha-based anti-aliasing (
GL_POLYGON_SMOOTH
) as well as multi-sampling?
I explicitly disabled it glDisable(GL_POLYGON_SMOOTH);
but, I am using a multisamples Frame buffer, could it be because of that?
glRenderbufferStorageMultisample(GL_RENDERBUFFER, 8, GL_RGBA8, width, height);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, colorRenderBuffer);
...
glRenderbufferStorageMultisample(GL_RENDERBUFFER, 8, GL_DEPTH24_STENCIL8, width, height);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, depthRenderBuffer);
When using 0 samples, instead of 8, I find way more difficult to find any pixel gap, but when using antialised rendering, there are more gaps in the mesh.
Regarding your last observation, I’m explicitly setting the neighbour vertices to be the same value, but I’m afraid that with the transformations happening during the rendering that some of them could chage more than the other, no?
By the way, I’m scaling this mesh by 80x, could this have add to impact?