Brush face leakage in texture painter

Hi, I am making a texture painter. How should I implement face leakage (basically scaling triangles)? I am currently sending the midpoints of all the uv triangles and then doing the scaling in the vertex shader. But, it doesn’t seem like that’s how blender does it. Any other way to do it?