Hello fellow Godoters,

I recently found a nice shader, created for unity that went around latley.
Since I like Godot a lot, I decided to recreate the shader and share it with you.
It is a bush and tree shaders, where a nice foliage can be created with minimal effort.

This is how it looks.

You can find the code here:
https://github.com/FaRu85/Godot-Foliage

It is a combination of three shaders:
Base Shader idea:
-Pontus Karlsson
-

Coloring:
-Victoria Zavhorodnia
-

Wind Behavior:
-Rainware
-

Hopefully it is of any use to someone.

Cheers
FaRu

[Edit]
To add some general Information:

  • Mesh must be in general shape of bush or tree.
  • Mesh must be quad elements only.
  • UV of each polygon should be a filled square
  • UV2 -X-coordinate is used to rotate the faces randomly, to give a more natural look.
  • Red-channel from texture is used as alpha and should be in shape of leaves
  • colors can be set in the shader

    Thank you for this shader. I might be able to make use of it some time far into future.

    3 years later

    FabIV This is amazing. Thank you so much!
    Using this on Godot 4.4