Stylized Grass Shader Documentation

Stylized Grass Shader

Stylized Grass Shader
Author: jonathan
Version: 1.1.9
Dated: 31 Aug 2019

5.Third party integrations #

Vegetation Studio (Pro)

By default, the shader is configured to use Vegetation Studio’s “Instanced Indirect” rendering (this has no effect if not installed).

When selecting a vegetation item using this shader, a “Stylized Grass” tab will be available. This allows you to override specific material parameters for the item.

Note that some parameters, like the lighting mode or other feature toggles, aren’t available here. For these changes to become active, refresh the vegetation item. This will also revert all parameter overrides.

Nature Renderer

When NR is active, the shader will start to listen to its wind controller. The wind strength values on the material will be multiplier by NR’s wind strength.

To use Nature Renderer’s “Procedural Instancing”, the shader has to be configured to do so. The shader can only use one integration at a time.

It’s best to perform this action while Nature Renderer isn’t already active and using the shader. Otherwise it requires to close and re-open the scene.

You can find the option to switch at the bottom of the grass material:

For Nature Renderer to work, the shader library must be present at Assets/Visual Design Cafe/Nature Shaders/Common/Nodes/Integrations/Nature Renderer.cginc. If this isn’t the case, you can modify the StylizedGrassShader.shader file and replace/modify all occurrences of the line #include "Assets/Visual Design Cafe/Nature Shaders/Common/Nodes/Integrations/Nature Renderer.cginc" with the filepath that’s correct in your project

Note that this modifies the grass shader file itself, so it’s not an option on a per-material basis.

GPU Instancer

This also requires to switch integrations as outlined above. Enabling this will allow you to use the terrain detail system with any of the included prefabs.

For GPU Instancer to work, the shader library must be present at Assets/GPUInstancer/Shaders/Include/GPUInstancerInclude.cginc. If this isn’t the case, you can modify the StylizedGrassShader.shader file and replace/modify all occurrences of the line #include "Assets/GPUInstancer/Shaders/Include/GPUInstancerInclude.cginc" with the filepath that’s correct in your project

Curved World 2020

Support for this has been added in version 1.1.1, and has to be activated through the “Activator” tab in the Curved World window. It should point to the Assets\Stylized Grass Shader\Shaders folder.

After which, options will appear in the material UI under the “Vertices” tab.

Grass bending is not supported, this will continue to use a “flat” representation of the world

Yes No Suggest edit
Last updated on August 5, 2021
3 of 4 users found this section helpful
Suggest Edit