[engine] 多纹理渲染 - sprite -> universal

This commit is contained in:
SmallMain 2022-06-26 23:56:01 +08:00
parent 03533b046c
commit d2a705be6d
2 changed files with 2 additions and 2 deletions

View File

@ -90,7 +90,7 @@ var builtins = {
cc.sp.MAX_MULTITEXTURE_NUM = 8; cc.sp.MAX_MULTITEXTURE_NUM = 8;
// cc.renderer.device.caps.maxTextureUnits // cc.renderer.device.caps.maxTextureUnits
this._loadMultiEffect('multi-2d-sprite', (effect) => { this._loadMultiEffect('multi-2d-universal', (effect) => {
cc.sp.multi2dSpriteEffectAsset = effect; cc.sp.multi2dSpriteEffectAsset = effect;
effect.addRef(); effect.addRef();
cc.sp.inited = true; cc.sp.inited = true;

View File

@ -26,7 +26,7 @@ export class MultiHandler {
this.material = material; this.material = material;
} else { } else {
this.material = (cc.Material as any).create(cc.sp.multi2dSpriteEffectAsset); this.material = (cc.Material as any).create(cc.sp.multi2dSpriteEffectAsset);
this.material.name = "multi-2d-sprite"; this.material.name = "multi-2d-universal";
this.material.define('USE_TEXTURE', true); this.material.define('USE_TEXTURE', true);
this.material.define('USE_MULTI_TEXTURE', true); this.material.define('USE_MULTI_TEXTURE', true);
} }