avoid second rendering pass when possible
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2679 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+10
-6
@@ -374,15 +374,19 @@ void drawstencilshadows()
|
||||
renderbounceents();
|
||||
endmodelbatches(false);
|
||||
|
||||
stenciling = 2;
|
||||
if(shadowcasters)
|
||||
{
|
||||
stenciling = 2;
|
||||
|
||||
glStencilFunc(GL_ALWAYS, 0, ~0U);
|
||||
glStencilOp(GL_KEEP, GL_KEEP, GL_DECR);
|
||||
glCullFace(GL_BACK);
|
||||
glStencilFunc(GL_ALWAYS, 0, ~0U);
|
||||
glStencilOp(GL_KEEP, GL_KEEP, GL_DECR);
|
||||
glCullFace(GL_BACK);
|
||||
|
||||
endmodelbatches(true);
|
||||
endmodelbatches(true);
|
||||
|
||||
glCullFace(GL_FRONT);
|
||||
glCullFace(GL_FRONT);
|
||||
}
|
||||
else clearmodelbatches();
|
||||
}
|
||||
|
||||
stenciling = 0;
|
||||
|
||||
Reference in New Issue
Block a user