Original Post
I am toying with the idea of updating my old FFP/shader engine to use fx files. I first looked at fx files when they were first introduced but I thought the tech was a bit young and I would give it time to mature before integrating it. Now, my original understanding over the hype of fx files is the ability to just drop in a new fx file and that will act as your material - except from my new experience - this isn't quite true. For example - what if the new fx file requires an extra texture to be loaded, your code needs to know this in order to fetch that texture. It's entirely possible that I have missed some fundamental point about dealing with fx files, but how are people using them realistically. One approach I have seen is to make sure all vertices have exactly the same format (leading to redundant data being transfered across the bus) and implement a common set of variables that each fx file has to be authored to. Even then though to me this seems like still a 'push' technology where your code has to have some knowledge of the possible fx files it has to handle. Is there a way of using them in a truly agnostic way where your engine does not need to know any details of the fx file and uses a kind of 'pull' technology to demand details/assets from the engine?