I'm trying to blend the position of the verts in my object from their object position to a arbitrary position defined within the shader, For simplicity sake i'll use 0,0,0. So the idea is to have all verts move to that point. I was hoping to use a simple lerp function ala v.vertex = lerp(v.vertex, float4(0,0,0,0),_Amount); but this doesn't work. nothing happens while the amount is less than 1, and the mesh disappears (i presume all verts go to 0, when the amount is above 1) Anyone know why you cant lerp the vert positions?
Try just lerping the xyz... the w component should remain 1 for matrix multiplication's sake. Code (csharp): v.vertex.xyz = lerp(v.vertex.xyz, float3(0,0,0),_Amount);