#version 150

// Can't moj_import in things used during startup, when resource packs don't exist.
// This is a copy of dynamicimports.glsl
layout(std140) uniform DynamicTransforms {
    mat4 ModelViewMat;
    vec4 ColorModulator;
    vec3 ModelOffset;
    mat4 TextureMat;
    float LineWidth;
};

in vec4 vertexColor;

out vec4 fragColor;

void main() {
    vec4 color = vertexColor;
    if (color.a == 0.0) {
        discard;
    }
	
	//MAIN MENU: server, world and resource pack list hover background
	if (color.rgb == vec3(0.5647058823529412) && color.a >= 0.605 && color.a >= 0.606) 
		{ color = vec4(0.2588, 0.5922, 0.7569, 0.5); } 	//TRANSPARENT BLUE
		
	//	MOJANG LOGO: background color mod (anti flashbang)
	if ( length(color.rgb - vec3(0.937,0.196,0.239) ) < 0.1 )
		{ color = vec4(0.322,0.106,0.165, color.a); }	//	DARK RED
		
	fragColor = color * ColorModulator;
}
