share/hedgewars/Data/Shaders/default.fs
author frd
Tue, 03 May 2016 00:55:46 -0400
changeset 11795 2028bd2a6c5b
parent 11317 62287d4044e7
child 12879 286e170f4f6b
permissions -rw-r--r--
Set medium floating precision to shaders Helps with WebGL compatibility.

precision mediump float;

uniform sampler2D tex0;
uniform vec4 tint;
uniform bool enableTexture;

varying vec2 tex;


void main()
{
    if(enableTexture){
        gl_FragColor = texture2D(tex0, tex) * tint;
    }else{
        gl_FragColor = tint;
    }
}