Error [SM5] error X3013: 'tex2D': intrinsic function does not take 2 parameters

Hey, doing an iterative bumpoffset chain. Current code is:

for (int i=0; i<Iterations; i++)
{
float Height = tex2D(HeightIn, TexCoord);
TexCoord += ((Height+Offset)*Ratio*CameraVector);
}

return TexCoord;

Yet its spitting out errors about Tex2D not taking parameters? What am I doing wrong here?

Currently you cannot do for loop using the custom node.

Oh. This was possible in UE3/UDK right?

Is this functionality going to be added at some point?

Yes, in udk/ue3 the custom node is more flexible. Many of us tech artists at epic are pushing to to make it a priority again but currently the feature is not scheduled yet. It would make some shaders much simpler, like the multiple layer bump offset one.

Alright, thanks. I guess I’ll have to wait then, and lets hope it gets added soon :slight_smile:

Is this now supported since 4.6.1 or 4.7?

Nevermind, implemented what i needed directly in the source.