diff --git a/CHANGELOG.md b/CHANGELOG.md index e59a6c4..415b9dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # ChangeLog +## 0.7.0 (2020-02-07) + +- 加入高斯模糊V1版本(纯原理篇) + ## 0.6.0 (2020-01-17) - 加入新的圆角裁剪特效 v2 ,支持任意宽高纹理圆角裁剪 diff --git a/README.md b/README.md index 0fc3a00..0239e8b 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Cocos Creator Shader Effect Demo -[![](https://img.shields.io/badge/Release-0.6.0-green.svg)](CHANGELOG.md) +[![](https://img.shields.io/badge/Release-0.7.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) @@ -20,6 +20,7 @@ * [Cocos Creator Shader Effect 系列 - 5 - 马赛克/像素化特效](https://www.jianshu.com/p/40e72ab76afd) * [Cocos Creator Shader Effect 系列 - 6 - 内发光特效](https://www.jianshu.com/p/326b73f86ecc) * [Cocos Creator Shader Effect 系列 - 7 - 点光/扫光特效](https://www.jianshu.com/p/8ff03b34b0bd) +* [Cocos Creator Shader Effect 系列 - 8 - 高斯模糊](https://www.jianshu.com/p/9e42cbb1d4a8) * 编写中... @@ -75,6 +76,9 @@ ![](static/effects/2d-sprite-round-corner-crop-v2.gif) +### 高斯模糊-V1([实现原理](https://www.jianshu.com/p/9e42cbb1d4a8))2020.02.07更新) + +![](static/effects/2d-sprite-gaussian-blur-v1.png) ### 外发光(完善中...) diff --git a/assets/effects/sprite-gaussian-blur-v1.effect b/assets/effects/sprite-gaussian-blur-v1.effect index 6df0cc9..2df18ef 100644 --- a/assets/effects/sprite-gaussian-blur-v1.effect +++ b/assets/effects/sprite-gaussian-blur-v1.effect @@ -137,7 +137,7 @@ CCProgram fs %{ const float size = floor(stDev * 6.0 + 1.0); const float halfSize = floor(size / 2.0); - // 步骤一:计算所有权重的和 + // 步骤一:计算高斯矩阵上所有权重的和 // // v1:遍历所有点,每个点都计算权重 // float totalWeight = 0.0; diff --git a/static/effects/2d-sprite-gaussian-blur-v1.png b/static/effects/2d-sprite-gaussian-blur-v1.png new file mode 100644 index 0000000..b5657ae Binary files /dev/null and b/static/effects/2d-sprite-gaussian-blur-v1.png differ