share/hedgewars/Data/Shaders/default.fs
author unC0Rr
Thu, 10 Sep 2020 09:30:41 +0200
changeset 15739 94f4d0a96143
parent 15293 042a5e8d9c59
permissions -rw-r--r--
Prevent AI from getting stuck in attempt to look in another direction after choosing bee weapon

#ifdef GL_ES
precision mediump float;
#endif

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

varying vec2 tex;


void main()
{
    if(enableTexture){
        if (tintAdd){
            vec4 tint_ = vec4(tint.xyz, 0.0);
            gl_FragColor = clamp(texture2D(tex0, tex) + tint_, 0.0, 1.1);
        }else{
            gl_FragColor = texture2D(tex0, tex) * tint;
        }
    }else{
        gl_FragColor = tint;
    }
}