Cocos Creator 3.2.1 artefacts on image in game

Hi all, when I import image to the Cocos Creator and set it sprite frame, I see it gets some artefacts in some places:
in the left image in cocos editor, the right - image opened in Windows.

As you see, it gets some black pixels on the border. I see it in every image I use. Thanks.

I can ask engineering when they return from national holiday. Is there any code that you can provide to help the team?

Hi, I am not using any code, I just import image to Cocos and create Sprite with sprite frame of image.

Thank you.

Hi are you using Photoshop to save png’s, I don’t run cocos I’m c++ but sound like a similar thing I had a while ago when starting out. I had to add a 1px border alpher around sprite that stops the OpenGL fight over last pixel which one is on top so if both alpher pixel it doesn’t matter. Also stop using Photoshop it produces artifices in PNG when saving if using Photoshop export to the BMP format then use gimp to convert or ImageMagick command line even better. that’s how I Solve my artefacts my images. Hope you can get it fixed.

请检查一下 texture 的 wrap mode 是否使用的 clamp-to-edge。
如果修改之后没有效果,那么建议你对 texture 资源进行扩边处理。

Hi, Thanks, I tried this, but it looks the same:

Well, then you can try the edge expansion method provided above.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.