Apply 2D shadowmapping to particles as they do not use levelmesh raytracing

This commit is contained in:
RaveYard 2024-06-19 19:39:02 +02:00 committed by Nash Muhandes
commit 57d39048c8

View file

@ -181,7 +181,7 @@ void HWDrawInfo::GetDynSpriteLight(AActor *self, float x, float y, float z, FLig
frac *= (float)smoothstep(light->pSpotOuterAngle->Cos(), light->pSpotInnerAngle->Cos(), cosDir);
}
if (frac > 0 && (!light->shadowmapped || light->Trace() || screen->mShadowMap->ShadowTest(light->Pos, { x, y, z })))
if (frac > 0 && (!light->shadowmapped || (self && light->Trace()) || screen->mShadowMap->ShadowTest(light->Pos, { x, y, z })))
{
lr = light->GetRed() / 255.0f;
lg = light->GetGreen() / 255.0f;