#version 410 uniform sampler2D texture1; in vec2 uvV; out vec4 fragColor; // Simplest Texture render -- assign "texture1" from varying UV coords. // Requires vertex shader with uvV output, only. void main (void) { fragColor = texture(texture1, uvV); fragColor.r = cos(fragColor.r * 6.7011) * 0.5 + 0.5; fragColor.g = cos(fragColor.g * 5.11) * 0.5 + 0.5; fragColor.b = cos(fragColor.b * 4.023948) * 0.5 + 0.5; float depth = 0.1; fragColor.rgb *= (1.0 - depth) + (sin(uvV.x) * depth / 2.0); }