Search Unity

Resolved Help cleaning up Toon Shader Bands [Lots of images]

Discussion in 'Shader Graph' started by JustJunuh, Sep 1, 2020.

  1. JustJunuh

    JustJunuh

    Joined:
    Jun 3, 2015
    Posts:
    52
    Hi there!

    I need a little bit of direction on how to avoid this ugly banding.

    I'm going for a Toon Link style. I'm trying to go for just two tones, and a slight fresnel effect to give the unlit area some depth.


    However, I get some undesirable results when using colored lights.




    I have two problems with my current shader graph.

    (1) I get multiple bands
    (2) I lose too much color of the light

    I want to JUST have two bands. A lit and unlit area. There can be multiple point lights that contribute to the character's lighting, but there should only ever be "lit" or "unlit."

    I've tried using just "step." But it gives me kind of mixed results. At low edge values, it's single band, but no color and seems to always have a "lit" side no matter what.



    Any thoughts or suggestions? Need to see any other settings I have?

    Thanks in advance for your help!
     
  2. ElliotB

    ElliotB

    Joined:
    Aug 11, 2013
    Posts:
    287
    I expect your step is being performed for the red, green and blue channels of the light separately, when you actually intend to do some step on some sort of 'total brightness'.

    Try passing the light RGB into a HSV node, step the 'Value' component, then convert back HSV->RGB and use that for your future light calculations.
     
    JustJunuh likes this.
  3. JustJunuh

    JustJunuh

    Joined:
    Jun 3, 2015
    Posts:
    52
    Thanks so much!! Yeah, this fixed it for me.