PDA

View Full Version : texture acces inside vertex shader



speed
09-07-2006, 09:10 AM
Hi everyone!

I am trying to do the first program using shaders and I saw a strange thing. Is it possible that the texture access inside a vertex shader has huge time cost?¿ I change the access to the fragment shader and the result is surprising: access in VS 0.4 fps, acces in FS 2000 fps.

Do anyone know this?

Relic
09-07-2006, 09:20 AM
Vertex texture fetches are only supported on floating point 32 bit textures with four or one component. You probably use an unsupported format and fell back to SW rendering.

Read this: http://developer.nvidia.com/object/using_vertex_textures.html
and always have this handy for reference when programming on NVIDIA GPUs: http://developer.nvidia.com/object/gpu_programming_guide.html
Look at table 4.6 for the native vertex texture formats.

speed
09-07-2006, 10:46 AM
Thanks!
I will read these documents.