I’m playing a little bit with dependent texture reads using different extensions. My goal is it to do a full scene color lookup using a 3D texture and dependent texture reads. At first I render my scene as usually and then I copy it into a texture rectangle. After that I do the dependent read with into the 3D lookup texture.
So far I have implemented it using NV_texture_shader3 and ARB_fragment_program. I would like to do it also using ATI_fragment_shader but I have no chance to test it. Perhaps someone can tell me the outline of the corresponding gl calls.?
Here is the fp:
!!ARBfp1.0
TEMP rgbcol;
TEX rgbcol,fragment.texcoord[0],texture[0], RECT;
TEX result.color, rgbcol,texture[1],3D;
END
The inner move is needed because you can only do dependant texture reads in the second phase of the shader, and you need at least one instruction between the phases.
After the texture read, the color sampled from the 3D texture is in reg1, it has to be copied to the output register (also reg0).
If it doesn’t work, it maybe needs STQ as the dependant read swizzle, just a guess…
hi scott and thanks for your reply
unfortunately i’m still having problems
i hope you can help me out
i’ve just dloaded glew and run glewinfo:
GL_ARB_fragment_program: MISSING
i’m running on a geforce4 ti4600, 41.09 drivers
is there anything i could do about it?
and more than this i’ve looked into the headers you were linking to and couldnt find nothing about some sort of GL_ARB_fragment_program tokens, only fragment_shader_ati can be found