Cocos Creator v1.7.2

Cocos Creator v1.7.2
0.0 0

#21

I will try that, Thx!


#22

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.


#23

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?


#24

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…


#25

I can find out.


#26

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


#27

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


#28

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


#29

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


#30

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


#31

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


#32

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


#33

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?


#34

@jrosich lets work together on this.


#35

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


#36

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?


#37

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.