Hey, @hippocoder
Thanks for the advice ! The thing I want to achieve is a bit tricky : I’m working on the skin shader of my character. I want a mix betwwen Subsurface Scrattering and cel shading.
The URP, in my opinion, still lacks a lot of features compared to builtin (but i’m sure with 1 or 2 more years, it will be better),for example, let’s take custom lightning : as you have to use the unlit template, if you want somethning like me, more in between realism and cartoon, you have to rewrite all the lightning inside shader graph. In the blog post Unity did about LWRP and cel shading, they made a very very flat one, that does not support light probes, that does not support spot light shadows. I’m sure there is way to support it, but if you take the builtin + amplify, well, everything is already done and is working really well. So would would I remake all the work amplify did, in shader graph, to have the exact same result ? (maybe even a less good result, because of the features lacking in URP right now, like shadow masking and the way point and spot light handle shadows)
But again, I think Unity is taking the good path by making a “scriptable” render pipeline. The custom renderer is great for example ! But I think it’s out of preview waaaay too early.
The HDRP on the other hand feels more feature completed, if I forget about custom lightning, I think it’s a solid pipeline that’s actually maybe better than the builtin.
So, I made some more tests with the HDRP (or else I will just stay with the builtin) and I’m really happy to say that I found 2 solutions to make some kind of “custom lighning” in the HDRP within the lit template (Support for light probes is very important for me as well, supporting that in an unlit template would be complicated I think + support for everything else).
This is actually very simple :
-Control of the shadow with a sss profile to control how sharp is the shadow (can also change the shadow color) + an occlusion slider ton control the shadow brightness.
OR
Get the light direction, with the vertex normal you should be able to know where the shadows area are and then have more control over it (and it’s probably better for performances to do this way)
-Control of the lighten side by making the vertex normal = object space light direction (it will flatten the light) (and of course color and birghtness will be affected by you light)
-Support for specular / gloss can be made with a fresnel in vertex normal space and, connected in the emission output.
-Normal is supported, just plug the map in the normal output.
The result :
Or else, it’s untested but, I checked how you can do a toon shading in UE4 and they actually do it with post process. HDRP supports custom process. So you can probably do this in HDRP. I think they used this technique in Zelda BotW, as the Lake Hylia glitch shows a phong shaded Link.
This second option gives more freedom I think.