DirectQ supports cards that don't have hardware T&L, and runs quite well on them, but it does go through Direct3D's Vertex Buffer interface for them. I'm starting to implement a pure software alternative for such situations, so that we can get rendering without the overhead on these cards. Part of the eventual goal here will be to also provide a non-HLSL option for situations where a card may not have the required Pixel Shaders support (any card - even a TNT2 - will run Vertex Shaders very efficiently in Direct3D).
So far I've implemented removal of the VBO interface on the world, and it gets a few extra FPS (about 1-2, to be honest). The downside is that I now have 4 rendering paths on the world (VBO with indexes, VBO without indexes, SW with indexes and SW without indexes), but I do believe it's worth it.
This is something I've been conscious of ever since I first started moving everything to HLSL - it's all well and good, but there are cases where the solution isn't optimal. The culmination of this current effort will be a DirectQ that will run on just about anything, which will be a nice return to the state of things as they were in 1.0 and 1.1, but with the added muscle of HLSL for cards that do support it.
The real bonus here is that the rendering interface I wrote for 1.6.1 will easily and cleanly support this, and without too many code changes. All I need is to set up the correct texture stage states and disable the pixel shader. There might be a bit of grief in loading and compiling the effect files though; I'm not certain if an effect file that contains a pixel shader can be compiled on a machine that doesn't support them.
The only cloud on the horizon of this is that I currently don't have a machine that doesn't have the required PS support (i.e. none), so I can't test it too well.
Wednesday, June 17, 2009
Software T&L Support
Posted by
mhquake
at
6:47 PM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment