Effective Shader Management?

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Effective Shader Management?

      I've gotten to a point in my code that I need an elegant, simple and flexible system to handle D3D Effect Files.

      I've already (rightly or wrongly) used the resource manager template from Game Programming Gems. We have no need for caching, our entire game will fit into the memory of the target system so I need a way to handle shaders once they are loaded.

      This includes a generic way to get their parameters and build the renderer to know what to do with those parameters.

      A nice big switch statement of allowed parameters, an array linking the parameter function to a defined standard name and rigorous naming convention is the easy way to do this.

      Does anyone else have a better approach which is more flexible, elegant and hopefully faster than running branching switch statements on the 360?