[SM5] error X4532: Cannot map expression to cs_5_0 instruction set

My material setup is the following

It displays correctly in the material editor, but not in-game, and in the material instance I get the following error:

I figured out what was causing the problem, it was to do with passing the heightmap through the custom node. The resulting texture was unable to be used as a height input. It’s been a while since I fixed it, but it was to do with a conflict between vertex shaders and pixel shaders I think. I just skipped that node in the material for the hieghtmap as it’s purpose was to apply Mip-Mapping correctly on textures contained within an atlas - important for diffuse/normal, but not so important for the the heightmap, which controlled the blending between different material layers.