Cocos Creator v1.7.2

I will try that, Thx!

See setAntiAliasTexParameters and setAliasTexParameters here:

http://www.cocos2d-x.org/docs/creator-api/en/classes/Texture2D.html

You will find examples in the ā€œcocos-creator/engineā€ sources on the github.

Ive checked that and I see no examples on where to switch on/off antialias. And both functions you sent me have this text:

Deprecated use update function with filter options instead

And I dont know what it means with user filter options instead. Is there any doc about this @slackmoehrle?

Oops, are they deprecated?! Sorry, Iā€™m still using setAntiAliasTexParameters to enable anti aliasing for my tilemapsā€¦ I think Iā€™m going to update my codeā€¦

I can find out.

Our engineering team said:

He should use texture.update(options) instead. The API is http://www.cocos2d-x.org/docs/api-ref/creator/v1.7/en/classes/Texture2D.html#update

He can still use the old API. Like setAliasTexParameters, the engine will call update for him.
WechatIMG674

Im also having the same performance issues in 1.8 with webGL. Not sure if 1.8 has antialias already removed.

Thanks, but honestly, still dont know how to deactivate antialias in my game. I would appreciate an example. Thanks

Global - cc.view.enableAntiAlias(false)
individual - texture.setAliasTexParameters();

1 Like

Thank you! That is what I needed.

@pandamicro @slackmoehrle I have deactivated Antialias (i can clearly see it in my screenā€¦) and performance had a small improvement. I mean, from 30 fs to 40, but I see artifacts on screen. So, this confirms there are performance issues on web for 1.7-1.8 and I dont think they are related to Antialias.

I can see the low performance when I execute my game at the ā€œdefaultā€ size: 1334x750 (On Chrome, select default from drop down list). Works fine (50-60fps) with iPhone/ipad sizes. This is not happening with 1.5.2

Let me ask @pandamicro to take a look at this.

Sorry didnā€™t see the feedbacks, actually I was suggesting that you can customize your engine as my Pull Request, the way you should do it is documented here

http://docs.cocos.com/creator/manual/en/advanced-topics/engine-customization.html

cc.view.enableAntiAlias and texture.setAliasTexParameters all controls texture level filters. The performance was affected by the Canvas context configuration, which made the Canvas rendered 4x pixels by its original pixel numbers (canvas.width * canvas.height), this is the actual reason

Sorry, I dont understandā€¦ How is this related on Creator having poor performance on WebGL on versions 1.7-1.8 as I stated here Cocos Creator v1.7.2?

@jrosich lets work together on this.

1 Like

Guys, its just a bug and it will be fixed in 1.8.2.
Thanks for your assisrance @slackmoehrle!!! :smiley:

1 Like

Hi @jrosich, we just checked the commit history, it should be fixed in 1.8.0, or 1.8.1. Why did you said it will be fixed in 1.8.2?

Because i thought you were talking about performance issues and from other conversations I though you were aware of the issues and it would be fixed in 1.8.2. So it is clear that whatever you fixed in 1.8 it is not what I was talking about.