Limitations on texture lookup in vertex shader?

I am currently working on a direct volume rendering application, using texture slicing with 3D textures and GLSL shading for transfer function lookup and illumination effects.
Implementing (Blinn-Phong) shading on the fragment shader proved no problem. As an experiment, I tried to move the on-the-fly gradient (normal) calculation from the fragment to the vertex shader (leaving the actual illumination calculation on the fragment shader), hoping to realize some kind of load balancing.
However, this didn’t quite work out as expected: there is definitely a contribution to the rendering, but more like a small change in global illumination rather than true shading (I have my working implementation on the fragment shader for comparison).
My question now is: are there limitations for texture lookup on the vertex shader that could explain my results.
(I must confess that I haven’t really looked much deeper into the matter before turning to this forum.)

It depends on the generation of your graphics card. For example for nVidia with GeForce 6 and 7 (pre unified-shader architecture), vertex texturing is much slower than texturing in a fragment shader.

For GeForce 8 and above (unified shader architecture), speed is the same for vertex and fragment shaders.

Here are the references:

http://developer.nvidia.com/object/gpu_programming_guide.html

GeForce 6 and 7, page 42, section “4.9 Vertex texturing”
http://developer.download.nvidia.com/GPU_Programming_Guide/GPU_Programming_Guide.pdf

GeForce 8 and 8, page 40, section “4.5 Vertex Texture Fetch”
http://developer.download.nvidia.com/GPU_Programming_Guide/GPU_Programming_Guide_G80.pdf

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.