I've backed out the new lighting code.
Firstly, it exhibited some serious performance problems in scenes with lots of dynamic lights. What used to be 2 or 3 milliseconds per frame shot up to 20 or so milliseconds per frame, all in the renderer and on account of additional CPU load. That's not nice. I did some patented "quick 'n' dirty" workarounds (e.g. reverting to the old style when the light range was appropriately low enough) but overall I realised that I was patching up a flaky edifice and the time to stop was now.
Secondly, and more seriously, we encountered a driver/hardware bug on an older GeForce when running it under OpenGL. That's a big "ouch", especially because it was on someone else's hardware and that someone else was in a completely different country. Resolving that would have involved building test programs and shooting them back and forth over a period of up to a week. Now, I've done that before where I felt that the feature was important enough (cubemapped skyboxes not working on an ATI) but this time the benefit was dubious, all the more so because of the first problem.
Despite all of that I did have fun experimenting with it, and learned a lot in the process. Essentially "inventing" a HDR texture format (although I suspect that if you did enough research you'd find it was used before), working around bugs and edge cases and coming up with something that worked (reasonably) well (on most hardware) was a very interesting experience.
I think I may derive something longer term from this work for use in DirectQ, but - owing to the OpenGL GeForce bug - use in the RMQ engine is right out. It will probably end up being a simplified variant that just handles specific ranges.
Tuesday, September 20, 2011
Updates for 20th September 2011
Posted by
mhquake
at
11:18 PM
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment