中毒效果

cocos2dx中毒冰冻shader

#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) ;  
}  

冰冻效果

cocos2dx中毒冰冻shader

#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;  
}  

相关文章:

  • 2022-12-23
  • 2021-09-01
  • 2022-12-23
  • 2022-12-23
  • 2021-05-20
  • 2021-11-27
  • 2021-05-16
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-04
  • 2022-12-23
  • 2021-10-07
  • 2022-12-23
相关资源
相似解决方案