Search Unity

HDRP Terrain Shader Confusion

Discussion in 'World Building' started by racarate, May 18, 2019.

  1. racarate

    racarate

    Joined:
    Jul 14, 2012
    Posts:
    62
    I am trying to use LitLayered as my custom terrain shader, but Unity keeps complaining that this is not possible because the shader relies on tangent-space normals. I changed the shader to use object-space normals but it still complains! What is wrong here? I think I might actually give up on using the terrain system for now and just use static meshes but just for sake of curiosity how would I fix this problem?
     
  2. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
    Terrain's don't have tangents, and most shaders read tangent data from the mesh. Terrains don't need tangents because you can compute them analytically since the topology is known, so you need to use a shader which doesn't expect tangents in the mesh and computes them from the known topology.