
uniform sampler2D texture;

varying vec2 v_texture_coord;
uniform vec4 colour_filter;

// Use default texture vertex shader
  
void main()
{
  vec4 base_colour = texture2D(texture, v_texture_coord);
  float average = (base_colour.r + base_colour.g + base_colour.b) * 0.3333;
  gl_FragColor = vec4(average, average, average, base_colour.a * colour_filter.a);
}