I have a custom mesh I’m generating in C++ using a UMeshComponent subclass. It’s following more or less the format described at A new, community-hosted Unreal Engine Wiki - Announcements and Releases - Unreal Engine Forums. I would like to be able to create a custom shader for my mesh so that I can, for example, decode some vertex properties (texture weights basically) and pass them to a custom fragment shader (to do some blending).
It looks like this sort of thing is possible based on the documentation at Shader Development | Unreal Engine Documentation but there’s not enough information there for me to sit down and start writing anything so I have a couple of questions:
- Has anyone else had any experience with this or can point me to a simple place to start learning about it?
- How much control do you have, compared to say, writing standard HLSL or GLSL shaders?
- How would a custom shader like this be able to integrate into the Editor’s Material Editor? For example, would I be able to parametrise any textures used in the shaders and set/edit them in the editor?
In fact, potentially all I need is a custom vertex shader in C++, the fragment shading could be done using the Editor’s blueprint-style material editing. Is it possible to create a custom vertex shader, the outputs (interpolated accordingly) of which can be read and used in the Material Editor?
Thanks a lot,