2D Filter GLSL 130 texture coordinates

Hello!
I am making a 2D filter and currently what I got is:

  • A # version 130 on top. This is because I need some of functions which are supported only since GLSL 1.30.
  • A uniform sampler2D bgl_RenderedTexture. This is fine.
  • Some else code(also all fine).

And here is what I don’t have:

  • Texture coordinates. The gl_TexCoord[0] is not supported by GLSL 1.30 and later. However, I need to use 1.30, but I also need to map the screen-space image using correct texture coordinates. And here I don’t know how to do it. Is there a way?

Try to use “#version 130 compatibility” instead of “#version 130”. I’m not sure if it works because I only have used it with version 150. Otherwise try it with a higher version.

EDIT:
Okay I test it and #version 130 works fine for me with gl_TexCoord[0] (?)

Anyway “#version 130 compatibility” doesn’t work but if you use “#version 150 compatibility” it should work.

Hi! Thanks, this works very cool!:slight_smile: