Anti-aliasing on iOS

Textures flicker in iOS devices such as iPad and Mac. The anti-aliasing is switched on and works well on windows but has flickering issues in iOS. How can this be avoided? What changes in the settings can I do for the textures?

What do you mean by flicker? Can you provide a video please?

I will try to do it. It is actually the textures that look like they have anti-aliasing problem when I rotate the camera around. These textures are on a model.

That could be related to mipmapping. Many iOS devices need power of two textures for mipmapping … perhaps try and resize one of the textures to power of two (such as 512x512) with mipmapping to see if that makes a difference.

1 Like

They are all power of two and still has the same issue. Is there othe change I can make in texture settings?

Make sure the Mipmaps are ticket.
And maybe try higher level of Anisotropy, try perhaps 10.

But it could be something else as well … and screenshot / video would be good to see.

1 Like

That did work, however it is extremly performance impacting (pretty old Mac). Same scene in babylon does not have these anti-aliasing problems by default, with not high but stable fps.

Would it be possible to provide a video of the issue and/or a build/public project to look at please? We are still guessing what the issue could be at the moment

Try leaving the default Anisotropy … at 1 or 0, not sure what’s the default - this improves quality but is costly.

Mipmaps are pretty much free.

Just to double check, are you sure the texture is a power of 2 in dimensions?

eg 32, 64, 128 etc?

Add ‘yaustar’ to the project if you would like us to take a quick look

Increasing the Anisotropy to 10 actually did work but yes it is expensive. The mimaps are enabled :slight_smile: But yeah i do not see any other solution other than increasing the anisotropy.

@saifs Can you add ‘yaustar’ to the project for me to take a quick look and also a screenshot of the texture that is flickering please?

Anisotropy

Integer value specifying the level of anisotropic to apply to the texture ranging from 1 (no anisotropic filtering) to the GraphicsDevice property maxAnisotropy.

I reverted all the textures anisotropy back to 1. However the scene didn’t change. Meaning the anti aliasing still looks better, but with enormous performance impact. I remembered to clear browser cache. Idk, Safari is weird.

Can you please show us the settings on your texture, as a screenshot.

There are plenty more.

Hmm, that should be okay.

Definitely worth a look on our side.

Can you add ‘yaustar’ to the project and also a video of the flickering issue so that we know what to look for when we investigate the project?

There’s no flickering anymore and I can’t tell you why. The anisotropy of 10 fixed it and now that it’s put back to 1 it’s still fixed. Although I can see for sure that my ground texture has anisotropy set to 1.

The only issue remainings seems to be Safari. The scene lags much more in Safari than in Chrome. (Same scene in Babylon performs better in Safari, I’d like to know why).

Sadly I can’t really add someone to the project for privacy reasons.

It’s difficult or impossible to say without seeing at least a build of the app.

What do you mean by lag? Is it unresponsive or is the framerate low?

What device and iOS version are you seeing this on?

Let me PM you the builds then…

framerate is low.

macOS Big Sur 11.4
on Mac mini (2018)

Safari 14.1.1

Awesome, we take a look today :slight_smile:

1 Like