2010-08-13 16:49:25 +00:00
|
|
|
// -*-C++-*-
|
2016-08-03 07:59:29 +00:00
|
|
|
#version 120
|
|
|
|
|
2010-08-13 16:49:25 +00:00
|
|
|
uniform sampler2D texture;
|
|
|
|
|
2011-12-01 21:03:40 +00:00
|
|
|
////fog "include" /////
|
|
|
|
uniform int fogType;
|
|
|
|
|
|
|
|
vec3 fog_Func(vec3 color, int type);
|
|
|
|
//////////////////////
|
|
|
|
|
|
|
|
|
2010-08-13 16:49:25 +00:00
|
|
|
void main()
|
|
|
|
{
|
|
|
|
vec4 color = vec4(1.0, 1.0, 1.0, 1.0);
|
|
|
|
vec4 texel;
|
|
|
|
vec4 fragColor;
|
2011-12-01 21:03:40 +00:00
|
|
|
vec4 finalColor;
|
2010-08-13 16:49:25 +00:00
|
|
|
|
|
|
|
texel = texture2D(texture, gl_TexCoord[0].st);
|
|
|
|
fragColor = color * texel;
|
|
|
|
|
2011-12-01 21:03:40 +00:00
|
|
|
finalColor.rgb = fog_Func(fragColor.rgb, fogType);
|
|
|
|
gl_FragColor = finalColor;
|
|
|
|
|
2010-08-13 16:49:25 +00:00
|
|
|
}
|