diff --git a/src/rendering/hwrenderer/hw_dynlightdata.cpp b/src/rendering/hwrenderer/hw_dynlightdata.cpp index 044d34d3d59..0c264a1f7b6 100644 --- a/src/rendering/hwrenderer/hw_dynlightdata.cpp +++ b/src/rendering/hwrenderer/hw_dynlightdata.cpp @@ -92,6 +92,9 @@ void AddLightToList(FDynLightData &dld, int group, FDynamicLight * light, bool f cs = 1.0f; } + if (light->target) + cs *= (float)light->target->Alpha; + float r = light->GetRed() / 255.0f * cs; float g = light->GetGreen() / 255.0f * cs; float b = light->GetBlue() / 255.0f * cs; diff --git a/src/rendering/hwrenderer/scene/hw_spritelight.cpp b/src/rendering/hwrenderer/scene/hw_spritelight.cpp index f9998398aa8..ca67296d7da 100644 --- a/src/rendering/hwrenderer/scene/hw_spritelight.cpp +++ b/src/rendering/hwrenderer/scene/hw_spritelight.cpp @@ -176,6 +176,15 @@ void HWDrawInfo::GetDynSpriteLight(AActor *self, float x, float y, float z, FLig lr = light->GetRed() / 255.0f; lg = light->GetGreen() / 255.0f; lb = light->GetBlue() / 255.0f; + + if (light->target) + { + float alpha = (float)light->target->Alpha; + lr *= alpha; + lg *= alpha; + lb *= alpha; + } + if (light->IsSubtractive()) { float bright = (float)FVector3(lr, lg, lb).Length();