//#extension GL_EXT_gpu_shader4 : enable
uniform bool blending;
uniform float brightness;
uniform float opacity;
varying vec4 vColor;

int fmod(int value, int div)
{
  int rat = value / div;
  int mul = rat * div;
  return value - mul;
}

/* Triangles are colored based on array of colors */
void setColor()
{
  gl_FragColor = light(vColor);
  if(blending)
    gl_FragColor.a *= opacity;
}

