Fast Dynamic Lighting

Discuss programming topics for the various GPL'd game engine sources.
mh
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: Fast Dynamic Lighting

Post by mh »

Continuing the derail...

Yes, draw the gun model as the first thing in your frame; on modern hardware you'll get early Z rejection on other scene items which gives a small but useful perf boost. On older hardware (where the Z test runs after the pixel shader) it should still help a small bit.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
taniwha
Posts: 401
Joined: Thu Jan 14, 2010 7:11 am
Contact:

Re: Fast Dynamic Lighting

Post by taniwha »

Getting a little back on topic...

For various reasons (including chasing a bug for Spirit), I got nvidia's drivers working on my system again, and noticed QF is significantly (~2.5x) faster on nvidia than nouveau, and the GL (fix function) renderer is faster than the GLSL renderer on nv, but the other way on nouveau. Getting curious, I generated some graphs while running on nv (too much hassle to swap to nouveau just for timing).

[edit]Just to make it explicit: this is timedemo demo3.

Click on the images for full-size/lossless.
  • GL renderer (~570fps)
    Image
  • GLSL renderer (~515fps)
    Image
  • GLSL renderer, no particles (~540fps)
    Image
  • GLSL renderer, no dynamic lights (~860fps) [edit 2] vertical scale is 0.1ms/large tick, it seems.
    Image
  • GLSL renderer, no particles or dynamic lights (~900fps)
    Image
Vertical scale is 1ms/large tick, horizontal scale is 100 frames/tick.
It seems I still have a lot of work to do on dlights (particles seem to be ok).

For the curious, I generated the graphs using QF's demo_timeframes feature (written by Rhamph years ago). It dumps the frame ms to timeframes.txt in the user's quake root. After that, timeframes.py in QF's tools/misc directory to generate timeframes.ppm. I then converted to png/jpg for the web.

I don't know why the thumbnails got random widths: the full size images are all the same width (different heights, though)
Leave others their otherness.
http://quakeforge.net/
Post Reply