cocos / cocos-engine

Cocos simplifies game creation and distribution with Cocos Creator, a free, open-source, cross-platform game engine. Empowering millions of developers to create high-performance, engaging 2D/3D games and instant web entertainment.
https://www.cocos.com/en/creator
Other
6.98k stars 1.8k forks source link

WeChat mini-game loads 1-channel images and displays an exception #17007

Open qiuguohua opened 4 months ago

qiuguohua commented 4 months ago

Cocos Creator version

3.8.3 3.8.2

System information

wechat

Issue description

WeChat mini-game loads 1-channel images and displays an exception

Relevant error log output

No response

Steps to reproduce

1, New empty scene 2, create a new sprite 3, load a 1-channel picture 4, build a wechat mini game,

Minimal reproduction project

No response

finscn commented 3 months ago

出错的图片是什么样的? 有截图吗

qiuguohua commented 3 months ago

image 类似这样的

finscn commented 3 months ago

和我遇到的bug 一样 https://github.com/cocos/cocos-engine/issues/17005 . 我的某些图片 也是你这个样子.

image
qiuguohua commented 3 months ago

@finscn 微信那边已经定位到问题了,在后续的版本里面会进行修复,可以通过premultiplyAlpha = true 来暂时规避这个问题。

qiuguohua commented 3 months ago

测试可能要等微信那边解决之后才能测,不确定他们什么时候修复。

finscn commented 2 months ago

@finscn 微信那边已经定位到问题了,在后续的版本里面会进行修复,可以通过premultiplyAlpha = true 来暂时规避这个问题。

3.8 在哪里设置 premultiplyAlpha = true ?

qiuguohua commented 2 months ago

@finscn 我用微信试了下,微信好像已经解决了。

finscn commented 1 month ago

@finscn 我用微信试了下,微信好像已经解决了。

我看了下, 我这里没有解决. 你是ios什么版本的微信 ?

qiuguohua commented 1 month ago

@finscn 不好意思,我弄错了,我用android平台测试的。这个issue没有标注平台,忘记了。

我看了下,是需要修改引擎代码:

image 把这个地方改成true试试

finscn commented 1 month ago

@finscn 不好意思,我弄错了,我用android平台测试的。这个issue没有标注平台,忘记了。

我看了下,是需要修改引擎代码:

image 把这个地方改成true试试

但是改了这个会有其他问题吧? 图非预乘和预乘 两种情况下, 后期使用的 shader 和 blend模式 完全不一样. 一个图片 明明不是 预乘的, 为了解决这个bug 强制设置成 预乘, 可能会解决了这个问题, 但是会带来其他问题.

希望你们官方还是可以督促下 微信去解决. 我们小研发人微言轻, 微信估计都不搭理我们.

finscn commented 1 month ago

另外 希望能把这个issue重新打开. 这样让其他有类似问题的朋友 也能看到和关注下.

qiuguohua commented 1 month ago

好的