Handling of the far clipping plane has evolved yet again. I've switched it over to dynamic at runtime based on visible nodes for the current frame and subject to a minimum of 2048. I haven't imposed a maximum on it, despite halfway thinking that I probably should. Bottom line though is that if a map is designed to have brushes visible 10 million units away from the player, then that's the way the map is intended to be and the engine should support that.
One final change I might make in this area is to switch the 2D stuff to D3DFVF_XYZRHW. This mode will cause Direct3D to bypass the T&L stage and go direct to the fragment (or pixel, depending on your chosen flavour of terminology) stage. The intent is to gain some additional performance by having less internal driver state changes/updates and matrix transforms at runtime. It's not going to suddenly gain a significant amount, but when you're coding for a resource constrained environment even all the little 0.5 percents add up. (Update: done, and slightly more that 0.5% too!)
I've also been doing some looking at the DXUT framework that ships with the SDK, and am tempted by the thought of moving my window and device management to it. This area has always been a little hairy for me, so having some code that is known to work written by the people who know D3D the best is an attractive idea to me, and may go a long way towards squashing some lingering bugs (not to mention cleaning up some codepaths). I think I can get away with it in GPL-land as it's demonstrably an external library intended for general use in other programs, rather than being part of the DirectQ program itself. There's also plenty of prior art available (just search on Google for DXUT and GPL) to support the case.
Wednesday, October 28, 2009
More fun with the far clipping plane
Posted by
mhquake
at
5:46 PM
Subscribe to:
Post Comments (Atom)
2 comments:
DXUT it great but the anoying thing it the whole Unicode aspect of things. But it is fun to play around with. I tries to implement it with the 1.7.2 source code but only got vsync working.
Ack, unicode. :(
OK, scratch that.
Post a Comment