1
0
Fork 0
fgdata/Shaders/tree.frag
Vivian Meazza 06e0e5a057 Standardized fog
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
2011-12-01 20:52:59 +00:00

22 lines
539 B
GLSL

#version 120
uniform sampler2D baseTexture;
//varying float fogFactor;
//varying vec4 PointPos;
//varying vec4 EyePos;
////fog "include" /////
uniform int fogType;
vec3 fog_Func(vec3 color, int type);
//////////////////////
void main(void)
{
vec4 base = texture2D( baseTexture, gl_TexCoord[0].st);
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;
}