Laya使用setsubpixel函数对图片进行纹理像素填充,安卓端微信不正常

小游戏 企业微信 微信支付 小程序 文章 2020-07-30 21:00 1694 0 全屏看文

AI助手支持GPT4.0

Laya使用setsubpixel函数对图片进行纹理像素填充,安卓端微信不正常
游戏引擎 AppID 操作系统 微信版本 基础库版本
LAYABOX wxf7f715623d0654df Android 7.0.15 2.11.3

如图,都是独立的png图片,一个大图填充一个小图的像素信息,pc,ios端微信,ios浏览器,安卓浏览器都是 正常的,唯独安卓端的微信小游戏不正常,会显示成不正常的纹理,有没有人知道是什么情况呢


 


不知道是否与填充图的纹理格式有关,以下是测试的关键代码:


//生成填充用的图片


urls.push({ url: ResourcesManager.inst.brush_test_green, clas:

Laya.Loader.TEXTURE2D,constructParams:[100, 100, 1, false, true]});


 


//开始填充


    public fillPlane(){


        let brush = Laya.loader.getRes(ResourcesManager.inst.brush_test_green) as Laya.Texture2D;


        let originTexture = this.plane['_render']['material']['albedoTexture'] as Laya.Texture2D;


        originTexture.setSubPixels(256,256,brush.width,brush.height,brush.getPixels());


    }

Game engine appid operating system wechat version basic library version layabox wxf7f715623d0654df Android 7.0.15 2.11.3 as shown in the figure, all are independent PNG images. A large image fills in the pixel information of a small image. PC, IOS end wechat, IOS browser and Android browser are all Normally, only the Android wechat games are abnormal, which will display abnormal texture. Does anyone know what the situation is? I don't know whether it is related to the texture format of the filling image. The following is the key code for the test: / / generate the image for filling urls.push ({ url: ResourcesManager.inst.brush_ test_ green, clas: Laya.Loader.TEXTURE2D , constructparams: [100, 100, 1, false, true]}); / / start filling public fillplane() {let brush= Laya.loader.getRes ( ResourcesManager.inst.brush_ test_ green) as Laya.Texture2D ; let originTexture = this.plane [] render']['material']['albedoTexture'] as Laya.Texture2D ; originTexture.setSubPixels (256,256, brush.width , brush.height , brush.getPixels ()); }

回答:

小游戏运营专员-宏:

你好,可以先去laya社区反馈一下这个问题。

-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
谈谈小游戏banner广告骗点击的行为
之前能够正常访问的H5项目,今天突然在微信中打不开了,打开一片空白,在微信开发者中是可以正常打开的?
查询提现状态API 返回输入商户类型非小微商户
sign not match错误的签名
微信小程序通过第三方平台获取到的token使用的时候报这个错误怎么解决
随便看看
BT面板查看网站入口、账号密码的命令 6009
ucloud海外服务器超级优惠券 3274
根据您的消费情况,您的延停权益已发生变化,变更后的延停权益为延停额度20.00元 5831
为什么我们喜欢迈克尔杰克逊。 4164
阿里云com、cn域名续费优惠码(2020年5月可用) 3586
阿里云com、cn域名续费优惠码(2020年6月可用) 3606
微信公众号开五联增值税发票怎么处理 2950
仙之侠道幻彩衣的合成和属性预览 4316
仙之侠道2.8四象玉的合成和图片属性预览 3945
仙之侠道2.8赤狱战甲合成和属性预览 3266