I'm writting a small graphics program using directx9 which imports some model files created using blender from .x files. So far so good.
The models have materials which have textures and it's simple to get the texture names and properly render the objects however I'd like to use different effect (shader) files on some of the materials but I can't find any way to embed the information about what shader to use in the model in the .x file.
The best idea I had was to look at the texture filename in my d3d9 application and hardcode a lookup table of texture name to effect file. But that doesn't seem elegant, and also means that I'd end up copying and renaming textures just so I could use the same texture with different shaders.
I feel I must be missing an easier way to do this, any suggestions?