Tex2D uses sampler2D and texture coordinates as parameters. It looks like you are using the TargetMap texture directly. But that's hard to say with this short code snippet. Better post your full code.