mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 05:51:20 +00:00
Merge remote-tracking branch 'nash/lightmaps2' into lightmaps2
This commit is contained in:
commit
b52aea5a4d
1 changed files with 13 additions and 0 deletions
|
@ -61,6 +61,19 @@ void HWDecal::DrawDecal(HWDrawInfo *di, FRenderState &state)
|
|||
state.SetObjectColor(DecalColor);
|
||||
|
||||
state.SetLightIndex(dynlightindex);
|
||||
|
||||
// add light probe contribution
|
||||
if (di->Level->LightProbes.Size() > 0)
|
||||
{
|
||||
double x, y;
|
||||
decal->GetXY(decal->Side, x, y);
|
||||
LightProbe *probe = FindLightProbe(di->Level, x, y, decal->GetRealZ(decal->Side) * 0.5);
|
||||
if (probe)
|
||||
{
|
||||
state.SetDynLight(probe->Red, probe->Green, probe->Blue);
|
||||
}
|
||||
}
|
||||
|
||||
state.SetTextureMode(decal->RenderStyle);
|
||||
state.SetRenderStyle(decal->RenderStyle);
|
||||
state.SetMaterial(texture, UF_Sprite, 0, CLAMP_XY, decal->Translation, -1);
|
||||
|
|
Loading…
Reference in a new issue