Guide: Unity Grass Shader

Guide: Unity Grass Shader

Take a look at a Unity guide by Erik Roystan Ross on how to set up a grass shader.

Take a look at a Unity guide by Erik Roystan Ross on how to write a geometry shader to generate blades of grass from an input mesh’s vertices, and use tessellation to control the density of the grass.

via Gfycat

The tutorial shared on the artist’s personal website will show you how to write a grass shader for Unity. “The shader will take an input mesh, and from each vertex on the mesh generate a blade of grass using a geometry shader. To create interest and realism, the blades will have randomized dimensions and rotations, and be affected by wind,” pointed out the artist.

Please note that in order to control the density of the grass, tessellation will be used to subdivide the input mesh. The grass will be able to cast and receive shadows.

You can find the guide and project files here.

Join discussion

Comments 0

    You might also like

    We need your consent

    We use cookies on this website to make your browsing experience better. By using the site you agree to our use of cookies.Learn more