Light management overhaul, technique fallbacks

· by Steve · Read in about 2 min · (221 Words)

Things have really gone well this weekend, all the stuff I’ve been working on is falling into place, and for the most part, it’s working! I’ve implemented the automatic parameter bindings, like getting the system to automatically keep the worldView matrix or object space light position up to date in a program parameter, and the technique fallbacks seem to be working ok.

I also completely overhauled the light management today; previously there could only be a fixed number of lights in the entire scene, up to the limit that the API supported, which was very limiting. Now, you can add as many lights as you like, and the engine will pick the ‘n’ closest lights to use for both the fixed function and programmable pipelines. The number of lights that are picked is set in the Pass, and it defaults to the maximum allowed in the API.

Progress has been so fast, so long as the testing continues to go well I expect I’ll be writing the new .material parser in a day or two, and working on the Cg plugin by next week (right now I’m testing with assembler shaders, albeit compiled from Cg using the command-line cgc for convenience). I just have an odd projection matrix problem that’s throwing off my vertex programs that I need to sort out…