Search Unity

Question Smooth fog gradient in unlit black and white graphic style

Discussion in 'General Graphics' started by noseriousname, May 21, 2021.

  1. noseriousname

    noseriousname

    Joined:
    Dec 23, 2018
    Posts:
    4
    Hey Folks,

    I tried to create kind of an unlit black and white style, where the shade of gray is based on the distance of an object (a bit like in the Game Limbo, but in 3D). Actually, I'm not very experienced, but I played around with the build in fog (in lighting settings), SC Post Effects from the Asset Store and a Shader Graph which I found in a YouTube-Tutorial (
    . I also tried out linear and gamma color space, as I read in another forum post it could be helpful.

    Problem is, I always end up with a really ugly and rough gradient in my gray shades, as you can see in this short clip:


    Is there a way to get a smoother gradient? Or a better way to archive such a graphic style? Am I completely on the wrong track?

    * You can see the actual Shader Graph at this Timestamp:


    Thanks for reading and have a nice Weekend!
     
  2. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    2,266
    The video compression makes it hard to tell, but I assume you're getting slight banding artifacts?

    This is usually because the color/gradient information has 8-bit depth. Though I believe the depth texture, which you're using for fog is always 16-bit. So it may just be that the final color output displayed on the screen is 8-bit. Enabling HDR on the camera may solve this.
     
    EfremenkovAlex likes this.