Custom Shading Model -> Can't access Texture2d Data in custom pin, D3DCompile Exception


Texture2D CustomPin;
SamplerState CustomPinSampler;

float3 mysampledIMG = CustomPin.SampleLevel(CustomPinSampler, cLCombined, 0).rgb;

I get a blank and undescriptive Error:


1 Shader compiler errors compiling global shaders for platform PCD3D_SM5:
C:/Users/user~/Documents/GitHub/UnrealEngine/Engine/Shaders/Private/DeferredLightPixelShaders.usf(): Shader FDeferredLightPS, Permutation 0, VF None:
D3DCompile exception

Retry compilation? Yes No

I’ve made a custom shading model and I’m trying to access my textures so that I can use them further in my HLSL.usf file. This IS NOT FOR PLUGINS. Just so it is clear. This is all used in conjunction with a modified UE4 engine that supports my shading model.

I just need to know what I’m doing wrong or if I missed something either in the engine files directly affecting this outcome or if the code I’m using in my hlsl file is not going to retrieve the input data from the custompin I created.