Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Locale fog terrain fit

Discussion in 'High Definition Render Pipeline' started by lacas8282, Nov 11, 2023.

  1. lacas8282

    lacas8282

    Joined:
    Apr 25, 2015
    Posts:
    134
    Hello!
    I just using local fog with a custom material, shadergraph.

    I have a very big terrain, layermask is Ground. Lets say it is 5000 unit width and 40 units in Z, and height 500 unit.

    So I put a local fog width 5000 unit width, 40 z, 500 height to fit the box the terrain.

    1, is it expensive or is it a good solution?
    2, my terrain is a custom terrain, but the height is changing. How can I do a terrain fit to my local fog somehow? (Like raycasts) In the shadergraph? How?

    Thanks,
    Leslie
     
  2. Misaki_eKU

    Misaki_eKU

    Joined:
    May 3, 2018
    Posts:
    86
    You can use the height map of your terrain in shader graph to make the height of the fog increase and decrease.
     
  3. lacas8282

    lacas8282

    Joined:
    Apr 25, 2015
    Posts:
    134
    How to exclude objects, like a house from hdrp volumetric fog?

    And how to follow the fog my terrain?
    Lets say I have a custom terrain that has a sinus on it?