What is this in my game view? Aliasing?

I tried recording it but it’s not super apparent in the video except for when in movement.
I get some flickers on my 2d props in my game view, I’m at Ultra with msaa x8 so it shouldn’t aliasing. What should is this thing?

As I understand it “aliasing” on a texture is not the same thing as jagged edges on geometry. Could be due to scaling your textures? These two threads might point you in the right direction.

You can most likely get rid of it with multisampling AA, if you use no or the post process aa those artifacts are normal.
This post explains it well: Jagged edges with antialiasing script on HTC Vive eye camera - Unity Engine - Unity Discussions

If these are sprites, MSAA is unlikely to help. MSAA works on geometry edges and won’t do anything for texture or shader aliasing. Most post process anti-aliasing (FXAA / SMAA) will help with spatial aliasing, but not temporal aliasing, which is what you’re seeing here. Temporal anti-aliasing might help, but should be unnecessary for 2D.

We’d need to know more information on your texture import settings and what materials you’re using. If you’re disabling mip maps, for example, that could cause this.

2 Likes

I set up my project as 2d and I didn’t change the import settings. Looking at the forum threads by sdutter I think I got the right options except for one thing: My textures are not a power of two. I tried all the filter modes it didn’t change anything.

Changing the dropdown called Non Power of 2 to anything but none makes my props disappear in the scene I created. (My Sprite renderer component won’t allow the sprites with any Non Power of 2 options other but None in them).
Here’s the settings of 2 of my rocks. Only 2 textures have this warning message: "Only textures with with/height being multiple of 4 can be compressed to BC7 format. But the flickering also happens on those who don’t have that warning.

Since I’ll end up with many sprites in my project I thought I would cut up the sprites as small as possible and then use Unity’s new SpriteAtlas to eventually get them all on a single sprite sheet. Which naturally would be in a power of 2. I could leave them bigger since the alpha transparency determines how the sprite sheet will be cut up but my project will have a bigger size because the original sprites are heavier, maybe I shouldn’t worry about that however.

That’s what I thought about MSAA, it’s for 3d geometry and not for textures but I wasn’t sure thanks for pointing that out!


You should have generate mip maps enabled unless you’re absolutely sure a sprite is only ever rendered at 1:1 pixel ratio. That is the cause of the aliasing artifacts you’re seeing.

1:1 ratio is related to scaling or texture size? Because I think I always scaled uniformly my sprites (for example: scale = (1.2, 1.2, 1.2) in (x,y,z).
Mip maps fixed it mostly anyway! I still see it a bit on some props ( on the flying rock). I thought that was a 3d thing too, it must be because my camera is in perspective?

Thanks for the advice guys :slight_smile:

Here’s what it looks like now (sorry forgot to cut the music):

https://www.youtube.com/watch?v=ogYjo7moJMo

I mean is your 1024 pixel wide sprite texture always being displayed across exactly 1024 on screen pixels. Anything less and with out mip maps you’ll get aliasing.

2 Likes