分别在r、b、g向量上叠加一个0~1之间的值。#ifdef GL_ES precision mediump float; varying mediump vec2 v_texCoord; #else varying vec2 v_texCoord; #endif void main() { vec4 c = texture2D(CC_Texture0, v_texCoord); if (c.a <= 0.0) { discard; } float param = 0.2; gl_FragColor = vec4(c.r + param, c.g + param, c.b + param, c.a); }
BoomBeach海水效果实现https://blog.csdn.net/song_of_shadow/article/details/40948977Shader2D: 一些2D效果的Shader实现https://blog.csdn.net/ynnmnm/article/details/69791337