What is the progress, can you move any grass yet, in any form?
//Animate grass float height = clamp(IN.pos.z, 0, 100) / 100; float2 wind = WindVec / 6; half3 eyevec = normalize(EyePos.xyz - IN.pos.xyz); float2 pos_ticks1 = worldpos.xy / 1000 + ticks; float2 pos_ticks2 = worldpos.xy / 750 + ticks * 2; float2 pos_ticks3 = worldpos.xy / 500 + ticks * 3; float2 pos_ticks4 = worldpos.xy / 250 + ticks * 4; float2 bend_ticks1 = worldpos.xy / 100000 + 1; float2 bend_ticks2 = worldpos.xy / 75000 + 1 * 2; float2 bend_ticks3 = worldpos.xy / 50000 + 1 * 3; float2 bend_ticks4 = worldpos.xy / 20000 + 1 * 4; worldpos.xy += ( sin(pos_ticks1) + cos(pos_ticks2) + sin(pos_ticks3) + cos(pos_ticks4) ) * height * wind * 10; if ( gdist < 200 ) { //remove wind - why not? :) worldpos.xy -= ( sin(pos_ticks1) + cos(pos_ticks2) + sin(pos_ticks3) + cos(pos_ticks4) ) * height * wind * 10; worldpos.xy += ( sin(bend_ticks1) + cos(bend_ticks2) + sin(bend_ticks3) + cos(bend_ticks4) ) * height * (1/gdist) * 15000; }
//Animate grass float height = clamp(IN.pos.z, 0, 100) / 100; float2 wind = WindVec / 6; half3 eyevec = normalize(EyePos.xyz - IN.pos.xyz); float2 pos_ticks1 = worldpos.xy / 1000 + ticks; float2 pos_ticks2 = worldpos.xy / 750 + ticks * 2; float2 pos_ticks3 = worldpos.xy / 500 + ticks * 3; float2 pos_ticks4 = worldpos.xy / 250 + ticks * 4; float2 bend_ticks1 = worldpos.xy / 100000 + 1; float2 bend_ticks2 = worldpos.xy / 75000 + 1 * 2; float2 bend_ticks3 = worldpos.xy / 50000 + 1 * 3; float2 bend_ticks4 = worldpos.xy / 20000 + 1 * 4; worldpos.xy += ( sin(pos_ticks1) + cos(pos_ticks2) + sin(pos_ticks3) + cos(pos_ticks4) ) * height * wind * 10; if ( gdist < 200 ) { //remove wind - why not? :) worldpos.xy -= ( sin(pos_ticks1) + cos(pos_ticks2) + sin(pos_ticks3) + cos(pos_ticks4) ) * height * wind * 10; worldpos.xy += ( sin(bend_ticks1) + cos(bend_ticks2) + sin(bend_ticks3) + cos(bend_ticks4) ) * height * (1/gdist) * 15000; }