therealremi
03-06-2007, 04:15 AM
I've read the old Nvidia's article about cube mapping but I would need a more complete and recent example of using it. Maybe you have a link?
I also have a question: how do you use GL_TEXTURE_CUBE_MAP_ARB and GL_TEXTURE_2D in the same program? Is it so that at once only one of the two texture targets can be active? What if I want to accsess both 2D texture and cubemap in the same fragment program? Is this possible? I remember somebody saying that this is not possible but I also remember seeing calls to both tex2D() and texCUBE() in one fragment program in the book "the Cg tutorial".
And one more: do I have to generate some texture coordinates in OpenGL in order to access the cube map using texCUBE() in a shader? I just want the cube map color given a 3D vector (coordinates), nothing else.
I also have a question: how do you use GL_TEXTURE_CUBE_MAP_ARB and GL_TEXTURE_2D in the same program? Is it so that at once only one of the two texture targets can be active? What if I want to accsess both 2D texture and cubemap in the same fragment program? Is this possible? I remember somebody saying that this is not possible but I also remember seeing calls to both tex2D() and texCUBE() in one fragment program in the book "the Cg tutorial".
And one more: do I have to generate some texture coordinates in OpenGL in order to access the cube map using texCUBE() in a shader? I just want the cube map color given a 3D vector (coordinates), nothing else.