Custom Material Expression


I’m working on GPU based landscape creation in UE4, but for some time I’m struggling with using own HLSL shaders. The idea is to create node based functions in material editor that can be used to create heightmap for landscape. Is possible to add custom shader to existing currently in material editor or should I rather use already existing ones in material editor?

Spectral Arts

The base workflow its to make custom nodes and put them into material functions inside UE4 so they can be accesed with default browsing material nodes. To organize HLSL Ill recomend using an external usf file. If the custom node falls short, Ill be necesary to build a custom branch of the engine.

Thought about it, but you can also use MaterialCompiler for making custom nodes. Problem is using TexCoord in this system since you need data around certain pixel to implement algorithms for example erosion.

If it’s not possible, only way could be using HLSL. I’m having hard time setting up shader based on MeshMaterialShader. Is there any documentation on how to set this up correctly? Still this way leads to another problem how to use this shader in material graph …