Maybe they „secret“ behind our approach is that at first anything that contains data is defines as a “data resourceâ€. The description format and the API than allows to bind “data resource†to any consumer point. It is possible that the engine inside decide that it store the same data in two different buffer with different formats. There are some usage hints at creation time to make such decision easier. Bit we can limit the binding in the effect description and as we generate object classes from the description we can check this even at compile time. If the engine is in edit mode we use generic objects. This is necessary to make sure that we can reload parts without restart the whole system. Can be very funny if you work with the global data set and someone change some textures there and at the same moment they change in your life environment.
We even have done some very promising experiments with an API neutral shader system. We build the shader with any .Net language and let it compile to MSIL. Then we use a MSIL reader that parse the code and spilt it to the different shader stages (pre shader, vertex, pixel). Even some simple automatic multi pass splits were working. There are some limits as you can not make use of MSIL features like exceptions etc.
We even have done some very promising experiments with an API neutral shader system. We build the shader with any .Net language and let it compile to MSIL. Then we use a MSIL reader that parse the code and spilt it to the different shader stages (pre shader, vertex, pixel). Even some simple automatic multi pass splits were working. There are some limits as you can not make use of MSIL features like exceptions etc.