Stylized Grass Shader Documentation

Stylized Grass Shader

Stylized Grass Shader
Version: 1.3.0

7.Blending with terrain colors #

The grass has the ability to seamlessly blend in with the underlying terrain’s color. This can also be seen in many AAA games nowadays.


  • Only one color map can be active at a time, and affects all grass materials globally.
  • Because a texture is required to be baked, the maximum viable terrain size is 4x4km, requiring an 8K color map (yielding 2 texels per unit).
  • If you are using a terrain shader which differs from standard shading (eg toon/flat shading) the color blending cannot be accurate. Both the grass and the default terrain shader share the same lighting model, which is part of which makes the blending possible.
  • It works best when the terrain materials don’t have a lot of high-frequency details.
  • Glossiness of terrain materials (eg wet stone or puddles) cannot be blended into the grass, since these effects depend on the viewing angle.


The following steps can be followed to set this up:

  • Select a GameObject (or create an empty one) and go to Add Component -> Stylized Grass -> Color Map Renderer

  • Assign your terrain GameObjects (these can also be mesh terrain tiles)
  • Set the size of the render area. Or choose to calculate it based on the total terrain size.
  • Click the Render button

In order for the color map to apply at runtime, this Color Map Renderer component must be present. Alternatively, you can save the color map asset and assign it to an active Stylized Grass Renderer component.

The grass shader has a “Colormap Strength” parameter. If this is set to 0, the color map will not be visible on the material.

The rendering functionality only works as an editor tool, so can’t be executed at runtime. Therefore it’s not suitable for runtime generated terrain

Yes No Suggest edit
Last updated on June 4, 2022
7 of 8 users found this section helpful
Suggest Edit