Skip to content

Custom Shaders

tobspr edited this page Aug 12, 2015 · 16 revisions

Physically Based Shading

The Pipeline uses Physically Based Shading. Your shaders have to output 4 constraints: metallic, roughness, specular, baseColor. You can find a very well explanation of them at the documentation of the UnrealEngine 4 here. In case you want to write your own effects or even shaders, continue to read!

Default Shaders

In case you do not need any special features, you can just use the Default Shader, which is applied to render by default. Your object should have the textures and materials applied like in Exporting from Blender. The default shader will extract those values and output them.

Custom Shaders

Most desired effects can be implemented using the [Effects](Effect System), you should use it whenever possible. The effect system has the advantage that your effects do not get outdated with newer pipeline versions.

However, in some rare cases you might want to have your own shader, in that case you will have to copy the functionality from the default shaders (Found at Shaders/DefaultShaders/). This is quite a bunch of work, and should only be done if its really required! Feel free to contact me if you need any help with this.