From 61811ac9ff5cfb012cdc93cc4174a19b7d952502 Mon Sep 17 00:00:00 2001 From: SmallMain Date: Fri, 29 Jul 2022 23:03:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=87=B3=201.2.0=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README-DEV.md | 1 - README.md | 13 ++ docs/docs/intro.md | 12 ++ docs/docs/start-guide/new-features.md | 7 + docs/docs/theory-guide/tiledmap-theory.md | 12 ++ docs/docs/update-log.md | 9 + docs/docs/user-guide/tiledmap/_category_.json | 9 + .../tiledmap/assets/tiledmap-inspector.png | Bin 0 -> 24629 bytes .../tiledmap/assets/tiledmap-nodetree.png | Bin 0 -> 8728 bytes .../user-guide/tiledmap/tiledmap-culling.md | 37 +++++ .../user-guide/tiledmap/tiledmap-intro.mdx | 12 ++ docs/docusaurus.config.js | 3 + .../inspectors/comps/label.js | 129 +++++++++++++++ .../inspectors/comps/richtext.js | 73 +++++++++ .../inspectors/comps/sprite.js | 155 ++++++++++++++++++ .../inspectors/comps/tiled-layer.js | 15 ++ extension/v1.2.0/enhance-kit-support/main.js | 3 + .../v1.2.0/enhance-kit-support/package.json | 16 ++ .../enhance-kit-support/resources/sp.meta | 12 ++ .../resources/sp/effects.meta | 12 ++ .../sp/effects/multi-2d-universal.effect | 152 +++++++++++++++++ .../sp/effects/multi-2d-universal.effect.meta | 17 ++ 22 files changed, 698 insertions(+), 1 deletion(-) create mode 100644 docs/docs/theory-guide/tiledmap-theory.md create mode 100644 docs/docs/user-guide/tiledmap/_category_.json create mode 100644 docs/docs/user-guide/tiledmap/assets/tiledmap-inspector.png create mode 100644 docs/docs/user-guide/tiledmap/assets/tiledmap-nodetree.png create mode 100644 docs/docs/user-guide/tiledmap/tiledmap-culling.md create mode 100644 docs/docs/user-guide/tiledmap/tiledmap-intro.mdx create mode 100644 extension/v1.2.0/enhance-kit-support/inspectors/comps/label.js create mode 100644 extension/v1.2.0/enhance-kit-support/inspectors/comps/richtext.js create mode 100644 extension/v1.2.0/enhance-kit-support/inspectors/comps/sprite.js create mode 100644 extension/v1.2.0/enhance-kit-support/inspectors/comps/tiled-layer.js create mode 100644 extension/v1.2.0/enhance-kit-support/main.js create mode 100644 extension/v1.2.0/enhance-kit-support/package.json create mode 100644 extension/v1.2.0/enhance-kit-support/resources/sp.meta create mode 100644 extension/v1.2.0/enhance-kit-support/resources/sp/effects.meta create mode 100644 extension/v1.2.0/enhance-kit-support/resources/sp/effects/multi-2d-universal.effect create mode 100644 extension/v1.2.0/enhance-kit-support/resources/sp/effects/multi-2d-universal.effect.meta diff --git a/README-DEV.md b/README-DEV.md index ca56818d..9beb85fc 100644 --- a/README-DEV.md +++ b/README-DEV.md @@ -55,7 +55,6 @@ ## 版本计划 - 原生平台上支持 Spine 与其它组件合批 -- tiledMap 生成的 Label 好像不能使用 CacheMode,然后考虑对其进行一些优化 - 动态图集支持预乘纹理 - 补充原理文档 - Char 模式因为 bleed 问题只能复用完全相同宽高的区域,试着增加一个选项,能够先用空纹理覆盖,之所以做选项是不知道性能消耗大不大 diff --git a/README.md b/README.md index 1c34b507..1ab7eaad 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ - [功能演示](#功能演示) - [使用方法](#使用方法) - [更新日志](#更新日志) + - [Enhance Kit v1.2.0](#enhance-kit-v120) - [Enhance Kit v1.1.0](#enhance-kit-v110) - [Enhance Kit v1.0.0](#enhance-kit-v100) - [贡献指南](#贡献指南) @@ -70,6 +71,12 @@ ## 更新日志 +### Enhance Kit v1.2.0 + +- **[新特性] cc.TiledLayer 支持复用 Culling 数据** +- [修复] 修复 MotionStreak 初始化报错的问题 +- [修复] 修复勾选延迟加载资源时资源不会加载的问题 + ### Enhance Kit v1.1.0 - **[新特性] 动态合图在符合条件的情况下会忽略 padding 将纹理加入动态图集** @@ -123,3 +130,9 @@ ### 启动 Cocos Creator 报 Error: Can not parse this input:undefined 错误 这是你可能忘记安装配套的引擎扩展,所以没有找到增强包的内置资源导致的报错。 + +### 原生平台或模拟器报错:Assertion failed: (_type == Type::String), function toString, file Value.cpp, line 496. + +这是你没有替换引擎的 `jsb-adapter` 部分,或者说没有重启以生效。 + +注意:原生平台构建时可能需要先删除原有的 build 文件,替换操作才会生效。 diff --git a/docs/docs/intro.md b/docs/docs/intro.md index 225bca5a..05ee94c8 100644 --- a/docs/docs/intro.md +++ b/docs/docs/intro.md @@ -59,6 +59,12 @@ hide_title: true ## 更新日志 +### Enhance Kit v1.2.0 + +- **[新特性] cc.TiledLayer 支持复用 Culling 数据** +- [修复] 修复 MotionStreak 初始化报错的问题 +- [修复] 修复勾选延迟加载资源时资源不会加载的问题 + ### Enhance Kit v1.1.0 - **[新特性] 动态合图在符合条件的情况下会忽略 padding 将纹理加入动态图集** @@ -112,3 +118,9 @@ hide_title: true ### 启动 Cocos Creator 报 Error: Can not parse this input:undefined 错误 这是你可能忘记安装配套的引擎扩展,所以没有找到增强包的内置资源导致的报错。 + +### 原生平台或模拟器报错:Assertion failed: (_type == Type::String), function toString, file Value.cpp, line 496. + +这是你没有替换引擎的 `jsb-adapter` 部分,或者说没有重启以生效。 + +注意:原生平台构建时可能需要先删除原有的 build 文件,替换操作才会生效。 diff --git a/docs/docs/start-guide/new-features.md b/docs/docs/start-guide/new-features.md index 054bcd73..94f072bf 100644 --- a/docs/docs/start-guide/new-features.md +++ b/docs/docs/start-guide/new-features.md @@ -57,3 +57,10 @@ skeletonComponent.setRegionData('Head', 'Head', new sp.RegionData(spriteFrame)); 虽然加上去也简单,但这可能是很少用得到的功能,主要还是我们看到几乎所有渲染组件都可以自定义材质,这个组件却不可以。 可前往 [RichText 自定义材质](../user-guide/text-render/text-richtext.md) 文档了解更多详情。 + +--- +## 复用 TiledMap 的 Culling 数据 + +一个 TiledMap 可能会有很多 TiledLayer,如果开启了 Culling,那这些 Layer 都需要单独计算 Culling 数据,增强包新增了在满足一定条件的情况下可以复用 Culling 数据的特性,以减少 CPU 的性能消耗。 + +可前往 [复用 Culling 数据](../user-guide/tiledmap/tiledmap-culling.md) 文档了解更多详情。 diff --git a/docs/docs/theory-guide/tiledmap-theory.md b/docs/docs/theory-guide/tiledmap-theory.md new file mode 100644 index 00000000..29ec69bb --- /dev/null +++ b/docs/docs/theory-guide/tiledmap-theory.md @@ -0,0 +1,12 @@ +--- +sidebar_position: 5 +description: "详细了解增强 TiledMap 的实现方式。" +--- + +# 增强 TiledMap + +:::caution TODO + +施工中... + +::: diff --git a/docs/docs/update-log.md b/docs/docs/update-log.md index 7203c088..34dc7088 100644 --- a/docs/docs/update-log.md +++ b/docs/docs/update-log.md @@ -4,6 +4,15 @@ sidebar_position: 7 # 更新日志 +--- +## Enhance Kit v1.2.0 + +适配 Cocos Creator v2.4.9 版本,[点此下载压缩包](https://github.com/smallmain/cocos-enhance-kit/releases/tag/v1.2.0) + +- **[新特性] cc.TiledLayer 支持复用 Culling 数据** +- [修复] 修复 MotionStreak 初始化报错的问题 +- [修复] 修复勾选延迟加载资源时资源不会加载的问题 + --- ## Enhance Kit v1.1.0 diff --git a/docs/docs/user-guide/tiledmap/_category_.json b/docs/docs/user-guide/tiledmap/_category_.json new file mode 100644 index 00000000..59e24f39 --- /dev/null +++ b/docs/docs/user-guide/tiledmap/_category_.json @@ -0,0 +1,9 @@ +{ + "label": "TiledMap", + "position": 5, + "collapsed": true, + "link": { + "type": "doc", + "id": "tiledmap-intro" + } +} diff --git a/docs/docs/user-guide/tiledmap/assets/tiledmap-inspector.png b/docs/docs/user-guide/tiledmap/assets/tiledmap-inspector.png new file mode 100644 index 0000000000000000000000000000000000000000..8a521293de7f21e196d7f8bbd3112e8d33c63385 GIT binary patch literal 24629 zcmeIbc|6qX`#)aCIjVD1M@}&mMUf>kvSn*S_DT$4D2A9pwlVgWQ;{t@2^CUdCOb2O z7Te5NLJY>3GL{%aLq?3{caPrZ^ZkB*@AL2PkKg0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)fN_gq-&YsBLiRbLK&%0ayXnPg8VHKioq_0!I1vF*ggntEn zB2P|Kw1c)$J|p9DYZJs}R|gmInoA~Ypqq#={@{18O+@|GelzhfEl*TXA(nqKpk_(v zLIC-|*|w^KQxserrcm0fU-48^i{>;sP*sJ|T(a3gdGppdViP<{JC!>r>bEG4Rw1ca z^<{-S>#Ky;qY9jhfT?JH2I z|I3ayg+d0V7w=F1x!Hxc0`%|yy>kwo`mj`m{O$)!C6xECeR>zkU-SP8da>(=MXCI& z)Zypr{G1)I>i=sOsGqj8>4$!jwo1U8!}_9yI9xc(DK{6rEz8H~*e`_CZplWzJ+H~plWe(cHjV+-`3gv$TN fgvy(Z-STzH1e>9}Eb!j}Y%wvkJcm8wa{K=Q*(6+` literal 0 HcmV?d00001 diff --git a/docs/docs/user-guide/tiledmap/assets/tiledmap-nodetree.png b/docs/docs/user-guide/tiledmap/assets/tiledmap-nodetree.png new file mode 100644 index 0000000000000000000000000000000000000000..d2fb68eb8ac4aff601daa54bb5e2ac0979f1a975 GIT binary patch literal 8728 zcmd^Fc|4SD+vXwV2_-!lODHvHGh-*Bh^8h)QQ5{$w#Yh`v6PavhD-_-Wh+~oC(p^)L{RU_fG}}26ogX zH5~?qKj7ecYYz+fvcNDxyO|JuZ6#m{4sx+%fJ?+ z7ozER1ibCLD0Pt%zqa)cIK^g>!&UX!*hw#KilUc0Rk?py$ESdcED@{{lqwcr(&~{^2%aE0odAx)US^Rx(mp9vu z!{vmn;TEm83lEhyZs#lexo;1B&|0)A88ecXfb2$-{V@_MsFml+ zmoz*!-Ff)2Jm{^hIPsM2xuwJh@!#{oQ<-eH^P+`_t!VA4b{wP9txr6I14 zK00%dvN~;UIxJ~dkTSlme3~%So0N@HlF!6C+jj?RSE@v^v$+HaY}HpS;L2CiNSCVm zj2ADj6+FaAZ}#PE*M`XW;q026qysOb4{rV-54SElG9 zUG_I@Pv=~_uPi{>>fnq$A78UgVsU zcu*a!Z(YL@!-dBBM6q%jbqNm1)R&)q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ap/tiledmap-culling.md b/docs/docs/user-guide/tiledmap/tiledmap-culling.md new file mode 100644 index 00000000..89ba397d --- /dev/null +++ b/docs/docs/user-guide/tiledmap/tiledmap-culling.md @@ -0,0 +1,37 @@ +--- +sidebar_position: 2 +description: "像其它渲染组件一样在 Spine 组件上使用动态合图。" +--- + +# 复用 Culling 数据 + +一个 TiledMap 可能会有很多 TiledLayer,如果开启了 Culling,那这些 Layer 都需要单独计算 Culling 数据,增强包新增了在满足一定条件的情况下可以复用 Culling 数据的特性,以减少 CPU 的性能消耗。 + +## 大致原理 + +通过为 TiledLayer 指定另一个 TiledLayer,来复用指定的 TiledLayer 的 Culling 数据。 + +## 前提条件 + +- 两者的世界矩阵(也是大小、位置、缩放等属性)一致 +- 两者所用的 Camera 一致 +- 两者的 TiledLayer 类型、属性一致 +- 确保被复用的 Layer 会更早进行渲染(否则 Culling 数据同步可能会延迟一帧) + +:::tip 注意 + +复用可以是不同 TiledMap 的 TiledLayer,但一定要满足上面几个条件,否则 Culling 结果可能不正确。 + +::: + +## 使用方式 + +假设项目中有 TiledMap 由 5 个 TiledLayer 组合成一张地图。 + +![](./assets/tiledmap-nodetree.png) + +这种情况如果需要复用 Culling 数据只需要多选后四个节点,然后将第一个节点拖入这四个节点的 `Culling Layer` 属性中即可。 + +![](./assets/tiledmap-inspector.png) + +这样就使后四个 Layer 复用第一个 Layer 的 Culling 数据了。 diff --git a/docs/docs/user-guide/tiledmap/tiledmap-intro.mdx b/docs/docs/user-guide/tiledmap/tiledmap-intro.mdx new file mode 100644 index 00000000..65511fce --- /dev/null +++ b/docs/docs/user-guide/tiledmap/tiledmap-intro.mdx @@ -0,0 +1,12 @@ +import DocCardList from '@theme/DocCardList'; +import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; + +# TiledMap + +增强包对 TiledMap 进行了优化: + +- 复用 TiledLayer 的 Culling 数据 + +你可以阅读下面的文档了解详情: + + diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 0b557422..fa162d02 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -37,6 +37,9 @@ const config = { sidebarPath: require.resolve('./sidebars.js'), includeCurrentVersion: true, versions: { + "1.2.0": { + label: "v1.2.0", + }, "1.1.0": { label: "v1.1.0", }, diff --git a/extension/v1.2.0/enhance-kit-support/inspectors/comps/label.js b/extension/v1.2.0/enhance-kit-support/inspectors/comps/label.js new file mode 100644 index 00000000..15e476dc --- /dev/null +++ b/extension/v1.2.0/enhance-kit-support/inspectors/comps/label.js @@ -0,0 +1,129 @@ +"use strict"; +Vue.component("cc-label", { + dependencies: ["packages://inspector/share/blend.js"], + template: ` + + + + + + + :multi-values="multi" + + + + + + + + + + + + + + + + + + + + + + + `, + props: { + target: { + twoWay: !0, + type: Object + }, + multi: { + type: Boolean + } + }, + methods: { + T: Editor.T, + _isBMFont() { + return this.target._bmFontOriginalSize.value > 0 + }, + _isSystemFont() { + return this.target.useSystemFont.value + }, + _hiddenWrapText() { + let t = this.target.overflow.value; + return 0 === t || 3 === t + }, + _hiddenActualFontSize() { + return 2 !== this.target.overflow.value + }, + _isCharCacheMode() { + return 2 === this.target.cacheMode.value + }, + } +}); diff --git a/extension/v1.2.0/enhance-kit-support/inspectors/comps/richtext.js b/extension/v1.2.0/enhance-kit-support/inspectors/comps/richtext.js new file mode 100644 index 00000000..568e2679 --- /dev/null +++ b/extension/v1.2.0/enhance-kit-support/inspectors/comps/richtext.js @@ -0,0 +1,73 @@ +"use strict"; +Vue.component("cc-richtext", { + template: ` + + + + :multi-values="multi" + + + + + + + + + + + + + + + `, + props: { + target: { + twoWay: !0, + type: Object + }, + multi: { + type: Boolean + } + }, + methods: { + T: Editor.T, + _isSystemFont() { + return this.target.useSystemFont.value + }, + _isCharCacheMode() { + return 2 === this.target.cacheMode.value + }, + } +}); diff --git a/extension/v1.2.0/enhance-kit-support/inspectors/comps/sprite.js b/extension/v1.2.0/enhance-kit-support/inspectors/comps/sprite.js new file mode 100644 index 00000000..30b36cf1 --- /dev/null +++ b/extension/v1.2.0/enhance-kit-support/inspectors/comps/sprite.js @@ -0,0 +1,155 @@ +"use strict"; +Vue.component("cc-sprite", { + dependencies: ["packages://inspector/share/blend.js"], + template: ` + + + + {{T('COMPONENT.sprite.select_button')}} + + + + + + + {{T('COMPONENT.sprite.edit_button')}} + + + + + +
+ + + + +
+ + + + + + + + + + `, + props: { + target: { + twoWay: !0, + type: Object + }, + multi: { + twoWay: !0, + type: Boolean + } + }, + data: ()=>({ + atlasUuid: "", + atlasUuids: "", + atlasMulti: !1, + spriteUuid: "", + spriteUuids: "", + spriteMulti: !1 + }), + created() { + this.target && (this._updateAtlas(), + this._updateSprite()) + }, + watch: { + target() { + this._updateAtlas(), + this._updateSprite() + } + }, + methods: { + T: Editor.T, + selectAtlas() { + Editor.Ipc.sendToPanel("assets", "change-filter", "t:sprite-atlas") + }, + editSprite() { + Editor.Panel.open("sprite-editor", { + uuid: this.target.spriteFrame.value.uuid + }) + }, + allowTrim() { + return this.target.type.value === cc.Sprite.Type.SIMPLE + }, + isFilledType() { + return this.target.type.value === cc.Sprite.Type.FILLED + }, + isRadialFilled() { + return this.target.fillType.value === cc.Sprite.FillType.RADIAL + }, + _updateAtlas() { + if (!this.target) + return this.atlasUuid = "", + this.atlasUuids = "", + this.atlasMulti = !1, + void 0; + this.atlasUuid = this.target._atlas.value.uuid, + this.atlasUuids = this.target._atlas.values.map(t=>t.uuid); + var t = this.atlasUuids[0]; + this.atlasMulti = !this.atlasUuids.every((i,e)=>0 === e || i === t) + }, + _updateSprite() { + if (!this.target) + return this.spriteUuid = "", + this.spriteUuids = "", + this.spriteMulti = !1, + void 0; + this.spriteUuid = this.target.spriteFrame.value.uuid, + this.spriteUuids = this.target.spriteFrame.values.map(t=>t.uuid); + var t = this.spriteUuids[0]; + this.spriteMulti = !this.spriteUuids.every((i,e)=>0 === e || i === t) + } + } +}); diff --git a/extension/v1.2.0/enhance-kit-support/inspectors/comps/tiled-layer.js b/extension/v1.2.0/enhance-kit-support/inspectors/comps/tiled-layer.js new file mode 100644 index 00000000..99993394 --- /dev/null +++ b/extension/v1.2.0/enhance-kit-support/inspectors/comps/tiled-layer.js @@ -0,0 +1,15 @@ +"use strict"; +Vue.component("cc-tiled-layer", { + dependencies: ["packages://inspector/share/blend.js"], + template: '\n \n\n ', + props: { + target: { + twoWay: !0, + type: Object + }, + multi: { + twoWay: !0, + type: Boolean + } + } +}); diff --git a/extension/v1.2.0/enhance-kit-support/main.js b/extension/v1.2.0/enhance-kit-support/main.js new file mode 100644 index 00000000..8b46fbba --- /dev/null +++ b/extension/v1.2.0/enhance-kit-support/main.js @@ -0,0 +1,3 @@ +'use strict'; + +module.exports = {}; diff --git a/extension/v1.2.0/enhance-kit-support/package.json b/extension/v1.2.0/enhance-kit-support/package.json new file mode 100644 index 00000000..9795ef8f --- /dev/null +++ b/extension/v1.2.0/enhance-kit-support/package.json @@ -0,0 +1,16 @@ +{ + "name": "enhance-kit", + "version": "1.2.0", + "description": "This extension provides support for cocos enhance kit.", + "author": "SmallMain", + "main": "main.js", + "runtime-resource": { + "path": "resources", + "name": "resources" + }, + "reload": { + "ignore": [ + "resources/**/*" + ] + } +} diff --git a/extension/v1.2.0/enhance-kit-support/resources/sp.meta b/extension/v1.2.0/enhance-kit-support/resources/sp.meta new file mode 100644 index 00000000..cdcd6b2b --- /dev/null +++ b/extension/v1.2.0/enhance-kit-support/resources/sp.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.2", + "uuid": "74663d94-6782-4dee-9db9-26127ee8b265", + "isBundle": true, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/extension/v1.2.0/enhance-kit-support/resources/sp/effects.meta b/extension/v1.2.0/enhance-kit-support/resources/sp/effects.meta new file mode 100644 index 00000000..81bd1d8b --- /dev/null +++ b/extension/v1.2.0/enhance-kit-support/resources/sp/effects.meta @@ -0,0 +1,12 @@ +{ + "ver": "1.1.2", + "uuid": "8ee63b7e-0ac8-4cb5-95f0-85278bfd748a", + "isBundle": false, + "bundleName": "", + "priority": 1, + "compressionType": {}, + "optimizeHotUpdate": {}, + "inlineSpriteFrames": {}, + "isRemoteBundle": {}, + "subMetas": {} +} \ No newline at end of file diff --git a/extension/v1.2.0/enhance-kit-support/resources/sp/effects/multi-2d-universal.effect b/extension/v1.2.0/enhance-kit-support/resources/sp/effects/multi-2d-universal.effect new file mode 100644 index 00000000..8354ecb8 --- /dev/null +++ b/extension/v1.2.0/enhance-kit-support/resources/sp/effects/multi-2d-universal.effect @@ -0,0 +1,152 @@ +// Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + +CCEffect %{ + techniques: + - passes: + - vert: vs + frag: fs + blendState: + targets: + - blend: true + rasterizerState: + cullMode: none + properties: + texture: { value: white } + texture2: { value: white } + texture3: { value: white } + texture4: { value: white } + texture5: { value: white } + texture6: { value: white } + texture7: { value: white } + texture8: { value: white } + alphaThreshold: { value: 0.5 } +}% + + +CCProgram vs %{ + precision highp float; + + #include + #include + + in vec3 a_position; + in vec4 a_color; + out vec4 v_color; + + #if USE_TINT + in vec4 a_color0; + out vec4 v_color0; + #endif + + #if USE_TEXTURE + in vec2 a_uv0; + out vec2 v_uv0; + + #if USE_MULTI_TEXTURE + in float a_texId; + out float v_texId; + #endif + + #endif + + void main () { + vec4 pos = vec4(a_position, 1); + + #if CC_USE_MODEL + pos = cc_matViewProj * cc_matWorld * pos; + #else + pos = cc_matViewProj * pos; + #endif + + #if USE_TEXTURE + v_uv0 = a_uv0; + + #if USE_MULTI_TEXTURE + v_texId = a_texId; + #endif + + #endif + + v_color = a_color; + #if USE_TINT + v_color0 = a_color0; + #endif + + gl_Position = pos; + } +}% + + +CCProgram fs %{ + precision highp float; + + #include + #include + + in vec4 v_color; + + #if USE_TINT + in vec4 v_color0; + #endif + + #if USE_TEXTURE + in vec2 v_uv0; + uniform sampler2D texture; + + #if USE_MULTI_TEXTURE + in float v_texId; + uniform sampler2D texture2; + uniform sampler2D texture3; + uniform sampler2D texture4; + uniform sampler2D texture5; + uniform sampler2D texture6; + uniform sampler2D texture7; + uniform sampler2D texture8; + #endif + + #endif + + void main () { + vec4 o = vec4(1, 1, 1, 1); + + #if USE_TEXTURE + #if USE_MULTI_TEXTURE + if(v_texId < 1.0){ + CCTexture(texture, v_uv0, o); + } else if(v_texId < 2.0){ + CCTexture(texture2, v_uv0, o); + } else if(v_texId < 3.0){ + CCTexture(texture3, v_uv0, o); + } else if(v_texId < 4.0){ + CCTexture(texture4, v_uv0, o); + } else if(v_texId < 5.0){ + CCTexture(texture5, v_uv0, o); + } else if(v_texId < 6.0){ + CCTexture(texture6, v_uv0, o); + } else if(v_texId < 7.0){ + CCTexture(texture7, v_uv0, o); + } else { + CCTexture(texture8, v_uv0, o); + } + #else + CCTexture(texture, v_uv0, o); + #endif + #endif + + #if USE_TINT + vec4 finalColor; + finalColor.a = v_color.a * o.a; + finalColor.rgb = ((o.a - 1.0) * v_color0.a + 1.0 - o.rgb) * v_color0.rgb + o.rgb * v_color.rgb; + + ALPHA_TEST(finalColor); + + gl_FragColor = finalColor; + #else + o *= v_color; + + ALPHA_TEST(o); + + gl_FragColor = o; + #endif + } +}% diff --git a/extension/v1.2.0/enhance-kit-support/resources/sp/effects/multi-2d-universal.effect.meta b/extension/v1.2.0/enhance-kit-support/resources/sp/effects/multi-2d-universal.effect.meta new file mode 100644 index 00000000..300f4f02 --- /dev/null +++ b/extension/v1.2.0/enhance-kit-support/resources/sp/effects/multi-2d-universal.effect.meta @@ -0,0 +1,17 @@ +{ + "ver": "1.0.25", + "uuid": "5dcffc18-b913-460e-a0d9-5d74f4cda12b", + "compiledShaders": [ + { + "glsl1": { + "vert": "\nprecision highp float;\nuniform mat4 cc_matViewProj;\nuniform mat4 cc_matWorld;\nattribute vec3 a_position;\nattribute vec4 a_color;\nvarying vec4 v_color;\n#if USE_TEXTURE\nattribute vec2 a_uv0;\nvarying vec2 v_uv0;\nattribute float a_texId;\nvarying float v_texId;\n#endif\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n #if CC_USE_MODEL\n pos = cc_matViewProj * cc_matWorld * pos;\n #else\n pos = cc_matViewProj * pos;\n #endif\n #if USE_TEXTURE\n v_uv0 = a_uv0;\n v_texId = a_texId;\n #endif\n v_color = a_color;\n gl_Position = pos;\n}", + "frag": "\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform float alphaThreshold;\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nvarying vec4 v_color;\n#if USE_TEXTURE\nvarying vec2 v_uv0;\nvarying float v_texId;\nuniform sampler2D texture;\nuniform sampler2D texture2;\nuniform sampler2D texture3;\nuniform sampler2D texture4;\nuniform sampler2D texture5;\nuniform sampler2D texture6;\nuniform sampler2D texture7;\nuniform sampler2D texture8;\n#endif\nvoid main () {\n vec4 o = vec4(1, 1, 1, 1);\n #if USE_TEXTURE\n if(v_texId < 1.0){\n vec4 texture_tmp = texture2D(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture\n texture_tmp.a *= texture2D(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n o.rgb *= (texture_tmp.rgb * texture_tmp.rgb);\n o.a *= texture_tmp.a;\n #else\n o *= texture_tmp;\n #endif\n } else if(v_texId < 2.0){\n vec4 texture2_tmp = texture2D(texture2, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture2\n texture2_tmp.a *= texture2D(texture2, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n o.rgb *= (texture2_tmp.rgb * texture2_tmp.rgb);\n o.a *= texture2_tmp.a;\n #else\n o *= texture2_tmp;\n #endif\n } else if(v_texId < 3.0){\n vec4 texture3_tmp = texture2D(texture3, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture3\n texture3_tmp.a *= texture2D(texture3, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n o.rgb *= (texture3_tmp.rgb * texture3_tmp.rgb);\n o.a *= texture3_tmp.a;\n #else\n o *= texture3_tmp;\n #endif\n } else if(v_texId < 4.0){\n vec4 texture4_tmp = texture2D(texture4, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture4\n texture4_tmp.a *= texture2D(texture4, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n o.rgb *= (texture4_tmp.rgb * texture4_tmp.rgb);\n o.a *= texture4_tmp.a;\n #else\n o *= texture4_tmp;\n #endif\n } else if(v_texId < 5.0){\n vec4 texture5_tmp = texture2D(texture5, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture5\n texture5_tmp.a *= texture2D(texture5, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n o.rgb *= (texture5_tmp.rgb * texture5_tmp.rgb);\n o.a *= texture5_tmp.a;\n #else\n o *= texture5_tmp;\n #endif\n } else if(v_texId < 6.0){\n vec4 texture6_tmp = texture2D(texture6, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture6\n texture6_tmp.a *= texture2D(texture6, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n o.rgb *= (texture6_tmp.rgb * texture6_tmp.rgb);\n o.a *= texture6_tmp.a;\n #else\n o *= texture6_tmp;\n #endif\n } else if(v_texId < 7.0){\n vec4 texture7_tmp = texture2D(texture7, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture7\n texture7_tmp.a *= texture2D(texture7, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n o.rgb *= (texture7_tmp.rgb * texture7_tmp.rgb);\n o.a *= texture7_tmp.a;\n #else\n o *= texture7_tmp;\n #endif\n } else {\n vec4 texture8_tmp = texture2D(texture8, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture8\n texture8_tmp.a *= texture2D(texture8, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n o.rgb *= (texture8_tmp.rgb * texture8_tmp.rgb);\n o.a *= texture8_tmp.a;\n #else\n o *= texture8_tmp;\n #endif\n }\n #endif\n o *= v_color;\n ALPHA_TEST(o);\n gl_FragColor = o;\n}" + }, + "glsl3": { + "vert": "\nprecision highp float;\nuniform CCGlobal {\n mat4 cc_matView;\n mat4 cc_matViewInv;\n mat4 cc_matProj;\n mat4 cc_matProjInv;\n mat4 cc_matViewProj;\n mat4 cc_matViewProjInv;\n vec4 cc_cameraPos;\n vec4 cc_time;\n mediump vec4 cc_screenSize;\n mediump vec4 cc_screenScale;\n};\nuniform CCLocal {\n mat4 cc_matWorld;\n mat4 cc_matWorldIT;\n};\nin vec3 a_position;\nin vec4 a_color;\nout vec4 v_color;\n#if USE_TEXTURE\nin vec2 a_uv0;\nout vec2 v_uv0;\nin float a_texId;\nout float v_texId;\n#endif\nvoid main () {\n vec4 pos = vec4(a_position, 1);\n #if CC_USE_MODEL\n pos = cc_matViewProj * cc_matWorld * pos;\n #else\n pos = cc_matViewProj * pos;\n #endif\n #if USE_TEXTURE\n v_uv0 = a_uv0;\n v_texId = a_texId;\n #endif\n v_color = a_color;\n gl_Position = pos;\n}", + "frag": "\nprecision highp float;\n#if USE_ALPHA_TEST\n uniform ALPHA_TEST {\n float alphaThreshold;\n };\n#endif\nvoid ALPHA_TEST (in vec4 color) {\n #if USE_ALPHA_TEST\n if (color.a < alphaThreshold) discard;\n #endif\n}\nvoid ALPHA_TEST (in float alpha) {\n #if USE_ALPHA_TEST\n if (alpha < alphaThreshold) discard;\n #endif\n}\nin vec4 v_color;\n#if USE_TEXTURE\nin vec2 v_uv0;\nin float v_texId;\nuniform sampler2D texture;\nuniform sampler2D texture2;\nuniform sampler2D texture3;\nuniform sampler2D texture4;\nuniform sampler2D texture5;\nuniform sampler2D texture6;\nuniform sampler2D texture7;\nuniform sampler2D texture8;\n#endif\nvoid main () {\n vec4 o = vec4(1, 1, 1, 1);\n #if USE_TEXTURE\n if(v_texId < 1.0){\n vec4 texture_tmp = texture(texture, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture\n texture_tmp.a *= texture(texture, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n o.rgb *= (texture_tmp.rgb * texture_tmp.rgb);\n o.a *= texture_tmp.a;\n #else\n o *= texture_tmp;\n #endif\n } else if(v_texId < 2.0){\n vec4 texture2_tmp = texture(texture2, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture2\n texture2_tmp.a *= texture(texture2, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n o.rgb *= (texture2_tmp.rgb * texture2_tmp.rgb);\n o.a *= texture2_tmp.a;\n #else\n o *= texture2_tmp;\n #endif\n } else if(v_texId < 3.0){\n vec4 texture3_tmp = texture(texture3, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture3\n texture3_tmp.a *= texture(texture3, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n o.rgb *= (texture3_tmp.rgb * texture3_tmp.rgb);\n o.a *= texture3_tmp.a;\n #else\n o *= texture3_tmp;\n #endif\n } else if(v_texId < 4.0){\n vec4 texture4_tmp = texture(texture4, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture4\n texture4_tmp.a *= texture(texture4, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n o.rgb *= (texture4_tmp.rgb * texture4_tmp.rgb);\n o.a *= texture4_tmp.a;\n #else\n o *= texture4_tmp;\n #endif\n } else if(v_texId < 5.0){\n vec4 texture5_tmp = texture(texture5, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture5\n texture5_tmp.a *= texture(texture5, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n o.rgb *= (texture5_tmp.rgb * texture5_tmp.rgb);\n o.a *= texture5_tmp.a;\n #else\n o *= texture5_tmp;\n #endif\n } else if(v_texId < 6.0){\n vec4 texture6_tmp = texture(texture6, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture6\n texture6_tmp.a *= texture(texture6, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n o.rgb *= (texture6_tmp.rgb * texture6_tmp.rgb);\n o.a *= texture6_tmp.a;\n #else\n o *= texture6_tmp;\n #endif\n } else if(v_texId < 7.0){\n vec4 texture7_tmp = texture(texture7, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture7\n texture7_tmp.a *= texture(texture7, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n o.rgb *= (texture7_tmp.rgb * texture7_tmp.rgb);\n o.a *= texture7_tmp.a;\n #else\n o *= texture7_tmp;\n #endif\n } else {\n vec4 texture8_tmp = texture(texture8, v_uv0);\n #if CC_USE_ALPHA_ATLAS_texture8\n texture8_tmp.a *= texture(texture8, v_uv0 + vec2(0, 0.5)).r;\n #endif\n #if INPUT_IS_GAMMA\n o.rgb *= (texture8_tmp.rgb * texture8_tmp.rgb);\n o.a *= texture8_tmp.a;\n #else\n o *= texture8_tmp;\n #endif\n }\n #endif\n o *= v_color;\n ALPHA_TEST(o);\n gl_FragColor = o;\n}" + } + } + ], + "subMetas": {} +} \ No newline at end of file