Tuesday, June 8, 2010

Speeds up again

Just been doing some work on my render to texture setup, and have gained about 20% performance in most cases. This was achieved by reducing the dimensions of the rendertarget texture to a power-of-2 below the display mode dimensions. The cost is a little jagginess around the edges of some viewmodels during underwater warps (at lower resolutions), but I'm going to see if there is anything I can do to alleviate that.

On balance it's a question of performance versus quality, and for now performance is winning out. Depending on feedback I get this might change, of course. Also, if I can get it smoother at the edges it will help a lot and I may not need to change it.

The main speed gain is in r_hlsl 1 mode, as it depends on the use of a post-processing shader for pickup/damage/etc flashes. r_hlsl 0 won't get the performance increase.

It's also possible to use this to do anti-aliasing as a post-processing effect, which is quite nice. Haven't thought through the full details yet, but it's certainly something that can be easily done (it will knock out the speed gains - and then some - of course).

Update:

All resolved by using the full-sized rendertarget for underwater warps and the scaled down one for bonus flashes.

For reference:

On my main test machine (Intel Graphics FTW!) with timedemo demo1, d3dpro400 gets 90 FPS, my performance optimized DirectFitz gets about 200, as does GLQuake. Release 1.8.4 got about 250-260 FPS; this one easily goes over 300.

4 comments:

Coranth said...

God damn it, man! How much faster can you make this thing?! Does all this speed really matter on today's modern hardware? I mean, depending on your setup, you're going to be locked to having Quake run at [insert number] frames per second anyway, right? I suppose the real performance gains would be for machines with -older- or integrated graphics chips...?

Anyway, keep up the great work; I am looking forward to seeing some eyecandy! (Tenebrae has you beat, there, I'm afraid!)

Anonymous said...

Awesome mod man. Alot of things work great. Something that is missing, of course you probably know of, is the flashes from picking up items. Some cool thing I thought that would be nice for this was if you could make it where you could create seperate exe's from the "Change Game Directory" menu, so you could run a mod or the expansion packs without having to take the effort to use the menu. Of course you could aways do that with shortcut's instead, but the reason why I think exe's would be nice is because I would like to make a shortcut on the steam library screen :\. Maybe you could make it where you could add a command to a "DirectQ.exe"s properties name line. Really though, the choice is yours, and I love everything so far.

Anonymous said...

Haha, he didnt notice that you were working on the pickup flashes XD.

mhquake said...

Pickup flashes should already work, but they make be a little less obvious that in GLQuake. I'll need to do a check.