
layout(location = 0, index = 0) out vec4 outcol0;

uniform vec4 diffcol;
uniform vec4 fogdist;

in vec3 ws_pos;

void main()
{
	float fog = clamp(1 - length(ws_pos) / fogdist.x, 0, 1);
	outcol0 = vec4(2.0*diffcol.rgb,1);
	outcol0.rgb *= fog;
}
