Vertex attribute: interpolate general float values

Hi all,

I have a flattened triangle mesh that each vertex have a list of values that I want to interpolate on the triangle face, the values are not color and their range is not in [0.0f,1.0f], but could be quite arbitrary, even negative.

How could render this flattened mesh to 2D and take the pixel value out? The glReadPixels seems like only designe for color or depth, but not for general float values.

Thank you for your help.

Create a framebuffer object with a floating-point texture or renderbuffer as the colour buffer, and render to it.

1 Like