Stop z-fighting in glow pass.

(transplanted from a1ec712ffcf5a8b21d2d441b348022fa8e4a44c2)
meow-7.2.2
Dave Parks 2010-04-27 00:13:51 -05:00
parent 3deecc09a8
commit d0cc016d62
1 changed files with 4 additions and 0 deletions

View File

@ -55,6 +55,10 @@ void LLDrawPoolGlow::render(S32 pass)
LLFastTimer t(FTM_RENDER_GLOW);
LLGLEnable blend(GL_BLEND);
LLGLDisable test(GL_ALPHA_TEST);
gGL.flush();
/// Get rid of z-fighting with non-glow pass.
LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL);
glPolygonOffset(-1.0f, -1.0f);
gGL.setSceneBlendType(LLRender::BT_ADD);
U32 shader_level = LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_OBJECT);