diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d2a351..ce2b3d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # ChangeLog +## 0.3.0 (2020-01-09) + +- 加入圆角裁剪特效 + ## 0.2.0 (2020-01-05) - 加入灰度渐变特效 diff --git a/README.md b/README.md index 908bf0d..e542eff 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Cocos Creator Shader Effect Demo -[![](https://img.shields.io/badge/Release-0.2.0-green.svg)](CHANGELOG.md) +[![](https://img.shields.io/badge/Release-0.3.0-green.svg)](CHANGELOG.md) [![](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE) [![](https://img.shields.io/badge/Support-Cocos%20Creator%20v2.2.1-orange.svg)](http://www.cocos.com/creator) @@ -43,6 +43,15 @@ ![](static/effects/2d-sprite-gray.gif) +### 圆角裁剪 + +> * 声明:此特效为搬运过来的特效,非原创。 +> * 修改的地方:搬运后,在原来的主要代码上加入了自己的理解注释 +> * 实现原理:参考文章 [《圆角计算 Shader》](https://www.cnblogs.com/jqm304775992/p/4987793.html) +> * 参考代码:Cocos 论坛帖子[《分享更高效的 creator 裁圆角头像 shader》](https://forum.cocos.org/t/creator-shader-2019-10-22-2-2-0/82548) 和对应的 [实现代码](https://github.com/yanjifa/shaderDemo/blob/master/assets/Effect/CircleAvatar.effect) + +![](static/effects/2d-sprite-round-corner-crop.gif) + ### 外发光(完善中...) ### 外描边(完善中...) diff --git a/static/effects/2d-sprite-round-corner-crop.gif b/static/effects/2d-sprite-round-corner-crop.gif new file mode 100644 index 0000000..ffd7537 Binary files /dev/null and b/static/effects/2d-sprite-round-corner-crop.gif differ