diff --git a/neo/renderer/draw_common.cpp b/neo/renderer/draw_common.cpp index 105c53b39..cc206ac87 100644 --- a/neo/renderer/draw_common.cpp +++ b/neo/renderer/draw_common.cpp @@ -1143,16 +1143,14 @@ static void RB_T_Shadow( const drawSurf_t *surf ) { return; } - // 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 ); + qglStencilOp( GL_KEEP, tr.stencilIncr, GL_KEEP ); GL_Cull( CT_BACK_SIDED ); RB_DrawShadowElementsWithCounters( tri, numIndexes ); + GL_Cull( CT_FRONT_SIDED ); + qglStencilOp( GL_KEEP, tr.stencilDecr, GL_KEEP ); + RB_DrawShadowElementsWithCounters( tri, numIndexes ); + return; } // traditional depth-pass stencil shadows