How to apply a glsl pixel shader to a texture?
How to apply a glsl pixel shader to a texture? I have a texture and i would like to apply to it a glsl shader. Is it possible and how to do it ? For example i want to apply this glsl shader to my texture : varying vec4 coord; uniform sampler2D texture; uniform float opacity; void main() { vec4 col = texture2D(texture, coord.xy); col.a *= opacity; gl_FragColor = col; } I also think this question is too board (and close-voted accordingly.) The short answer is: render a full-screen quad (or even better: a full-screen triangle) while applying this as the fragment shader. The vertex shader can be quite trivial. – derhass Jun 30 at 17:24 1 Answer 1 I would say create another texture empty and of similar properties of original texture. Attach this textu...