Originally tweeted by Victor Careil (@phyronnaz) on 01/11/2021.
Ever wanted to write HLSL in Unreal?
The HLSL Material plugin now supports defines, includes, bool/texture parameters, default values…
Errors are also clickable, redirecting here to the awesome #RiderForUnrealEngine!
https://github.com/Phyronnaz/HLSLMaterial
Bool parameters work by creating a binary tree of all the possible permutations, and creating a custom node for each one

Defines & includes work by simple filling up the Additional Defines/Includes properties on the custom nodes.
Editing included files will also trigger an automatic refresh of the material functions!

Default parameter values work by parsing the default value text & filling up the function input based on that.
For bools it creates a StaticBool node.
If you're working in a large team and can't easily push plugins to your repo, no worries!
You can install the plugin locally: the generated material functions are useable even without the plugin being installed 🙂
Experimenting with auto-generating material parameters as well with a custom metadata syntax 🤔
Pretty useful for parameters only ever set by code
Originally tweeted by Victor Careil (@phyronnaz) on 01/11/2021.