变灰

"                                           \n\
#ifdef GL_ES                                \n\
precision mediump float;                    \n\
#endif                                      \n\
\n\
uniform sampler2D u_texture;                \n\
varying vec2 v_texCoord;                    \n\
varying vec4 v_fragmentColor;               \n\
\n\
void main(void)                             \n\
{                                           \n\
// Convert to greyscale using NTSC weightings               \n\
vec4 col = texture2D(u_texture, v_texCoord);                \n\
float grey = dot(col.rgb, vec3(0.299, 0.587, 0.114));       \n\
gl_FragColor = vec4(grey, grey, grey, col.a);               \n\
}                                           \n\
";

  冰冻

"                                       \n\
#ifdef GL_ES				\n\
precision mediump float;		\n\
#endif					\n\
uniform sampler2D u_texture;		\n\
varying vec2 v_texCoord;		\n\
varying vec4 v_fragmentColor;		\n\
void main(void)				\n\
{					\n\
	vec4 normalColor = v_fragmentColor * texture2D(u_texture, v_texCoord);	\n\
	normalColor *= vec4(0.8, 0.8, 0.8, 1);	\n\
	normalColor.b += normalColor.a * 0.2;	\n\
	gl_FragColor = normalColor;	\n\
}                                       \n\
";

  

 

 

更多其他效果,参考http://blog.csdn.net/teng_ontheway/article/details/39190919

相关文章:

  • 2021-09-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-14
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-01
  • 2022-12-23
  • 2021-07-04
  • 2022-12-23
  • 2021-12-01
  • 2021-12-12
相关资源
相似解决方案