As I am implementing a system like this for my current project as we speak, let me share few thoughts:
- The future is in the physically-based shading and deferred pipelines. All major engine vendors and in-house engines are moving in this direction. If Ogre aims to be the open-source alternative to these guys, it should adapt solutions that directly support these paradigms. Forward renderers and other stuff may still be supported in some way or another but only if someone needs it for a specific reason and is willing to give it some work. Currently, the situation is the direct opposite - you get outdated techniques out-of-the-box and need to work hard to get up-to-date stuff working.
- Any system that aims at stuff like shader generation is always torn away by the problem of complexity vs. usability -> make is easy to grasp and modify and advanced users won't be able to implement different techniques without basically replacing the system entirely. Make it very flexible and most developers won't even bother understanding it. At least from my experience.
- You can go either the low-level way, i.e. the UDK node editor, manual shader writing etc. or the high-level way, i.e. the Cryengine uber-shader. I am using and advocating the second approach - in my opinion, Ogre should provide a basic, fully featured uber shader, containing all the possible combinations of #ifdef flags for all situations (speaking of the most common hard-surface obejcts now). Users could add their own flags by expanding the engine (i.e. registering new "material modules") and if anyone wants to modify the basic shader, just copy-paste it and modify as you need. You are unlikely to use several variations of the same basic shader in one project anyway.
- Different techniques can be implemented, but the engine should stop acting like there is nothing like shader files. On the contrary, it should be very clear that all rendering is being done using shaders and user should be able to easily understand what materials use what shaders and how to modify it.
Just my 2 cents.
[Draft] Material system improvements
-
- Halfling
- Posts: 45
- Joined: Wed Jul 24, 2013 9:50 am
- x 3