Download

Global Shader Creation docs leave out important step

While following the creation process for global shaders in a plugin ( https://docs.unrealengine.com/en-US/Programming/Rendering/ShaderInPlugin/QuickStart/index.html )
An essential step is left out. In StartupModule the Shader path has to be added using AddShaderSourceDirectory. Without that, the lines like here:

IMPLEMENT_SHADER_TYPE(, FLensDistortionUVGenerationVS, TEXT("/Plugin/LensDistortion/Private/UVGeneration.usf"), TEXT(“MainVS”), SF_Vertex)

in the docs will not work, as the path is unknown. An example of how to do it is found in the LensDistortion.cpp

Hey Herr Edgy! Thanks for the feedback. I’ve made a ticket and we’ll look into adding that step. In the meantime, let us know if you spot anything else that looks off.