Syncing texture offset with transform position

So I have a running track in my scene, I’m moving the obstacles with transform.position, the track lines are a texture on a quad and I’m moving them by offsetting the texture in the material. The problem is I can’t seem to find an equation to calculate the texture offset speed to sync the track lines with the obstacles on different size screens. That happens because I’m stretching the track lines to match the width of the screen. I have found a specific speed that syncs them (for 2048*1024 resolution), but as I said, on different screens, they fall out of sync.
Here is what I tried so far:

private void Start()
        {
            _knownSpeedRatio = _speed / (2048f / 1024f / transform.localScale.x);

            _stretchToScreen.Stretch();

            _finalSpeed = _knownSpeedRatio * ((float)Screen.width / Screen.height / transform.localScale.x);
        }

Well after two days of trying solutions, and finally posting here, I’ve found the answer two minutes later, of course.

Here is the code in case anyone needs it:

float goodRatio = 2048f / 1024f;
float currentRatio = (float)Screen.width / Screen.height;
_goodSpeed /= currentRatio / goodRatio;