Infinite Lands vegetation requires a custom configuration to allow trees, rocks, and grass to appear via GPU Instancing. This means that there are some steps required to make a shader work.

As a starting point, it is recommended to use the Minimal Shader. However, let’s take a look at the diferent nodes and how to use them. Shader Graph is required.

Basic configuration

To make any shader at least render on screen you need the basic Vegetation Data node. Connecting Object Position to the Vertex/Position input will automatically make the vegetation load with the Vegetation Renderer.

minimal Node

Minimal Node

The other fields give information about the asset such as:

  • Lod_Transition returns a value between 0 to 1 informing how transparent should the mesh be.
  • Texture_Index is the exact texture index that should be sampled to get the ground color

Next you will have to create a boolean keyword and set it as shown in the picture below. Note the reference set to PROCEDURAL_INSTANCING_ON.

Minimal Keyword

Keyword

With those two additions, and creating the proper Vegetation Asset and adding it to the graph, we will start seeing our new asset across the terrain.

Result

Vegetation on screen

Painting the asset with the ground texture

All the textures used in the shaders will follow the name defined by the texture asset in code. For example by default, texture arrays should be defined with this names and they will be automatically populated.

default names

Default Names

Therefore, to load the ground albedo texture we will have to create a Texture Array variable with the correct name, and connect the Texture Index to it:

Creating the basic structure for a sampling the ground color

Final result with asset painted