2015-01-07 11:47:34 +08:00
|
|
|
#ifdef GL_ES
|
|
|
|
varying mediump vec2 v_texture_coord;
|
|
|
|
#else
|
|
|
|
varying vec2 v_texture_coord;
|
|
|
|
#endif
|
2015-01-07 17:58:10 +08:00
|
|
|
varying float v_fogFactor;
|
2015-01-07 11:47:34 +08:00
|
|
|
|
2015-01-07 17:58:10 +08:00
|
|
|
uniform vec4 u_fogColor;
|
2015-01-07 11:47:34 +08:00
|
|
|
|
|
|
|
void main (void)
|
|
|
|
{
|
|
|
|
vec4 finalColor = texture2D(CC_Texture0, v_texture_coord);
|
2015-01-07 17:58:10 +08:00
|
|
|
gl_FragColor = mix(u_fogColor, finalColor, v_fogFactor ); //out put finalColor
|
2015-01-07 15:47:27 +08:00
|
|
|
}
|