Watch 6 Star 12 Fork 7

ZhitaoCai / CocosCreatorShaderEffectDemoTypeScriptMIT

Join us
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
Cocos Creator v2.3.0 & v2.2.2 & v2.2.1 版本 Shader Effect Demo(边学边写) spread retract

Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

Cocos Creator Shader Effect Demo

一、项目说明

  1. 此项目为我在学习过程中的一些分享和实现,因此项目名字以 Demo 为后缀。
  2. 项目重点在于 「渔」,不在于 「鱼」
  3. 如果你有意将此Demo中的效果加入到你的项目中,请认真评估是否适合你的项目使用!
  4. 本项目支持 Cocos Creator v2.3.0v2.2.2v2.2.1
    1. 项目当前正在使用 v2.3.0 开发
    2. 由于2.3.0和2.2.2,2.2.1差别较大,因此,master分支的最新项目已经无法在2.2.1,2.2.2中重新打开,如果确实需要在 2.2.1,2.2.2 中打开,请先切换到旧版本的tag(0.8.0),才能用 2.2.1,2.2.2打开

二、系列文章

那么现在,我们先来轻松地看下有哪些特效效果吧~

三、特效预览

内发光(实现原理

马赛克/像素化(实现原理

老照片(实现原理

灰度渐变(实现原理同老照片一样,可参考老照片实现原理文章

点光(实现原理)(2020.01.12更新)

扫光(实现原理同点光一样,可参考点光实现原理文章)(2020.01.13更新)

圆角裁剪-v1(2020.01.17更新)

此版本存在局限性:只有在正方形纹理上,才能裁剪出圆角,在非正方形上,无法裁剪出圆角,具体变现为有拉伸效果

如:下面GIF中第3到5秒演示所示,黄色和红色的非正方形纹理的圆角明显被拉伸

圆角裁剪-v2(2020.01.17更新)

圆角裁剪-v1 的原理基础上,新增支持任意宽高纹理的圆角裁剪

如:下面Gif中第3到5秒演示所示,黄色和红色的非正方形纹理也能裁剪出圆角效果

高斯模糊-V1(实现原理)2020.02.07更新)

外发光(完善中...)

外描边(完善中...)

四、TODO

  • 图像模糊
  • 波浪
  • 雨滴
  • ...

五、支持一下作者吧

如果此项目对你学习和理解Shader有帮助,不妨支持一下我吧~

ps:支持扫码催更哦🤣🤣🤣👇👇👇👇

LICENSE

MIT License

Copyright (c) 2020 Zhitao Cai

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Comments ( 1 )

Sign in for post a comment

TypeScript
1
https://gitee.com/zhitaocai/CocosCreatorShaderEffectDemo.git
git@gitee.com:zhitaocai/CocosCreatorShaderEffectDemo.git
zhitaocai
CocosCreatorShaderEffectDemo
CocosCreatorShaderEffectDemo
master

Help Search