2011-12-01 20:52:59 +00:00
|
|
|
#version 120
|
|
|
|
uniform sampler2D baseTexture;
|
|
|
|
//varying float fogFactor;
|
|
|
|
//varying vec4 PointPos;
|
|
|
|
//varying vec4 EyePos;
|
2009-09-29 07:41:11 +00:00
|
|
|
|
2011-12-01 20:52:59 +00:00
|
|
|
////fog "include" /////
|
|
|
|
uniform int fogType;
|
|
|
|
|
|
|
|
vec3 fog_Func(vec3 color, int type);
|
|
|
|
//////////////////////
|
|
|
|
|
|
|
|
void main(void)
|
|
|
|
{
|
2009-09-29 07:41:11 +00:00
|
|
|
vec4 base = texture2D( baseTexture, gl_TexCoord[0].st);
|
2011-12-01 20:52:59 +00:00
|
|
|
if (base.a <= 0.01)
|
|
|
|
discard;
|
|
|
|
vec4 fragColor = base * gl_Color;
|
|
|
|
//gl_FragColor = vec4(mix(gl_Fog.color.rgb, finalColor.rgb, fogFactor ), finalColor.a);
|
|
|
|
fragColor.rgb = fog_Func(fragColor.rgb, fogType);
|
|
|
|
gl_FragColor = fragColor;
|
2009-09-29 07:41:11 +00:00
|
|
|
}
|