Search Unity

Question HDRP Layered Lit Tesselation Shader - No Triplanar Mapping?

Discussion in 'High Definition Render Pipeline' started by DS2-Donelan, Apr 15, 2021.

  1. DS2-Donelan

    DS2-Donelan

    Joined:
    Oct 28, 2020
    Posts:
    13
    Hi, I am using the Layered Lit Tesselation shader to add craters to a surface.

    I noticed that textures seem to be stretched along the vertical axis due to the displacement map but I don't see any options for triplanar mapping. Do I need to add this functionality to the shader manually or did I miss it somewhere?

    Heres what my craters look like so far.

    upload_2021-4-15_11-51-38.png
     
  2. DS2-Donelan

    DS2-Donelan

    Joined:
    Oct 28, 2020
    Posts:
    13
    Looks like I missed the option in the documentation. I can change the UV mapping of each layer but it doesn't seem to be happy that I have my heightmap on the base layer and my textures on separate layers. Setting triplanar projection for the base layer gives me this:

    upload_2021-4-15_12-2-39.png

    And setting it for non-base layers gives me this:

    upload_2021-4-15_12-3-6.png

    I will try to fix it and post my results in case anyone stumbles across the same issues.
     
    Last edited: Apr 15, 2021
  3. DS2-Donelan

    DS2-Donelan

    Joined:
    Oct 28, 2020
    Posts:
    13
    update for anyone watching this thread:

    I fixed some issues with my UV mapping, now I have my height/splat maps mapped to UV1 (I do NOT want these to tile) and general textures that I want to tile across the entire surface mapped to UV0.

    Trying to use triplanar mapping for any of the three layers that arent the main layer should not have any affect on my height/splat information, which are on the main layer and layer mask (under "surface inputs"), AFAIK, but it does.

    If I use the exact same setup except I toggle my dirt layer from "UV0" to triplanar the heightmap seems to be masked wherever the dirt layer is showing.

    Heres what it looks like when I have my dirt layer mapped to UV0:
    upload_2021-4-21_14-20-55.png

    ... and heres what it looks like if I change UV0 to Triplanar:
    upload_2021-4-21_14-21-54.png

    I don't understand why this has any effect on the height information. The heightmap is on my main layer, mapped to UV1, and the dirt layer has Heightmap influence set to 1.

    Any thoughts or help would be appreciated.

    upload_2021-4-21_14-25-14.png upload_2021-4-21_14-26-42.png
     
  4. DS2-Donelan

    DS2-Donelan

    Joined:
    Oct 28, 2020
    Posts:
    13
    I can also see that my height information is still in the correct position, because if I offset my heightmap a little bit I can see the bumps come out from underneath the dirt patch.

    upload_2021-4-21_14-29-17.png
     
    Ruchir likes this.