Merge pull request #1 from sky068/master

Update circle_avatar.effect
This commit is contained in:
异名 2020-05-18 18:39:26 +08:00 committed by GitHub
commit 89ba12506a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,7 +101,7 @@ CCProgram fs %{
float ry = center.y; float ry = center.y;
float dis = (v_uv0.x * wh_ratio - rx) * (v_uv0.x * wh_ratio - rx) + (v_uv0.y - ry) * (v_uv0.y - ry); float dis = (v_uv0.x * wh_ratio - rx) * (v_uv0.x * wh_ratio - rx) + (v_uv0.y - ry) * (v_uv0.y - ry);
o.a = smoothstep(circle, circle - blur, dis); o.a = smoothstep(circle, circle - blur, dis) * o.a;
gl_FragColor = o; gl_FragColor = o;
} }