Foliage Shader

Some maps in our game A Gentlemen’s Dispute include foliage made from leaf and branch cards. However, simply placing them statically in the scene made them look flat and unnatural. To bring the foliage to life, I created a custom foliage shader using Shader Graph that animates the leaves with simple noise-based motion.

Breakdown

The shader exposes two key parameters: Frequency, which controls how fast the noise moves (i.e., how often the leaves sway), and Strength, which determines how much the leaves move. Higher values represent fiercer wind, resulting in faster and more intense leaf movement. I also added a logic node that pins vertices below ground level, ensuring the base of the foliage remains static — especially useful for grass.

Foliage Shader Unity shader graph