How to create a vertex shader similar to Subway Surfers?

It flickers because original mesh goes out of camera view, its culled. And I’m not sure what size of mesh should be, make it work perfectly.
That material was just an small expreriment.

I found it in my archives and checked in 4.19.2
everything works fine.
maybe it not really accurate, but for now I don’t have a time to make any imrovements, sorry ))

here is material:

And how it works:

This mesh have size like 1000020001000 UU