Brightness.glsl 270 B

1234567891011
  1. uniform sampler2D colorTexture;
  2. uniform float brightness;
  3. varying vec2 v_textureCoordinates;
  4. void main(void)
  5. {
  6. vec3 rgb = texture2D(colorTexture, v_textureCoordinates).rgb;
  7. vec3 target = vec3(0.0);
  8. gl_FragColor = vec4(mix(target, rgb, brightness), 1.0);
  9. }