Download

Custom Shaders - FShader class gets linked incorrectly.

(apologies ahead of time for potential lack of detail, on another device. Will clarify and update if necessary once I’m back on my main computer)

Hello!

Decided now was a good time to start learning about Unreal Engine. Something I wanted to move onto was learning about how shaders work. I came across this tutorial

https://www.unrealengine.com/en-US/t…shaders-to-ue4

A bit old, but seemed to play out as Visual Studio didn’t complain about anything.

However, when I compiled my program, I got some linker errors seemingly related to the FShader class which seemed a little surprising since I assume that the class is necessary for all of the built-in shaders and related objects.

Compiler output here:

Can anyone help explain what might have happened and how I can correctly link things?

For reference in case it helps

  • Not compiling from source, just using the launcher download version
  • I’m currently on 4.24.1
  • Trying to include the shader inside of my game module class.
  • Running on Windows 10

If there are any other potentially relevant details that would be helpful, please don’t hesitate to ask.

Thanks!

Small update!

After reading a bit more with after a fresh cup of coffee, I noticed some of the missing functions the compiler was calling out existed in the sample C++ class for the Pixel Shader. For whatever reason those functions did not exist in the sample class for the vertex shader. After adding those functions, I’m down to 9 missing references.

Gist has been updated.