Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Offsetting terrain height from a texture at runtime (HDRP)

Discussion in 'Shaders' started by MrDoodleFace, May 24, 2020.

  1. MrDoodleFace

    MrDoodleFace

    Joined:
    Aug 18, 2018
    Posts:
    3
    Hey,

    Has anyone had any success offsetting terrain height at runtime from a texture, without modifying the original heightmaps? I essentially want terrain to render at a height some offset away from the height defined in the heightmap (for snow/sand trails). I've tried duping and customising the HDRP/TerrainLit, specifically, I changed ApplyMeshModification in TerrainLitData.hlsl, but haven't had any success so far. It seems that this should be the place to make this change, as it's the only place in the shader and it's includes which reads from the heightmap. Any advice?