Wednesday, May 21, 2008

Another update

Been doing some serious work on cleaning out my surface refresh. Basic stuff like removing surface subdivision, some troubleshooting and bugfixing on the refresh itself, tightening up code, and so on. I do need to start hitting at lightmap allocation though; one major optimization can come from allocating lightmaps in BSP tree order, which will mean that nearby surfs will share the same lightmap. What this means in practical terms is that lightmap uploads can be speeded up quite a bit, as modified surface lightmaps will tend to cluster together. I've an idea for modifying them entirely on the GPU too, but that will need some serious work (as well as re-engineering the whole subsystem).

I've just discovered that interpolated lightstyles are a colossal framerate hit, so I'm chewing over whether to drop them entirely or whether to just update lightmaps at a slower (but constant) rate, like at 25 FPS. This can free up GPU headroom for actual rendering, as the way things are, any speed increase is almost instantly swallowed up by lightmap uploads.

Also tightening up the framebuffer water warp code. The texture matrix warp is efficient but ugly, so I think I'm going to revert to a software warp.

0 comments: