Meterial offset according to object's position?

And how I do that?