axmol/tests/cpp-tests/Content/MeshRendererTest/fog.frag

17 lines
348 B
GLSL
Raw Normal View History

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
2022-07-04 21:26:48 +08:00
uniform sampler2D u_tex0;
2019-03-13 15:06:30 +08:00
2015-01-07 11:47:34 +08:00
void main (void)
{
2022-07-04 21:26:48 +08:00
vec4 finalColor = texture2D(u_tex0, 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
}