Trying to make Toon Shader Material on UE4

A slight modification to Tomura’s shader.

I’ve removed all of the “above one” lighting path that he created; it turns out that emissives work just fine without it (they don’t bloom, but they do remain perpetually lit even in total blackness) and I don’t feel it added much beyond extra banding that I didn’t want.

What I DID do, however, was figure out how to properly re-add the skybox that went missing after 4.3!

It seems the Skybox no longer had a “base color” value, even if there was one attached to its material. This means that the only way to get the skybox back in is to grab it directly from the Postprocess Input… but this means taking back in all lighting! So what I did was grab the SceneDepth value and multiply it by the lowest allowable amount; this makes everything in the scene more or less completely black, except the skybox (which is at an essentially infinite depth value, evidently?) which shows up bright white. I multiply this by the PostProcess input to get a scene which is all black except the skybox, then add that to the cel shader path’s output.

The end result is we have a cel-shaded scene with a black sky and a normal sky with a black scene, added to produce a cel-shaded scene with a sky! (note that I further multiplied my skybox feed by 0.25, but that’s a personal thing since I like a dull skybox and it’s easier for me that tweaking skybox settings to get the result I’m after).

This is the end result, and many thanks to Tomura for creating a cel-shader setup that was easy enough for someone like me to understand at a conceptual level!