Search Unity

Help Wanted Questions regarding new ShaderGraph Unity Blog Post (toon shading examples)

Discussion in 'Shader Graph' started by alanmthomas, Aug 15, 2019.

  1. alanmthomas

    alanmthomas

    Joined:
    Sep 7, 2015
    Posts:
    173
    I've downloaded and gone through the various graphs in the new samples posted in the Custom Lighting blog post (found https://blogs.unity3d.com/2019/07/31/custom-lighting-in-shader-graph-expanding-your-graphs-in-2019/ if you haven't seen it). The whole thing is based on the premise of using the unlit shader and essentially recreating the lighting information. In the process, it seems that we lose the whole shadow casting pass. My first question is whether there might be some way to use this approach but also maintain the shadow pass.

    My other question is in regards to how the ramping on the shadows is handled. The approach in these samples creates a clear distinct line between the shaded and unshaded parts of an object. How would one go about setting up a variable so the one could smooth that line and blur the ramping?

    Any help is appreciated.
     
  2. alexandral_unity

    alexandral_unity

    Unity Technologies

    Joined:
    Jun 18, 2018
    Posts:
    110
    https://github.com/natalieburke/ShaderGraphDemo_ComicShader

    This is our demo from SIGGRAPH 2019 that goes into some more expanded techniques based on the blog post. It has some code to handle the shadow passes and shows some other methods of using the lighting ramp concept in the graph. It might have what you're looking for?
     
  3. alanmthomas

    alanmthomas

    Joined:
    Sep 7, 2015
    Posts:
    173
    That is pretty amazing. The whole inking group looks like it is what I was asking about the ramping issue. I'm guessing that the Baked GI node is what is dealing with the shadows? Anyhow, thank you so much for this. I'm loving this whole shadergraph tool. I've been able to consolidate a bunch of materials in my project, get a particular look that I'm going for AND reduce draw calls significantly. Thanks!