hey, i was working on painting the terrain heightmap lately. so i used 2 fbo's, drawing a fullscreen quad with heightmap texture and a quad with a brush texture in front of it while painting. mechanically it works fine, but if i use resulting texture from any of fbo's directly to draw terrain, i notice constant shivering in certain spots. so i nailed it down to fbo's content:

heightBuffer[0] and heightBuffer[1] contents:
Click image for larger version. 

Name:	Nowhere-0_Editor-Context1-Texture19level0.jpg 
Views:	72 
Size:	2.9 KB 
ID:	1023 Click image for larger version. 

Name:	Nowhere-0_Editor-Context1-Texture20level0.jpg 
Views:	82 
Size:	2.9 KB 
ID:	1024
looks the same, right? but they're not.

here's the multiplied difference:
Click image for larger version. 

Name:	difference.jpg 
Views:	86 
Size:	2.4 KB 
ID:	1025

so there's constant error at those spots. but i can't see the reason. at first i thought it was due to low precision(unsigned byte), so i switched framebuffer attachment type to float and changed all corresponding code, but it didn't change anything. maybe someone else here will notice mistake, here's some code(sorry for fixed pipeline, this project was before i switched to OGL 3+):

ping-pong between fbo's drawing fullscreen quad and brush:
Code :
void updateHeightMap() {
    fboManager.bind(heightEditBufferIDs[Counter % 2]);
    glPushMatrix();
 
    glViewport(0, 0, 1024, 1024);
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    glOrtho(0.0f, 1024.0f, 0.0f, 1024.0f, 0.1f, 10.0f);
    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity();
 
    glDepthMask(0);
    SShader[3].applyProgram(10);
 
    glPushMatrix();
    glTranslatef(512.0f, 512.0f, -1.0f);
    glScalef(512.0f, 512.0f, 1.0f);
 
  //heightmap
    glActiveTexture(GL_TEXTURE0);
    glBindTexture(GL_TEXTURE_2D, fboManager[heightEditBufferIDs[Counter % 2 == 0]].rtList[0].textureObject);
    glUniform1i(SShader[shaderId].shaderSet[programId].uniform_colorMap, 0);
 
    glBindVertexArray(quadVertexArrayObjectId);
    glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, 0);
    glPopMatrix();
 
  //brush
    if(terrainEditorMode && lmDown) {
        //irrelevant, currently drawing\not drawing onto heightmap doesn't affect problem
    }
 
    glBindVertexArray(0);
 
    glPopMatrix();
    glDepthMask(1);
    fboManager.unbind();
}

fragment shader used to draw fullscreen quad:
Code :
#version 120
uniform sampler2D colorMap;
void main(void)
{
    vec4 Color = texture2D(colorMap, gl_TexCoord[0].st);
    gl_FragColor = Color;
}