_GlobalFog.vsh
{
	uniform	mat4	u_ModelViewMatrix;
	uniform	mat4	u_ModelViewProjectionMatrix;
	out	vec3	v_clipVertex;
	include deforms.inc
	void main(void)
	{
		mat2 dummy;
		vec4 glVertex = DeformGeometry(dummy);
		gl_Position = u_ModelViewProjectionMatrix * glVertex;
		v_clipVertex = (u_ModelViewMatrix * glVertex).xyz;
	}
}

_GlobalFog.fsh
{
	uniform	vec4		u_globalFogParms;	// mode (0 = none, 1 = linear, 2 = exp), density, start, end
	uniform	vec3		u_globalFogColor;
	#if defined(ALPHATEST)
		uniform float	u_AlphaTestValue;
	#endif
	#if defined(CLIP)
		uniform vec4	u_clipPlane;
	#endif
	in	vec3		v_clipVertex;
	out	vec4		fragColor;
	void main(void)
	{
		include clipPlane.inc
		include fog.inc
		include fog_dithering.inc
		fragColor = vec4(fogColor, fogFactor);
	}
}
