Re: Doom 3 engine release and game code
- Code:
// patent-free work around
if (!external)
{
// "preload" the stencil buffer with the number of volumes
// that get clipped by the near or far clip plane
qglStencilOp (GL_KEEP, tr.stencilDecr, tr.stencilDecr);
GL_Cull (CT_FRONT_SIDED);
RB_DrawShadowElementsWithCounters (tri, numIndexes);
qglStencilOp (GL_KEEP, tr.stencilIncr, tr.stencilIncr);
GL_Cull (CT_BACK_SIDED);
RB_DrawShadowElementsWithCounters (tri, numIndexes);
}
The reverse is really only relevant if the view is inside a shadow volume so in the common case it's not actually needed at all. No, the original code isn't there. Performance drops off maybe 25% or a little more for me with the new code.
Interesting that huge chunks of the console code are almost unchanged from Quake.
