ah! first i misunderstood what you meant but now i see. i don't think you need any special code at all then. models support as many textures as you want.
i found this:
Quote:
Model shaders now support several skins per mesh subset, f.i. for normal maps. The skin assignments are detected automatically by the engine. Any additional skins that belong to a subset must immediately follow the skin that is assigned to that subset. For instance, let's assume that an entity has 3 mesh subsets, and the following skin assignments:
Skin1 -> assigned to subset 1
Skin2 -> unassigned (normal map for subset 1)
Skin3 -> subset 2
Skin4 -> unassigned (normal map for subset 2)
Skin5 -> subset 3
Skin6 -> unassigned (normal map for subset 3)
Skin7 -> unassigned
Skin8 -> unassigned
The 3 subsets are rendered in 3 passes, where the assigned skin is always entSkin1 and the normal map is always entSkin2. In render pass 1, Skin1 is used for entSkin1, Skin2 for entSkin2, Skin7 for entSkin3, and Skin8 for entSkin4. In render pass 2, Skin3 is used for entSkin1, Skin4 for entSkin2, Skin7 for entSkin3, and Skin8 for entSkin4. In render pass 3, Skin5 is used for entSkin1, Skin6 for entSkin2, Skin7 for entSkin3, and Skin8 for entSkin4.
but i am not sure how it has to be set up (if you have to embed the shader in med somehow or not).