2D pixelated grass waving shader

You can watch my talk for an insight. https://www.youtube.com/watch?v=Qkhv2UWAeA8
But yes, move the top vertices of grass quads - cos(t) for wind, on collision additionally supply velocity to the shader for kinematic response. So basically v.x = cos(t) - velocity;
For the tree - grid mesh with cos(t) modification and additional dependence on position in the grid (outermost vertices bend most).
All doable in Defold, but not as elegant or efficient as in Unity or Godot.

5 Likes