I managed to get this shader ported to Unreal Engine 4.27 for the time being (Although the issue with my fork is that I also updated to Steamworks v1.53). The only big downside currently being that raytracing shadows results in weird dark shadow artifacts on materials. It seems to work good enough with raytraced reflections and screen space global illumination. I’m personally pairing this with an invert hull mesh. This is probably one of the better toon shading solutions that I’ve seen in Unreal Engine that still works with deferred rendering (No forward rendering trickery needed).
A few things I’d definitely suggest adding for this to be a great universal solution:
- Having the option for multiple shading and specular steps would be nice
- Some sort of 2D subsurface scattering (Basically a small line between the lit and unlit area) for toon shaded skin would be a nice addition to have.
- Some sort of way to affect how sharp shadows can be when casted onto the material (currently, shadows when casted onto the material look sharp no matter the shading softness set in the material)
Thanks for the work done on the shader! Just needs a little more polishing and I’d recommend to submit a pull request to get an NPR shader implemented in the engine (as binary builds have desperately been needing a proper toon shading solution for a while).