Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Fog not working on Shader Graph's Unlit?

Discussion in 'Shader Graph' started by dispatt, May 1, 2023.

  1. dispatt

    dispatt

    Joined:
    Aug 28, 2021
    Posts:
    2
    Hi, I've been working in a project recently and made a shader that changes the plants colors based on its position, for this shader i used a Unlit Material on Shader Graph, but weirdly this does not work the same as the URP Unlit Shader in a way that appears to ignore Fog (Unity's default enviroment fog on the lighting options)

    I'm kinda new to using Unity, so I'm not sure if this is intended or if there's a way to make it behave the way I want. I searched online but couldn't find any information about it : (

    Any other solution to this is highly appreciated too <3

    Here is an example, left plant is URP's Unlit and right is Shader Graph Unlit option.

     
  2. rob11

    rob11

    Joined:
    Mar 7, 2017
    Posts:
    57
    You will have to sample the fog yourself as Unlit Shader graph do not sample the fog for reasons I ignore.

    See how here
     
  3. dispatt

    dispatt

    Joined:
    Aug 28, 2021
    Posts:
    2
    Thanks it worked!