I was talking to a friend "shaderman".... He explained me what is happing..
The problem is the Tangent value from 3DGS isn't a float4 but a float3 ....

So... this

Code:
 
void CreateTangents(float3 inNormal,float3 inTangent)
{
matTangent[0] = DoPos(inTangent);
matTangent[1] = DoPos(cross(inTangent,inNormal)); // binormal
matTangent[2] = DoPos(inNormal);
}



Should be something like this

Code:
 
void CreateTangents(float3 inNormal,float3 inTangent)
{
matTangent[0] = DoPos(inTangent);
matTangent[1] = DoPos(cross(inTangent.xyz,inNormal)) * inTangent.w; //binormal
matTangent[2] = DoPos(inNormal);
}



Is this possible to correct the previous posted code?
Thanks....