View Full Version : texture acces inside vertex shader

09-07-2006, 10: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?

09-07-2006, 10: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.

09-07-2006, 11:46 AM
I will read these documents.