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. Dismiss Notice

Question How can I add shadow bit depth to my toon shader?

Discussion in 'Shader Graph' started by mrCharli3, Sep 10, 2023.

  1. mrCharli3

    mrCharli3

    Joined:
    Mar 22, 2017
    Posts:
    956
    I am jus starting out learning shader graph and want to keep things as simple as possible, it took me a few tries but I managed to make a really simple cel/toon shader.

    It is missing 1 feature I really want though and I cannot figure it out, it can be seen in this video and is labeled "shadow bit depth". Is there any way I can add that to my shade graph?

    upload_2023-9-10_14-2-48.png
     
  2. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,108
    This is quite custom name, his game is pixel art, so in this context he meant that his shadow has more "bits" - colors.

    In reality what he does is more like posterize node, but in general this technique is about remaping values to gradient or fixed values.
    upload_2023-9-10_15-49-32.png

    Actually he explained his own equation moment later:
     
  3. mrCharli3

    mrCharli3

    Joined:
    Mar 22, 2017
    Posts:
    956
    thank you, I realise he explained it I just didn’t know how to translate that into shader graph language. Thanks to this I now can :) Thank you!