Search Unity

I get this random glitch whenever i turn on the default fog in my scene. How would i fix it?

Discussion in 'High Definition Render Pipeline' started by FivedustStudios, Jun 23, 2021.

  1. FivedustStudios

    FivedustStudios

    Joined:
    Mar 8, 2021
    Posts:
    12
  2. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    The images are not visible (if there were more than one)

    I can't really understand what glitch you mean by just seeing one image.
     
  3. FivedustStudios

    FivedustStudios

    Joined:
    Mar 8, 2021
    Posts:
    12
    Here's a better look into the glitch.
     
  4. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
    If disabling fog stops all this then It looks like the material on those objects have not implemented unity's fog shader code. (I'm not a graphics programmer so this is just a guess)
     
    FivedustStudios and adamgolden like this.
  5. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,555
    You could see if using a Shader Variant Collection helps - it's possible materials are pink only when fog is enabled because the specific variant isn't being included for whatever reason. To create a variant collection, enter Play Mode and toggle your settings like fog and at the bottom of Project Settings->Graphics you can see the number of shaders and total variants next to "currently tracked" goes up as they get used in the scene. Then once you're sure you've got them all added, click "save to asset" and drop that into the "Preloaded Shaders" list.
     
    warthos3399 and FivedustStudios like this.