charliebratches / Grass-Shader

A grass shader I wrote for Unity inspired by Zelda: Breath of the Wild.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implementation of a GPU grass shader in Unity with fancy scripting features. See it in action here: https://twitter.com/CharlieBratches/status/1258572353174372352.

Inspired by the tech seen in Zelda: Breath of the Wild.

Cool gif

Features include:

  • Splat mapping to control height & color.
  • An additional splat map to control masking.
  • Dynamic wind direction accessible through an API. Wind intensity & direction can be controlled in the scene. See the example script WindManager.
  • Interactivity! If your character walks through the grass, it will bend away from their position. Supports multiple interactive objects at once.
  • Automatic slope masking. (grass won't appear on very steep terrain)
  • Supports your custom grass/plants/flowers/whatever textures with alpha channels (note, if you use a custom texture with a transparency channel, turn shadows off for best performance and to prevent artifacts)
  • Easy to set up. Just throw the prefab in your scene and tweak away.

More Screens: 1 2 3

About

A grass shader I wrote for Unity inspired by Zelda: Breath of the Wild.


Languages

Language:C# 99.3%Language:ShaderLab 0.5%Language:HLSL 0.2%