Sign in to follow this  

16 bit float vertex buffer object & FBO

This topic is 4056 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anybody already has experience with using 16 bit floats for render to vertex buffer via FBO/PBO ? I found its possible to use GL_HALF_FLOAT_ARB for VBO/PBO and GL_RGBA16F_ARB for the FBO texture, but my framerate dropped quite a lot by doing this - also I just had garbage on the screen, so I suppose the formats might not match.. I think its in general useful to store vertex buffers as 16Bit floats instead of 32 bit ones, since they just contain local object coordinates. For game-characters it should be the best way. -sven

Share this post


Link to post
Share on other sites
My config is a GF6600GT, winXP, 81.98 drivers.

I create the FBO texture via
glTexImage2D(
GL_TEXTURE_RECTANGLE_ARB,0,
GL_RGBA16F_ARB,x,y,0,
GL_RGBA,GL_HALF_FLOAT_ARB,0);

set the vertex pointer via
glVertexPointer ( 4, GL_HALF_FLOAT_ARB,0, (char *) 0);

and copy by
glReadPixels(0,0,width,height , GL_RGBA, GL_HALF_FLOAT_ARB, 0);

Before I forgot to use half float for the readpixels,
since I use it its quite fast - however, its not working,
there is nothing on the screen...

is there any mistake ?
It worked fine with a 32 Bit FLOATs so far.
Which drivers are you using ? I got some trouble using FBO/PBO and
32 Bit FLOAT textures and the newest NVidia drivers, so I continued using
the old ones.

-sven

Share this post


Link to post
Share on other sites
Ah,ok now its working :-) I made a mistake on another place. But now I found its not worth to change the FBO to 16 bit floats - alltogether its slower than using 32 bit float for me, since I need 2 rendertargets:

one for he vertices and one for the normals. Using 32 bit floats, I can encode the normal in the alpha channel and hence only need one render target.

Share this post


Link to post
Share on other sites

This topic is 4056 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this