Fixing a problem with variance shadow maps blurring out on transparent receivers in the Game Engine reported by Sam Cameron on the IRC.

Also correcting some slight blurring over time by making sure the color buffer is cleared for shadows.
This commit is contained in:
Daniel Stokes
2013-09-05 22:05:52 +00:00
parent 677b6972b5
commit 6cc3aec8bc
2 changed files with 6 additions and 1 deletions

View File

@@ -1201,6 +1201,7 @@ void KX_KetsjiEngine::RenderShadowBuffers(KX_Scene *scene)
/* render */
m_rasterizer->ClearDepthBuffer();
m_rasterizer->ClearColorBuffer();
scene->RenderBuckets(camtrans, m_rasterizer, m_rendertools);
/* unbind framebuffer object, restore drawmode, free camera */

View File

@@ -1010,6 +1010,10 @@ void RAS_OpenGLRasterizer::DisableMotionBlur()
void RAS_OpenGLRasterizer::SetAlphaBlend(int alphablend)
{
/* Variance shadow maps don't handle alpha well, best to not allow it for now */
if (m_drawingmode == KX_SHADOW && m_usingoverrideshader)
GPU_set_material_alpha_blend(GPU_BLEND_SOLID);
else
GPU_set_material_alpha_blend(alphablend);
/*
if (alphablend == m_last_alphablend)