Trying to use texture sampling in custom material shader?

Hi,

I’m trying to follow this example: https://dev.epicgames.com/documentation/en-us/unreal-engine/custom-material-expressions-in-unreal-engine and when I plug in the code I get some errors. I think the code in the sample is out of date. I tried changing some of the code to use different Texture Sampling syntax but then I got this error: “error: invalid format for vector swizzle ‘Sample’”

Hi, I realized the issue I was having was because I was using a “TextureSampler” node instead of a “TextureObject” node.

Fixed it, feel free to reach out directly if you are having this kind of issue.