After reading everything I could on creating custom shaders in Unreal, I started this plugin to help me out with boilerplate code. This *should *work for UE versions 4.19 to 4.21, and has only been tested on Win10.
What this plugin doesn’t do
The plugin is almost entirely written for C++ development and not blueprint. Additionally, I haven’t considered any integration with the material editor. It is mostly for running compute shaders.
What this plugin does
Currently this is mainly aimed at compute shaders and draw-to-quad pixel shaders. While there is more functionality, it’s mostly experimental or horribly broken. The two useful features are ShaderInstance and ShadersPlusMacros. For an example of how to use both of these, check out the Combine and Convert shaders. They’re seperated into a shader definition and shader instance, which would typically be stored by the called as a TUniquePtr.
What this plugin may do in the future
There are a few things i’d like to add aside from fixing, improving and adding more options to what’s there. Primarily i’d like to add a shader defintion generator which takes a shader or shader pair (VS/PS) and generates the defintion files for you, either via a tool in the editor or something that hooks into the build process. Perhaps you provide a metadata file (json?) that resides in the same directory as the shaders specifying any other options.
How to use this plugin
For now you can refer to the included Combine and Convert shaders, and i’ll endeavour to make a video tutorial on how to use it with Temaran’s great examples here: