渐变打开

前端之家收集整理的这篇文章主要介绍了渐变打开前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
#ifdef GL_ES
precision highp float;
#endif

varying vec2 v_texCoord;

void main(void)
{
    vec4 col = texture2D(CC_Texture0,v_texCoord);
    float fDiatance = distance( v_texCoord,vec2(0.5,0.5) );
    gl_FragColor = vec4(0.0,0.0,smoothstep(0.0,1.0-sin( CC_Time.z*0.5 ),abs(fDiatance)*0.5 ) );
}
原文链接:https://www.f2er.com/cocos2dx/343714.html

猜你在找的Cocos2d-x相关文章