Announcement

Collapse
No announcement yet.

Custom Shaders - FShader class gets linked incorrectly.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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:
    https://gist.github.com/sortofsleepy...62b11fe618705d

    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!
    Last edited by sortofsleepy; 04-25-2020, 03:27 PM. Reason: Update engine version + add compiler output

    #2
    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.

    Comment

    Working...
    X