Wednesday, February 6, 2008

Phew!

Quite a few new bits and pieces.

  • Been having some fun with frustum culling. There's room for optimization here, as there are quite a lot of unnecessary R_CullBox calls in the world (in theory child nodes should only need to be tested if a node intersects the frustum), but somehow this doesn't translate into extra FPS when implemented in the engine. I'm going to be leaving the code in, but commented out.
  • Did FitzQuake-style water warp updating, but using the texture matrix to update the warps, rather than doing it in software (based on a Mark Kilgard idea). Obvious advantages are that I can do a warp update with a 6 or 9 vertex trifan rather than having to use a lot of really tiny strips. I only update a texture if it's been visible the previous frame - to be correct I should use current frame, but this way doesn't seem to have any negative side effects (so far). The mess I had made of GL_SubdivideSurface has now been totally removed, which was a nice bonus. I don't actually need to subdivide any more, but I still do (but with a 65536 subdivide size) just to keep the changes coming one at a time.
  • In terms of raw speed, I'm currently getting over 260 FPS at 1280 x 1024 x 32 bit fullscreen on a GeForce 6600 GT/Athlon 64 2800/1 GB RAM system. This is in a debug build. Quite happy with that.
  • The really nice thing about my new vertex array wrapper, which I'm only just realising now, is that I can play around with just slamming triangles on screen to see what happens in the exact same way as with immediate mode.
  • Still 2 major things missing that are holding up a release - a particle system and support for less than 4 TMUs. I hate writing particle systems - they never seem to work out well for me, and the 4 TMU render is just so clean and elegant that it seems a shame to write an alternative path.
I've loads of other ideas, but I do want to get the core stuff finished and released in some form (I'm particularly keen in making my texture loader public, as it can do some really cool stuff) before I start into them.

0 comments: