Use a faster way to find the closest light probe
Fix light probe not being applied to psprite
This commit is contained in:
parent
b59bd46b79
commit
764a08752f
8 changed files with 103 additions and 28 deletions
|
|
@ -172,6 +172,12 @@ void HWSprite::DrawSprite(HWDrawInfo *di, FRenderState &state, bool translucent)
|
|||
di->GetDynSpriteLight(gl_light_sprites ? actor : nullptr, gl_light_particles ? particle : nullptr, out);
|
||||
state.SetDynLight(out[0], out[1], out[2]);
|
||||
}
|
||||
else if (di->Level->LightProbes.Size() > 0)
|
||||
{
|
||||
LightProbe* probe = FindLightProbe(di->Level, actor->X(), actor->Y(), actor->Center());
|
||||
if (probe)
|
||||
state.SetDynLight(probe->Red, probe->Green, probe->Blue);
|
||||
}
|
||||
}
|
||||
sector_t *cursec = actor ? actor->Sector : particle ? particle->subsector->sector : nullptr;
|
||||
if (cursec != nullptr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue