Use polygon offset

This commit is contained in:
Vincent Lejeune 2014-11-03 00:49:52 +01:00
parent 70f53a0e51
commit e5b269949a

View File

@ -979,6 +979,10 @@ void IrrDriver::renderShadows()
glEnable(GL_DEPTH_TEST);
glDisable(GL_BLEND);
m_rtts->getShadowFBO().Bind();
glEnable(GL_POLYGON_OFFSET_FILL);
glPolygonOffset(1.5, 0.);
glCullFace(GL_BACK);
glEnable(GL_CULL_FACE);
glClearColor(1., 1., 1., 1.);
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
@ -1020,6 +1024,8 @@ void IrrDriver::renderShadows()
}
}
glDisable(GL_POLYGON_OFFSET_FILL);
m_post_processing->renderGaussian6BlurLayer(m_rtts->getShadowFBO());
glBindTexture(GL_TEXTURE_2D_ARRAY, m_rtts->getShadowFBO().getRTT()[0]);
glGenerateMipmap(GL_TEXTURE_2D_ARRAY);