In tangent space there is the normal of the geometry which represents the Z axis in tangent space, and the tangent and bitangent.
My first question is does the tangent represent the X or Y axis in tangent space? (Bitangent would then just be the other axis)
My second question is about how the tangent and bitangent is determined. The Z axis is just the geometry normal, but how are the tangent and bitangent determined, as there are an infinite amount of possible tangents to a given normal. Or formulated a little differently: If I were to put the X and Y axis of tangent space into the global coordinate system, how would they be oriented tangent to the normal?