mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
- restored initial clamping for blend colors
https://forum.zdoom.org/viewtopic.php?t=61134
This commit is contained in:
parent
43b94d829e
commit
0a139e90fb
1 changed files with 5 additions and 1 deletions
|
@ -1418,7 +1418,11 @@ void DFrameBuffer::DrawBlend(sector_t * viewsector)
|
|||
V_AddBlend(player->BlendR, player->BlendG, player->BlendB, player->BlendA, blend);
|
||||
}
|
||||
|
||||
screen->Dim(PalEntry(255, uint8_t(blend[0] * 255), uint8_t(blend[1] * 255), uint8_t(blend[2] * 255)), blend[3], 0, 0, screen->GetWidth(), screen->GetHeight());
|
||||
const float br = clamp(blend[0] * 255.f, 0.f, 255.f);
|
||||
const float bg = clamp(blend[1] * 255.f, 0.f, 255.f);
|
||||
const float bb = clamp(blend[2] * 255.f, 0.f, 255.f);
|
||||
const PalEntry bcolor(255, uint8_t(br), uint8_t(bg), uint8_t(bb));
|
||||
screen->Dim(bcolor, blend[3], 0, 0, screen->GetWidth(), screen->GetHeight());
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue