- only ray test sprites on lights that are shadowmapped

This commit is contained in:
Magnus Norddahl 2017-03-21 14:32:48 +01:00
parent 25a30f8b7e
commit fc3cb01029

View file

@ -102,7 +102,7 @@ void FShadowMap::Update()
bool FShadowMap::ShadowTest(ADynamicLight *light, const DVector3 &pos)
{
if (IsEnabled() && mAABBTree)
if (light->shadowmapped && light->radius > 0.0 && IsEnabled() && mAABBTree)
return mAABBTree->RayTest(light->Pos(), pos) >= 1.0f;
else
return true;