Thursday, April 29, 2010

Other updates for today

FPS of scenes with high epoly counts have gone up by 5% to 10% on most hardware (i.e. anything from the last 10 years). This is due to reordering of model indexes for better vertex cache efficiency. I had assumed that my previous experiments had indicated that the ID MDL layout was already optimal, but I had just been using the D3D optimization functions wrong. Of course if the documentation was of any use in the first place it would have helped...

Max unique sounds has gone to unlimited. This threw out a few more bugs in the sound code that I'll need to work through.

All of the different types of memory storage in the game have now been implemented as reusable objects. This makes my coding job for anything that needs memory (i.e. everything) a lot easier, meaning that you get results faster.

I've implemented a custom TGA loader. In theory D3D can load a TGA file itself, but in practice it sometimes fails. If you've ever run 5 Rivers you'll know what I mean. The trick is that if a TGA fails via D3D I run it through my own loader, output another TGA in memory (just an RGBA - well, BGRA really - array with a TGA header in front of it), then send that through D3D. Works every time.

Looking at the 5 Rivers skyboxes I note that some of them are strange sizes (770k?) and also that if I open one in a Paint program, then save it without making any changes, it works then. I guess that the D3D loader is throwing a false error at some stage in the process.

0 comments: