Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. float3 posWs = mul(unity_ObjectToWorld, v.vertex).xyz;
  2. float3 normWs = mul(unity_ObjectToWorld, v.normal);
  3. float hardY = max(0.0f, posWs.y);
  4. float softY = max(0.2f, posWs.y);
  5. float softBlend = normWs.y + 1.0f;
  6. posWs.y = lerp(hardY, softY, softBlend);
  7. v.vertex.xyz = mul(unity_WorldToObject, float4(posWs, 1.0f)).xyz;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement