1
0
Fork 0
fgdata/Shaders/3dcloud.frag
jmt 1531446fb2 From Lauri Peltonen (Zan):
These two patches allow use of external shaders as the tree and 3d cloud
shaders. The shaders are Shaders/3dcloud.{frag|vert} and
Shaders/tree.{frag|vert}. If the shader files are not found, the
original shaders included in the source are used.

This makes testing modifications to the shaders easier and faster. End
users should see no difference when using this.
2009-09-29 07:41:11 +00:00

11 lines
294 B
GLSL

uniform sampler2D baseTexture;
varying float fogFactor;
void main(void)
{
vec4 base = texture2D( baseTexture, gl_TexCoord[0].st);
vec4 finalColor = base * gl_Color;
gl_FragColor.rgb = mix(gl_Fog.color.rgb, finalColor.rgb, fogFactor );
gl_FragColor.a = finalColor.a;
}