dots

git clone git://mattcarlson.org/repos/dots.git
Log | Files | Refs

gray.glsl (381B)


      1 #version 330
      2 
      3 in vec2 texcoord;
      4 uniform sampler2D tex;
      5 uniform float opacity;
      6 
      7 vec4 default_post_processing(vec4 c);
      8 
      9 vec4 window_shader() {
     10 	vec2 texsize = textureSize(tex, 0);
     11 	vec4 color = texture2D(tex, texcoord / texsize, 0);
     12 
     13 	color = vec4(vec3(0.2126 * color.r + 0.7152 * color.g + 0.0722 * color.b) * opacity, color.a * opacity);
     14 
     15 	return default_post_processing(color);
     16 }