Make it easier for clients to add custom shaders
Summary
Clients should have the ability to add new shaders to the system more easily and without having to refactor the internals of the system. Currently, the clients have to do non-trivial refactoring of system internals just to add new shaders to the pipeline.
Example
The way this would be used would vary by game project, but generally, this means that when the built-in shaders do not allow the user to do something, they should be able to change them with relative ease without that having to become a project in and of itself.
Some ideas to think about off the top of my head:
- configuration files describing shader attributes to the system so that it knows which shader files to use and how to use them
- built-in
Effect
types that you can assign toRenderable
s - a combination of the above, or something else entirely
For example, a ConfigurationManager
that takes care of multiple Configuration
objects, some of which include references to (XML or JSON-formatted) shader description files, relevant attributes about the shader (i.e. shader metadata), so that the system knows which Effect
s to create, and add to Renderable
objects to forward to the rendering pipeline.
Benefits
If you want to add custom shaders, you don't need to abandon your current project to start a new one. It's important because it removes an important obstacle in the way of a student's effort to get their project to work quickly.