Shaders
The custom shaders are located in the ShaderGraphs folder of the asset. You can use them to apply different visualizations to your grid and preview materials
Last updated
The custom shaders are located in the ShaderGraphs folder of the asset. You can use them to apply different visualizations to your grid and preview materials
Last updated
The Grid shader is used for the overall grid visualization. You can find the prefab under Prefabs → Grid → Visuals → GridVisualizationShader. This prefab is already assigned in the Game Config in the demo scene:
In The Game config you can already configure the color and the thickness of the shader
The shader itself has some more properties which you don’t really need to worry about.
The grid size is automatically handled by the Grid visualizer script attached to this prefab. Offset is not really needed since the grid visualizer already handles position the grid at the proper position.
The preview shader has only a color value and displays objects in a slightly transparent way. The Preview material assigned to the GameConfig has this shader attached. To change the color of the shader you can configure the preview colors. All colors that you can configure are applied to the same material on runtime, thus the color will change on runtime depending on the state(placement or removal) and the validity of the removal/placement action.