/* Shader for applying a scale factor to a fragments color. * Can be used to apply f(g)= g * scalefactor; * (w)2006 by Mario Kleiner. Licensed under MIT license. */ #extension GL_ARB_texture_rectangle : enable /* uniform float scalefactor; */ void main() { /* Just pass-through the alpha value, do not modify it: */ gl_FragColor.a = gl_Color.a; /* Apply scaling to RGB channels... */ gl_FragColor.rgb = gl_Color.rgb * 255.0; }