Good news, the material-unstable branch where I’ve been working on these changes now builds and renders successfully with the new material classes and the new rendering loop. Right now, it’s still loading the old .material script format into the new classes and just not using the new features like explicit multipass rendering, multiple techniques and vertex / fragment programs. My next job will be to write the parser for the new format so we can start exploiting the new features.
Performance wise, all the demos are marginally faster, except Nature which is about 25% slower, which I think I have tracked down - right now I’m sorting all RenderablePass instances, which when there are a lot using the same Pass (like Nature) is wasteful. I’m going to add another layer on indirection so that I only sort unique passes instead of RenderablePasses. I think I will also put in separate rendering routines for fixed function and programmable passes because the amount and type of coherency they each have is subtly different and warrants a separate approach. These are all detail optimisations which won’t affect the end result, but I want to make sure the new version is as slick as possible in all situations.
The other issue I have is that the full BSP demo is complaining about duplicate shader names. I’m not sure why at the moment, except that if this was happening before it was probably being ignored (I’ve made some changes to the resource managers and in the process I tightened up some of the error checking).
Anyway, I’m out for a week because I’m off on hols, so all this stuff will have to wait, I’m just glad rendering is back and testing can resume on the new codebase. I’m going to try to merge material-unstable into the HEAD before I go. See you soon!