[quake3-bugzilla] [Bug 4358] Vertex Buffer Object (VBO) code available

bugzilla-daemon at icculus.org bugzilla-daemon at icculus.org
Wed Dec 8 06:44:46 EST 2010


http://bugzilla.icculus.org/show_bug.cgi?id=4358

use.less01 at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #2512|0                           |1
        is obsolete|                            |

--- Comment #15 from Robert Beckebans <robert.beckebans at googlemail.com> 2010-12-07 10:02:58 EST ---
(In reply to comment #14)
> Created an attachment (id=2512)
 --> (http://bugzilla.icculus.org/attachment.cgi?id=2512) [details]
> Version 5 of VBO and GLSL code from xreal, w/ changes
> 
> I've changed a few things again.
> 
> This version of the patch removes the occlusion stuff I had in the previous
> patch, and adds GPU vertex skinning from ET-XreaL, as well as optimized
> vertex/fragment programs and some fixes here and there.
> 
> It's actually reasonably fast now, with s_useOpenAL set to 0 it's faster than
> base quake3.exe.  It's still slower than ioquake3 1.36, though.
> 
> With "timedemo 1;demo four" I get:
> 
> quake3.exe:
> 1260 frames, 4.3 seconds: 296.2 fps
> 
> ioquake3.exe SVN with VBO/GLSL patch:
> 1260 frames 3.7 seconds 342.9 fps 1.0/2.9/9.0/1.0 ms
> 
> ioquake3.exe 1.36 from website:
> 1260 frames 3.4 seconds 373.4 fps 1.0/2.7/6.0/0.9 ms
> 
> So there's some room for improvement. :)

Make sure that you are not using the old xreal GLSL shaders with dynamic
branching on the GPU. I was told that those were no problem for modern GPUs but
I proved it to be wrong. I could speed up the performance in ET-XreaL by moving
the if statements in the GLSL shaders to preprocessor macros and then I used
different shaders for different combinations.

--- Comment #16 from use.less01 at gmail.com 2010-12-08 06:44:35 EST ---
Created an attachment (id=2515)
 --> (http://bugzilla.icculus.org/attachment.cgi?id=2515)
Version 6 of VBO and GLSL code from xreal, w/ changes

>Make sure that you are not using the old xreal GLSL shaders with dynamic
>branching on the GPU. I was told that those were no problem for modern GPUs but
>I proved it to be wrong. I could speed up the performance in ET-XreaL by moving
>the if statements in the GLSL shaders to preprocessor macros and then I used
>different shaders for different combinations.

I tried implementing this, but it seems for what base Q3 is rendering, the cost
of switching contexts is higher than what I save from skipped portions of the
shader programs.  I do get a small boost from removing the portal plane cull,
except when a portal enters the view, and another from disabling the vertex
animation when drawing world surfaces, so it is worth it.  It'd probably be
better if the surfaces were sorted by their need to use texture coordinate
generation and vertex deforms, but I can try that later.

So here's another patch.  This one also includes dlights, so it now supports
nearly all of Quake 3's effects, except the buggy fog and TMOD_TURBULENT,
neither of which I've thought up an adequate fix for.

Performance has dropped slightly from the previous patch due to the dlights,
but it's still within .5 seconds with "timedemo 1;demo four" on my system.

As well, I got it compiling in MinGW, and included the changed Makefile, so
maybe someone with Linux can fix it up and see if it works there.

-- 
Configure bugmail: http://bugzilla.icculus.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the quake3-bugzilla mailing list