.TEX file actually hold series of mipmap image used by GP4. Usually one .TEX file hold four mipmap images, formatted as DirectX DDS format. You need a well knowledgement to DDS format and mipmapping principal. DDS file format can be created using any graphic tools that supporting it or direct calls to DirectX library module. You can learn about this in DirectX SDK.
This file has a tag or identification at first four bytes as 0x54455800 (TEX<null>
, followed by dimension of highest mipmap and number of mipmaps in the file. Next is some reserved spaces and index table to each mipmap image data offset in the file.
Each mipmap image in .TEX file is used for texture detail setting in GP4 graphic menu. I though .TEX file may hold an image other than DDS format, but I'm not sure. Most DDS format in .TEX file is always stored as single layered (or single mipmap).
Gr88ts,
Madman