Hello Guest

texture2D lookup in GLSL?

  • 0 Replies
  • 6776 Views
texture2D lookup in GLSL?
« on: July 24, 2006, 11:43:36 »
I need to look up a color sample from a texture in GLSL, something like

Code: [Select]

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 :)