idd
07-19-2005, 01:37 AM
Hello people,
I´m trying to figure out why this code is working:
------------------------------
uniform sampler3D volumeTex;
uniform sampler2D lookupTex;
void main()
{
vec4 color = texture3D(volumeTex, gl_TexCoord[0].stp);
vec4 outputColor = texture2D(lookupTex, vec2(0.1, 0.5));
gl_FragColor = outputColor;
}
and this is not:
----------------------
uniform sampler3D volumeTex;
uniform sampler2D lookupTex;
void main()
{
vec4 color = texture3D(volumeTex, gl_TexCoord[0].stp);
vec4 outputColor = texture2D(lookupTex, color.rg);
gl_FragColor = outputColor;
}
First example of course shows to me a uniform color, but second simply shows nothing, like color is always 0, which is not the case (I tried to visualize it). Could someone help me, please ? thanks. I´m using Linux, nVidia GeForce 6600, 256 Mb, driver is 76.67
I´m trying to figure out why this code is working:
------------------------------
uniform sampler3D volumeTex;
uniform sampler2D lookupTex;
void main()
{
vec4 color = texture3D(volumeTex, gl_TexCoord[0].stp);
vec4 outputColor = texture2D(lookupTex, vec2(0.1, 0.5));
gl_FragColor = outputColor;
}
and this is not:
----------------------
uniform sampler3D volumeTex;
uniform sampler2D lookupTex;
void main()
{
vec4 color = texture3D(volumeTex, gl_TexCoord[0].stp);
vec4 outputColor = texture2D(lookupTex, color.rg);
gl_FragColor = outputColor;
}
First example of course shows to me a uniform color, but second simply shows nothing, like color is always 0, which is not the case (I tried to visualize it). Could someone help me, please ? thanks. I´m using Linux, nVidia GeForce 6600, 256 Mb, driver is 76.67