render to vertex texture

im tryin to implement render to vertex texture…

ive got both FBO and VTF workin seperate…

but when i try to render to the actual vertex texture using FBO i get problems…

its seems that there isnt a texture format that is supported by both…

FBO = max GL_RGB16F
VTF = min GL_RGB32F

is there any way to solve this?

if not is there any other way i can render to a vertex texture?

im using a nvidia 7800 GT

You can render to GL_RGB32F, but you can’t use blending.
I need blending but not the range and precision, so I’m rendering to RGB8 texture and finally I render this texture to RGB32F texture.

thats weird… i can render to the FBO without any errors… but when i try to render the GL_32F_ARB FBO texture all i get is a black texture and a fps below 1…

Have you tried checking the status of the framebuffer object for errors? I used to get the GL_FRAMEBUFFER_UNSUPPORTED_EXT error until I figured out that I could only use GL_NEAREST filtering with my GL_RGBA32F_ARB texture. i.e.

// initialize the framebuffer
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbID[0]);
glBindTexture(MY_TEXTURE_TARGET, textureID[0]);
// the texture clamps at the edges
glTexParameteri(MY_TEXTURE_TARGET, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(MY_TEXTURE_TARGET, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
// use nearest pixel to get value for minification and magnification
glTexParameterf(MY_TEXTURE_TARGET, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameterf(MY_TEXTURE_TARGET, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
// Setup the texture size and format
glTexImage2D(MY_TEXTURE_TARGET, 0, GL_RGBA32F_ARB,
	pPosTexW, pPosTexH, 0, GL_RGBA, GL_FLOAT, 0);
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, 
                             MY_TEXTURE_TARGET, textureID[0], 0);

Dragon89

Try to disable blending. It is not supported internally and falls to software mode with float rendertarget. Half rendertargets blending is supported on 7800, but not float one.

[EDIT]
Oops, k_szczech, I didn’t mentioned your post.

Little correction - FLOAT16 blending is supported on GeForce 6 / Radeon X1 and above. FLOAT16 filtering is supported only on GeForce 6 and above.

I believe GeForce 8 supports FLOAT32 blending and filtering (High Precision Dynamic Range).