You are most likely turning on software rendering by accessing the texture in the vertex shader. 

Textures are uploaded as 8 bit per component which is the standard for images and video.  Changing this to 32 bit floats is extremely inefficient.  There might be a way to specify the GPU storage to be 32 bit float, but typically the driver would do the conversion slowly and not the GPU.

Render to texture using gemframebuffer with a 'format FLOAT' message will give a float texture to read from in the shaders.  I see that you filed a bug that this object does not work on your machine though.  Maybe you can try another?

You could try changing the code in pix_texture and recompiling.  Change the format from GL_UNSIGNED_BYTE to GL_FLOAT to see if that works and speeds it up.  The uploaded texture will not contain the right values since the GPU expects a float and the image is still 8 bit. 

I probably won't have time to work on this for a few weeks, but I want to get the framebuffer working better.

On 9/9/07, cyrille henry < cyrille.henry@la-kitchen.fr> wrote:
hello,

i'm tring to do more physics on the GPU, and i'm facing some problems.
simulation results can be compute on texture (just like the wave example i send month ago), so now i'd like to use this texture to move vertex.

if i acces to a texture with a vertex shader just like on a fragment shader, then it's very slow.
(cpu is at 100%)

i found that :
"vertex textures must be 32-bit-per-component textures, floating point, and they can't use any filtering mode except nearest filtering."

i tryed "quality 0" to pix_texture in order to have the nearest filtering mode, but i'm not sure about the 32 bit per component texture.
is it the default on Gem?
if no, is it possible to change it?

anyone already have an exemple how to use a texture to displace vertex?


thanks

cyrille

_______________________________________________
GEM-dev mailing list
GEM-dev@iem.at
http://lists.puredata.info/listinfo/gem-dev