texture2D lookup in GLSL?

Started by blue_tomato, July 24, 2006, 11:43:36

Previous topic - Next topic

blue_tomato

I need to look up a color sample from a texture in GLSL, something like

uniform sampler2D texture;

main()
{
   vec4 col=texture2D(texture,coord);
   ...
}


But, how do I make a loaded texture with a given textureID accessible to the uniform texture in the above example?

Thanks :)