#version 300 es

precision mediump float;

// Uniforms
layout(std140) uniform MyUniformBlock
{
  vec4 fragOffset;
};

uniform sampler2D DiffuseTextureSampler;

// Interpolated values from the vertex shader
in vec4 vertexPos_world;
in vec2 UV;

// Ouput data
out vec4 color;

void main()
{
  color = texture(DiffuseTextureSampler, UV) + fragOffset;
  float c = (color.r + color.g + color.b)/3.0;
  color.r = color.g = color.b = c;
  color.b -= 0.05;
}

// vim: syntax=glsl
