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:
@@ -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 */
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user