   Dependent Texture lookup / Texture Indirections
  Hey guys, i know it doens't fit into the OpenGL section perfectly, but it doens't fit to the other topics as well so i'll post it here. I'm having troubles to use dependent texture lookup with OpenGL and Cg.I have the following fragmentprogram:struct fInput {  float3 texCoord: TEXCOORD0; // this parameter is tested and ok  float4 direction: TEXCOORD1; // this parameter is tested and ok};struct fOutput {  float4 color : COLOR;};fOutput fProgram (fInput IN,   uniform sampler3D texture,   uniform sampler1D lookup,   uniform float stepsize) {  fOutput OUT;  float scalar = tex3D(texture, IN.texCoord.rgb);  OUT.color = tex1D(lookup, scalar);  return OUT;}with texture being a 3D texture of format GL_ILLUMINANCE and type GL_UNSIGNED_BYTE and lookup being a 1D texture of format GL_RGBA and type GL_UNSIGNED_BYTE. The problem now is that the output is a black window only.I tested the 3D texture withfOutput OUT;float scalar = tex3D(texture, IN.texCoord.rgb);OUT.color = float4(scalar, 0.0f, 0.0f, 1.0f);return OUT;and the 1D texture withfOutput OUT;float scalar = tex3D(texture, IN.texCoord.rgb);OUT.color = tex1D(lookup, IN.texCoord.r);return OUT;and both works as expected. But as soon as i use the output of tex3D directly or indirectly as input to tex1D the window is black.The Profile i'm using is CG_PROFILE_VP40 and CG_PROFILE_FP40 on a Geforce 7300 Go and the same Profile on a Quadro FX 3500. Both support at least ShaderModel 3.0, so texture indirections should be unlimited, afaik. I've seen this kind of code in several books/papers, so it should be possible somehow. I posted this problem already to NVIDIA's Cg Forum, but unfortunatelly this is more or less a dead forum, with just little responce to topics, so i hope this forum is the better choice =)   
  This may seem stupid but what value are you actually getting from the 3D texture? Is it 0, 1 or something else?   ;  The values are between 0 and 1.I know that, cause i outputted em as float4(scalar, 0, 0, 1);Furthermore i did  something like this:if (scalar < 0 && scalar > 1)  OUT.color = float(1.0f, 0.0f, 0.0f, 1.0f);else  OUT.color = float(0.0f, 1.0f, 0.0f, 1.0f);and everything was greed.i tested the 1D texture the same way and with:tex1D(lookup, 0.5f);which worked as expected...So the textures values are ok!!! don't worry about that.   ;  Probably you forgot to setup the uniforms : texture and lookup   ;  textures are well tested, don't worry about them.   