中毒效果
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D u_texture;
varying vec2 v_texCoord;
varying vec4 v_fragmentColor;
void main(void)
{
gl_FragColor = texture2D(u_texture, v_texCoord) * v_fragmentColor;
gl_FragColor.r *= 0.8;
gl_FragColor.r += 0.08 * gl_FragColor.a;
gl_FragColor.g *= 0.8;
gl_FragColor.b *= 0.8;
gl_FragColor.g += 0.2 * gl_FragColor.a;
//gl_FragColor= vec4(color.r,color.g, color.b,color.a) ;
}
冰冻效果
#ifdef GL_ES
precision mediump float;
#endif
uniform sampler2D u_texture;
varying vec2 v_texCoord;
varying vec4 v_fragmentColor;
void main(void)
{
vec4 normalColor = v_fragmentColor * texture2D(u_texture, v_texCoord);
normalColor *= vec4(0.8, 0.8, 0.8, 1);
normalColor.b += normalColor.a * 0.2;
gl_FragColor = normalColor;
}