[go: up one dir, main page]

Skip to content

Commit

Permalink
Disco light fix
Browse files Browse the repository at this point in the history
  • Loading branch information
onnoj committed Jul 24, 2024
1 parent 193d1f1 commit fe00d2e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Source/Renderer/rendering/lightmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void LightManager::Render(FSceneNode* Frame)

if (light.isDisco)
{
light.d3dLight.Range *= 2.0f;
light.d3dLight.Range *= 3.0f;
for (uint8_t i = 0; i < light.lightExtraCount; i++)
{
uint32_t discoReservedIndex = LevelLightsExtraRange.lower + light.lightExtraIndex + i;
Expand Down Expand Up @@ -168,8 +168,12 @@ void LightManager::Render(FSceneNode* Frame)

bool LightManager::CalculateLightInfo(AActor* pActor, LightManager::LightInfo& pmInfo)
{
const bool isDisco = (pActor->LightEffect == ELightEffect::LE_Disco);
const bool isSpotlight = (pActor->LightEffect == ELightEffect::LE_Spotlight || pActor->LightEffect == ELightEffect::LE_StaticSpot);
const bool isPointlight = !pmInfo.isSpotlight && !pmInfo.isDisco; //(pActor->LightEffect == ELightEffect::LE_None || pActor->LightEffect == ELightEffect::LE_NonIncidence);

if (pActor == nullptr ||
pActor->bSpecialLit ||
(pActor->bSpecialLit && !isDisco) ||
pActor->LightType != ELightType::LT_Steady ||
pActor->LightBrightness <= 0)
{
Expand Down

0 comments on commit fe00d2e

Please sign in to comment.