Looks for float<N> main(...) function in the active document and generates a material expression node to the clipboard ready to be pasted in your UE4 material. Works great with the HLSL Preview extension.
Enter Generate UE4 Material Expression Node in command palette to copy an entire node to clipboard
Enter Generate text for UE4 Material Expression to copy only the expanded text to clipboard
(used for iterations)
this extension assumes that the main function is in global scope, its definition starts right at the beginning of line and the enclosing curly brackets are also both are the first characters on a line as seen above.
You can include other files in your code and this extension will recursively expand them for the expression node. Includes are always relative to their containing file.