I’m simply trying to sample a pixel from a texture in a custom node, and although it seems to be working fine inside the material editor (the preview is showing the correct colour sampled from the texture), when I try to save the material and it compiles fully I get this error:
Error X4532: Cannot map expression to cs_5_0 instruction set
Here is the code I am using to try to sample the pixel:
return Tex.Sample(TexSampler, UV);
With just two inputs on the custom node:
Tex: a texture object
UV: float2 UV value
This seems like it should be a really simply thing, what’s going wrong here?