Saturday, February 5, 2011

DirectQ Update - 5th February 2011

Been doing some more experimental work with vertex buffers and I've now got a fairly good caching scheme implemented where I don't need to write a surface to the vertex buffer if it's already in there; this should result in a good overall performance improvement in most cases.

However, it does mean that I'm now at a stage where I need to make a decision on dropping the old fixed pipeline and saying "DirectQ is shaders only". The fundamental problem is that the caching system requires use of shaders for water and sky polygons (otherwise buffer switching overhead may wipe out any performance gains). Of course there's also the possibility of retaining the old system for the fixed pipeline, but there is a cost in code complexity associated with that (this has been mounting up over the past few versions in other areas too).

The impact of going shaders only is that older hardware will no longer be supported. I'm thinking though that it's timely to make that jump. DirectQ has never really been about "older hardware"; it's been about "integrated graphics". The original baseline of an Intel 915 remains supported under this scheme, and with Direct3D 9 now being a 9-year-old API, I think it's reasonable to say "tough luck" if something isn't supported.

There's also the code complexity element. As I said, it has been mounting up, and the whole edifice is really starting to look more and more fragile. It's only a matter of time before something brings it crashing down, and I'm thinking that the wise man recognises and addresses that problem before it happens. "If it ain't broke, don't fix it" can seem a very attractive approach, and what I have now by definition "ain't broke" (in other words it works). But it will break if I start adding more, so the other approach of "prevention is better than cure" starts coming forward.

Hmmmmm. Time to flip a coin.

2 comments:

=peg= said...

Go for it! :D

Anonymous said...

Shaders, man. Shaders.