Debian Codegraph @

Shaders/rain-layer.frag

raw
1 #version 120
2
3 uniform sampler2D baseTexture;
4 varying float fogFactor;
5
6 void main(void)
7 {
8 vec4 base = texture2D( baseTexture, gl_TexCoord[0].st);
9 vec4 finalColor = base * gl_Color;
10 gl_FragColor.rgb = mix(gl_Fog.color.rgb, finalColor.rgb, fogFactor );
11 gl_FragColor.a = mix(0.0, finalColor.a, fogFactor);
12 }