Friday, June 18, 2010

More Progress

Alias models and particles moved over today. Alias models are running slightly slower than before (owing to the larger common vertex size) but I've resolved a major bottleneck in particles with more efficient batching and adding an alpha test to not write anything to the framebuffer with an alpha of 0. I think I'm also going to be able to get away with not indexing them, meaning that I'll have both reduced fillrate overhead and reduced vertexes overhead.

If that isn't neat I don't know what is.

I've also been thinking about ways to make the render more amenable to older hardware, specifically that which doesn't have hardware vertex processing available. It seems to me that in such a scenario copying data to a vertex buffer is just another memory copy we can do without; we might as well transfer it straight to the 3D hardware instead.

Of course I could be wrong and it could be the case that D3D is able to transfer more efficiently from even a software vertex buffer than any code I might write would be. It seems worth experimenting with all the same.

I've also set up vertex streaming so that we can partially stream submitted vertexes to hardware while the CPU is busy setting things up and the GPU is otherwise idle. In theory it should be a win, but in practice it seems to not make much difference.

Anyway, about the only thing left is handling alpha brush and alias models, then I need to go over the code and clean things up, pick up on anything minor I may have omitted (there are a few small things), tweak, polish and add some functionality (I have a few ideas), see how much more speed I can get out of it, and then that part of 1.8.5 will be done. It's the other 90% that needs to be completed after the first 90% is finished, in other words.

Till next time.

3 comments:

=peg= said...

Sounds like you are really on to something! Good luck with the other 90% ;)

mhquake said...

Oh yeah: try r_drawviewmodel 0.5 in 1.8.4 ;)

=peg= said...

Heh, that's my default setting anyways ;)