I'm creating an FBO heightmap texture that I can paint to for a terrain editor.
Code:
glTexImage2D(GL_TEXTURE_2D,0, GL_R32F, width,height, 0, GL_RED, GL_FLOAT, NULL);
Attached an image. It does look like it is validly floating point. What you see on the right is a height brush placed into the heightmap. What happens when I draw it again a second time with blending as GL_ONE, GL_ONE (as if I placed the same brush twice), it blows up positive and negative super high values. The vertices stretch crazy high into the air (maybe + FLOAT_MAX) and even negative (which is impossible because the brush is a GL_RGB 0-1 range texture). How it even went negative makes no sense.
Expected result would be adding original brush + the second splat = 2x as tall terrain. Not sure whats going on. You can see that bad height map has black specs inside of it, yet it was the same brush placed on the heightmap twice.