3D Textures+Cg

I’m using 3D textures extensions in opengl to render a volumetric data, and would like to use vertex shaders for lighting. Problem is, when programmable vertex shaders are enabled the 3D textures basically stop functioning. Now I assume I need to replicate some of the fixed function 3d texture functionality in my vertex program, but I can’t seem to crack this one. Anyone have any ideas?

Part of whats so tricky is I need the final stuff to work on a GeForce 4 icon_sad.gif, so I the vertex/pixel shaders have to be fairly simple. I’m using Cg at the moment, but really just an explanation of how to recreate the fixed function vertex pipeline for 3d textures is all I really need… Thanks

How are you generating the texture coords? If sending as per vertex texcoords just pass them through, if using texgen you’ll have to implement the appropriate texgen from the available plane equations in the vertex shaders and send the results through.

Well there are per vertex texture coordinates (assigned using glTexCoord3f) but passing them through doesn’t seem to be working (object doesn’t show up)

Is below what you mean? (with Tex0 being TEXCOORD0, Tex1 TEXCOORD1, etc in Cg)