Flickering issue while moving units using the WPO. Video and file:

Im stuck with an issue for 1 week now. I moving HISM using the World Position Offset.

Unfortunately this doesnt move the bounds of the mesh, so if you move it too much to the front at some point it will think the mesh is not in the screen and will not render it.

To fix this, i made sure every 200 frames, the mesh location is updated when moving. So its moving using the wpo 99% of the time. However, when i update the position, there is a weird flickering that i cant prevent from happening.

And that completely ruins the day. This happens because i call a function that sets the position of the mesh back to the WPO fake position. And then reset the WPO to 0, 0, 0.

This causes this weird flickering. But if its just all in one tick, it shouldnt flicker like that. I dont know what can i do to fix this.

Can anyone help me?

Here is the project file:

Video showing the little flickering:

Bumpity bump? BUMP

I have a simple plane which i bend using vertex deformation (WPO) and i get the same flickering. My calculations can run into a division by zero or something close. This is causing the flickering- interestingly the same calculation works fine in a GLSL shader in a different program.

It seems as if there is some sort for check performed on the world position offset which may invalidate the intermediate results but this is pure speculation on my side.

1 Like

I was able to solve my issue by adding some random noise the calculation inputs. Everything else i tried (like working around the divide by zero case) failed. Chances are this could help you as well.

1 Like

Thanks. I tried so many things while trying to solve this problem, and could not solve it at the time.
At first I ended up having to not use any anti-aliasing. Which was not good.
The problem is specifically with the TSAA.
For a while i worked my game with AA as None.
Eventually someone told me to use MSAA with Forward Shading. And that solved the problem, and its better than None.
So you could also give this a go, and see if its better in your case.
Could you please elaborate more on how you added “noise”? You mean in the material itself?
Can you please post a little screenshot?

My issue is/was not related to AA at all- i tried all the different techniques and the issue remained unchanged (mesh dissappearing/reappearing for a short time).

This is my workaround:

I am adding a random 2D noise, generated by UVs to the input value.