I’m currently working on getting it work in 5.1.
I managed to adapt the code to new way of UE5 handling GBuffers, resolving issue of custom shading model appearing as solid black in deferred rendering.
However I still can’t get the toon shading to display correctly just yet. There are also some errors with vector truncations, which I managed to resolve, because some functions returning scalar float value is using vector types for some reason.