UPBGE: Disallow shadow buffer render when the lamp is hidden.

It now allow the user to use multiple shadow lamps and hidden the culled lamps.
This commit is contained in:
Porteries Tristan 2016-02-06 11:53:15 +01:00
parent 47498c4f05
commit 266348e658
1 changed files with 3 additions and 1 deletions

View File

@ -1096,7 +1096,9 @@ void KX_KetsjiEngine::RenderShadowBuffers(KX_Scene *scene)
raslight->Update();
if (m_rasterizer->GetDrawingMode() == RAS_IRasterizer::KX_TEXTURED && raslight->HasShadowBuffer()) {
if (light->GetVisible() && m_rasterizer->GetDrawingMode() == RAS_IRasterizer::KX_TEXTURED &&
raslight->HasShadowBuffer())
{
/* make temporary camera */
RAS_CameraData camdata = RAS_CameraData();
KX_Camera *cam = new KX_Camera(scene, scene->m_callbacks, camdata, true, true);