Flickering in the distance

Hello everyone,

lately I have encountered some strange behaviour of my material. The material seems to flicker in the distance and I have no idea why. I have recorded the issue…the video has very bad quality, because my laptop cannot handle ue4 editor + screen recorder at the same time, but it should be visble in the video:

So I changed the material to just some flat cubes (big grey and small black ones) to see if the problem still occures, but unfortunately its still the same. The same happens when I start a new project, with different materials and on different computers, so I can exclude that my cheap laptop isn’t the problem.

I hope someone of you can tell me why the flickering appears. Thanks in advance

Is mip mapping enabled on the texture?

There are no textures involved in my materials

Your material can only be evaluated once per pixel. If you design it so that it can only output black or a constant shade of grey, it will return only those two exact values, never anything in between. If you want it to have intermediate shades on the borders of procedural edges like those you will need to do the math to choose the desired pixel value on a gradient. How to do this depends on how you create the patterns, and might be costly. Textures are generally preferable because they can be pre-filtered to blend multiple pixel values together at a distance.

Temporal Antialiasing will help in your case, since your pattern edges are much like hard polygon edges.

I think I wasn’t precise enough. When you are talking about the left and right borders you are absolute right. But i was reffering to the irregular pattern in front of the player (at the horizon). I included two pictures to highlight what I was mentioning.

When you look at the pattern from above everything is fine, but from the perspective from the video and the pictures the pattern is irrgeular and is flickering.

That was what I was referring to. You are using a procedural pattern to generate those squares instead of a texture, which means that it has no filtering whatsoever unless you implement it yourself.

Oh I am sorry. I think I misunderstood and thought you were reffering to the left and right borders which werent very sharp either. Nevertheless I made a texture for my materials mesh and wraped it in a Post Process Volume and turned on Temporal Antialiasing, but unfortunately it didn’t help. Can you tell me what to do to get rid of the flickering?

Is that texture square power of two with mip maps enabled? You should see it blur in the distance rather than sparkle.

My texture wasn’t square power of two so i clicked pat to power of two which resulted in the bleariness in the distance, but the texture was stretched. However I used photoshop to resize my texture to a square power of two (512x512). Relating to mip maps, are you reffering to Mip Gen Settings in the category of Level of Detail? I tried some of the options there from sharpen0 - 10, FromTextureGroup, etc with no significant difference. But at least its not sparkling anymore. Now I need to get rid of the extreme blur in the distance :slight_smile:

The default setting should have mipmapping on, turning on sharpening will have some subtle effect but nothing significant. The general solution to reduce blurring is anisotropic filtering. On PC it should be on by default, other platforms have spotty support, especially mobile