Help! Textures flickering Issue

Hey guys, thanks for having me, i’m really pleased to be a part of this amazing community.
I’m really stuck in a problem and I have tried various ways to solve it but alas! I need your guidance to escape out from this situation.

I’m building an endless running game using play canvas, every thing was working fine until I imported fbx of my environment and applied the texture to one of the materials.
Kindly see the below video to see the issue i’m facing:
Video Link

As you can see I have simple texture applied to the material of the road:

its material settings are simple (I have placed texture in diffuse node):

I’m facing texture flickering issue when mipmap settings of textures are turned off and if it is enabled, it somehow smooth out the edges but my pavement lines are blurred out from horizon, its even worse in mobile devices even “Device pixel ratio” is checked on. I have played around with some settings but still found no way.

Kindly guide me how to fix flickering issue without using mipmaps becuase I think anisotropy is more costly and even making it 500 on mobile devices does’t have much difference on visuals.

Unfortunately, anisotropy is the solution here or potentially use a smaller texture? 1024 x 1024 looks like it could work for the game? It’s just the nature of seeing something that small (the pattern) that far away from the camera.

1 Like

I know! but on mobile devices it looks really unnatural and it focus only when character gets really close to it.

What values have you tried? Normally, I have them in the single digits.

I tried from 1 to 500 but still no effect was seen visually on mobiles

It is an aliasing issue, and the basic theoretical solution is to either sample/render at a higher spatial frequency (that’s resolution and something that is very expensive especially for a real time rendering engine) or reduce the spatial frequency of the image you input. In short, that means applying a blur to any sharp, high contrast edges. You may find that a somewhat softer image is more tolerable than having the texture dance around. This may be even more tolerable on a handheld device. Try experimenting with different blur amounts. You might also try introducing some random noise or grain in the texture - like maybe asphalt for the road. I’d also consider blurring asymmetrically with more blur in the long direction of the stripes. No guarantees, but worth a try.

1 Like