I am chaining vertex programs together using a VBO/PBO combination. I want the output of the first vertex program to be pumped into the second vertex program. I then read the data back using ReadPixel (everything is done in a FBO). For debugging purposes and simplicity, I am outputting the vertex position as the color such that the first glVertex3f I do will end up being the first 3 floats of the buffer returned by ReadPixel (and so on).
I am going glVertex3f (0.2,0.3,0.4)
The result when I do not do any chaining (ie. I do not pipe the results using the PBO to a second vertex shader) is as it should: 0.2, 0.3, 0.4.
But, when I pipe the result to another VBO with my PBO and redraw using the same vertex program I get 0.19995117, 0.29809570, 0.39990234!
If I hardcode values in the vertex program, everything’s fine, the precision loss must when I bind the pbo to the array buffer… but why!