Nature Renderer is a rendering engine that can render vast amounts of detail objects for your terrains. It replaces Unity's terrain detail system with a high-performant renderer that uses instancing and compute shaders to get the most performance out of your GPU.
Nature Shaders is closely integrated with Nature Renderer and fully supports all of its features. You can use Nature Shaders as the shaders for your vegetation, and then render the vegetation on your terrain using Nature Renderer to make use of its high performance.
The integration with Nature Renderer supports the following features:
- Procedural Instancing
- A fast rendering technique used by Nature Renderer. It allows to render thousands of objects in a single draw call using new GPU rendering techniques. Nature Shaders has support built-in for all shaders.
- Culling and Fading
- Smooth fading and culling for detail objects. Nature Shaders integrates with Nature Renderer and applies the culling distances from Nature Renderer to the shaders. The result allows for smooth fading-out of terrain detail objects in the distance.
- Color Variations
- The color settings from the terrain detail objects are correctly loaded and applied to the materials. This allows for color variation for terrain detail objects.
The integration with Nature Renderer is enabled by default.
Prefabs that are used as detail objects do not require any additional setup. Materials that use Nature Shaders are automatically detected by Nature Renderer and the correct settings are loaded and applied.
2D Grass Textures
Using all of Nature Shaders' features for detail objects that are added as 2D Grass Textures requires an additional step. By default, Nature Renderer uses an internal material with default settings for the 2D grass textures. To manually edit the material and enable more features such as interaction, you'll need to provide a custom material:
- Create a new material in the project and assign the "Nature Shaders/Grass" shader.
(See the Material Setup article for a step-by-step guide on how to set up a material.)
- Ensure that "Baked Mesh Data" is enabled for the material. Nature Renderer automatically bakes the mesh data for detail objects.
- The texture of the detail object will be automatically assigned as the Albedo texture for the material, so there is no need to assign any texture.
- Assign this material to the Material Override field of the Nature Renderer component. Doing so will ensure that the material is used for all 2D Grass Textures.