#version 330 core
in vec2 TexCoords;
out vec4 FragColor;

uniform sampler2D sampler;
uniform float alp;
uniform float ris;

void main()
{    
    //float alpha = texture(sampler, TexCoords).a;
    //vec3 sampled = texture(sampler, TexCoords).rgb;
    vec4 sampled = texture(sampler, TexCoords).rgba;

    //if (sampled.a < 0.001)
    //    discard;

    //float minalp=1.0-alp;

    //float greyValue = max(sampled.r, max(sampled.g, sampled.b));
    //FragColor = vec4(greyValue, greyValue, greyValue, 1.0);
    //FragColor = vec4(sampled, 0.5f);
    //FragColor = sampled;

    float alpha = (sampled.a * alp) + ris; // ie * .75) + .25

    //float alpha = sampled.a;

    FragColor = vec4(sampled.rgb,alpha);

    //FragColor = vec4(sampled.rgba);

    //FragColor = vec4(1.0f, 0.0f, alpha, 1.0f);
    //FragColor = vec4(1.0f, 1.0f, 1.0f, alpha) * textColor;
};
