| 1 |
#version 120 |
| 2 |
uniform sampler2D baseTexture; |
| 3 |
//varying float fogFactor; |
| 4 |
//varying vec4 PointPos; |
| 5 |
//varying vec4 EyePos; |
| 6 |
|
| 7 |
////fog "include" ///// |
| 8 |
uniform int fogType; |
| 9 |
|
| 10 |
vec3 fog_Func(vec3 color, int type); |
| 11 |
////////////////////// |
| 12 |
|
| 13 |
void main(void) |
| 14 |
{ |
| 15 |
vec4 base = texture2D( baseTexture, gl_TexCoord[0].st); |
| 16 |
if (base.a <= 0.01) |
| 17 |
discard; |
| 18 |
vec4 fragColor = base * gl_Color; |
| 19 |
//gl_FragColor = vec4(mix(gl_Fog.color.rgb, finalColor.rgb, fogFactor ), finalColor.a); |
| 20 |
fragColor.rgb = fog_Func(fragColor.rgb, fogType); |
| 21 |
gl_FragColor = fragColor; |
| 22 |
} |