How to use an HLSL shader as a shading model

Hello. I am quite new to coding in HLSL. So far, I’ve created a basic shader (.fx file) that outputs the ambient lighting. In the long run I am planning on writing a Cel shader in HLSL and using that as a custom shading model. I’ve seen some discussion on this, however I have not seen any clear answers except for the below post (however, even with this information I am lost).

The closest I’ve found is in this Answerhub post back in 2014, however I am a bit confused since I am fairly new the source code of the engine. Save my HLSL shader as .usf? Adding it as a reference in the UE4 source? I’ve looked through a few .usf files, however they look like C++ and not HLSL to me. I am also fairly new to C++ and HLSL, so the .usf files could be in HLSL and my amateur programming skills just depicts them as C++.

This step by step tutorial shows how to add a new shading model to UE4.

I just found this site that pointed me in the right direction, but I will be looking at the link you provided. Thanks!