Haven't looked at it thouroughly, but I think this is wrong:
float3 inTangent : TANGENT,

The engine only passes tangents on TEXCOORD2, AFAIK.