Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Second texture for the slope on the terrain

Discussion in 'Shaders' started by Zimaell, Aug 7, 2023.

  1. Zimaell

    Zimaell

    Joined:
    May 7, 2020
    Posts:
    417
    tell me how to do the following - use the standard terrain shader but add another texture to it that will be displayed on the surface with an angle of more than 30 degrees, how to do this?
    (URP)
     
  2. Zimaell

    Zimaell

    Joined:
    May 7, 2020
    Posts:
    417
    I decided to copy the contents of the standard terrain shader and make my own changes to it, but I add the initial fields like
    Code (CSharp):
    1. [HideInInspector] _MainTex("BaseMap (RGB)", 2D) = "grey" {}
    2. _SlopeTexture("Slope Texture", 2D) = "white" {} // add <----------------------------------------
    3. HideInInspector] _BaseColor("Main Color", Color) = (1,1,1,1)
    but this field is not visible in the inspector, why?
    I would like to add some changes if possible...