A way to compensate UV distortion?

I am trying to do a procedural model where the mesh deforms a bit when necessary . Without re-doing textures. Like in this example. Certain texture space squeezing to the right is expected because I want the center point keep it's coordinate in texture. But how can I make top and bottom triangles keep it straight?
I appreciate any idea how can it be compensated for alredy built texture ? I can pre-bake each triangle having its own vertex color . It's sort of automatic in Blender and use colorID it as a mask plus distorted UV exr as distortion vector but what's next?
