2014-11-12 17:44:19 +08:00
|
|
|
#ifdef GL_ES
|
2014-12-19 15:31:06 +08:00
|
|
|
varying mediump vec2 v_texture_coord;
|
2014-11-12 17:44:19 +08:00
|
|
|
#else
|
2014-12-19 15:31:06 +08:00
|
|
|
varying vec2 v_texture_coord;
|
2014-11-12 17:44:19 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
uniform vec4 u_color;
|
|
|
|
uniform float offset;
|
|
|
|
uniform float duration;
|
2015-09-02 16:30:24 +08:00
|
|
|
uniform sampler2D u_sampler0;
|
|
|
|
uniform sampler2D u_sampler1;
|
2014-11-12 17:44:19 +08:00
|
|
|
void main(void)
|
|
|
|
{
|
2014-12-18 16:09:29 +08:00
|
|
|
vec4 color = duration*vec4(0,0.8,0.4,1.0);
|
2014-11-12 17:44:19 +08:00
|
|
|
//blend two texture
|
2015-09-02 16:30:24 +08:00
|
|
|
gl_FragColor = u_color*texture2D(u_sampler0, vec2(v_texture_coord.x- 2.0 * offset,v_texture_coord.y)) * vec4(0.3,0.3,0.3,1)+texture2D(u_sampler1,vec2(v_texture_coord.x-offset,v_texture_coord.y)).r*color;
|
2014-11-12 17:44:19 +08:00
|
|
|
}
|