Custom Material Expression With Multi Outputs

I have been recently working with Custom Material Expression. However there can be only one output for the UE stock custom expression. But I really need multiple outputs especially in the situation that the custom shader is very large. So I just modify the original one a bit so that I can now add as many output as I can to the custom expression now.

So this is a just very simple version of it. In this example, I have only two outputs with the default returned. And the second output is ‘Output1’ as specified in the UI. The code shows how I modify the ‘Output1’ value.

I will also support including external ush files in the future so that external function would be inlined by the Shader compiler.