UV Deformation

I remember a way of deforming the UV of a texture in UDK using a normal map and I was wondering, can we do the same in Unity?

I’ve been trying to mess around with the shaders but everytime i try to add a multiply or an additive to a texture UV it just tells me to **** off, saying “*” is not valid there.

In the end, the effect that I’m looking for is distortion of the texture using a normal map and since it was pretty straight forward in UDK, I suppose one of you guys must have done this before!

Well I got it working this way :

IN.uv_MainTex = IN.uv_MainTex + IN.uv_MainTex * (UnpackNormal(tex2D(_BumpMap , IN.uv_BumpMap)/2 + tex2D(_BumpMap2 , IN.uv_BumpMap2)/2)/50);
fixed4 tex = tex2D(_MainTex, IN.uv_MainTex);

The /50 in the end simply reducing the distortion because it was way too strong.

Maybe its not the best way to do it but it works like a charm, mixing 2 bumps and distorting the texture. All I had to do after was slide both bumps with Javascript and I could make myself some pretty water even in Unity Free.