Stretching Vertex Material Issue When Scaling

Hello!

To explain what I’m trying to achieve here, I’m wanting to scale a cube on the Z to extend outward to create extending platforms. However, there’s an issue with the ends of the cube material not keeping the scale with the cube when scaling the mesh.

I’ve attached the images of the material and the results of what happens. If anyone could help, that would be spectacular :)!!!

I managed to find the solution by adding a clamp on the top and bottom parts of the vertex shader. I engineered it on the backend to increase the VScale every 0.25% every scale iteration. Hope this helps anyone having this issue as well