glTexParameter and filtering in OpenGL and GLSL?

Posted by sharoz on Stack Overflow See other posts from Stack Overflow or by sharoz
Published on 2011-01-12T05:25:30Z Indexed on 2011/01/12 11:54 UTC
Read the original article Hit count: 146

Filed under:
|
|

I have a couple questions about glTexParameter and filtering

1) What is the scope when applying a glTexParameter (specifically the filtering)? Here's a scenario:

  • Bind a texture. Set the filters to LINEAR
  • Set the texture to "Sampler1" of a shader
  • Bind another texture. Set its filters to NEAREST
  • Set that texture to "Sampler2" of a shader
  • Draw

When I use the textures in a shader, will one be linear and the other be nearest? Or will they both be nearest because it was called last?

2) Is it possible to set the filtering method in GLSL?

Thanks in advance!

© Stack Overflow or respective owner

Related posts about opengl

Related posts about textures