#version 150

#moj_import <fog.glsl>

uniform float FogStart;
uniform float FogEnd;
uniform vec4 FogColor;


in float vertexDistance;
flat in vec4 vertexColor;

out vec4 fragColor;

void main() {
vec4 color = vertexColor;


vec4 leash_color = vec4(0.75,0.54,0.33, 1.0);

if(color.r <= 255/255.0 && color.r >= 0/255.0 && color.g <= 255/255.0 && color.g >= 0/255.0 && color.b <= 255/255.0 && color.b >= 0/255.0){ color = leash_color;}


    fragColor = color  + (linear_fog(vertexColor, vertexDistance, FogStart, FogEnd, FogColor)/10);
}
