varying lowp vec4 v_color;
varying lowp vec2 v_texCoord;
uniform sampler2D u_texture;
#define Blend(base, blend, funcf) vec3(funcf(base.r, blend.r), funcf(base.g, blend.g), funcf(base.b, blend.b))
#define BlendOverlayf(base, blend) (base < 0.5 ? (2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend)))
#define BlendOverlay(base, blend) Blend(base, blend, BlendOverlayf)
void main() {
gl_FragColor = texture2D(u_texture, v_texCoord);
gl_FragColor.rgb = BlendOverlay(gl_FragColor, v_color);
gl_FragColor.a *= v_color.a;
}
```
上面是我找到的shader
但是不知道怎么用。
求大神指点。
用的是cocos2d-x 3.2版本