pp_opengl.frag 385 B

1234567891011121314151617
  1. // Texture sampler
  2. uniform sampler2D TextureSampler;
  3. // TexCoords from vertex shader
  4. varying vec2 TexCoords;
  5. void main (void)
  6. {
  7. // Texture is sampled at Texcoords using texture2D
  8. vec4 Color = texture2D(TextureSampler, TexCoords);
  9. // Inverse the color to produce negative image effect
  10. Color.rgb = 1.0 - Color.rgb;
  11. gl_FragColor = Color;
  12. }