Skip to content

Commit

Permalink
Apply 2D shadowmapping to particles as they do not use levelmesh rayt…
Browse files Browse the repository at this point in the history
…racing
  • Loading branch information
MrRaveYard committed Jun 19, 2024
1 parent c72092f commit 2af5c9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rendering/hwrenderer/scene/hw_spritelight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2af5c9d

Please sign in to comment.