Monday, February 20, 2012

Even more D3D11

As is by now customary for a DirectQ milestone, here's the Marcher Fortress.



IQMs were done, and they were a sheer pleasure. Finally being able to write directly into constant buffers was awesome, and the performance is extremely good.

Lightmaps are now in a texture array, meaning that a single bind of the lightmap array texture is all that's needed, and everything else gets batched up solely by texture. This has been extremely good for performance - a lot of tedious crap and shuffling through intermediate structures Just Went Away, and I'm now blasting surfaces out with considerably fewer draw calls.

Right now I'm using triangle strips with primitive restart indexes. Previous experience indicates that these are actually slower than fully indexed triangle lists; presumably there is a certain amount of extra triangle setup that the driver and/or hardware has to do with strips but which is already done with lists. I'm going to switch it over to lists and we'll find out. I'm also using the default BSP back-to-front ordering, so changing that to front-to-back will improve things again.

Performance-wise it's slower than before in lighter scenes, but faster in heavier ones; sometimes much faster. I think that's a pretty fair tradeoff, and it indicates that there is some extra to be gained, which is nice.

Overall it's awesome being on an API base where you know that you have certain guaranteed minimum capabilities and you don't have to compromise things for downlevel hardware or write alternate code paths.

1 comment:

ajay said...

Do you ever sleep at all? ;)