mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- Screenblend fixes.
This commit is contained in:
parent
f8c65839f0
commit
596367f10f
2 changed files with 3 additions and 2 deletions
|
@ -564,6 +564,7 @@ ScreenJobRunner *runner;
|
||||||
void RunScreenJob(JobDesc* jobs, int count, CompletionFunc completion, bool clearbefore, bool blockingui)
|
void RunScreenJob(JobDesc* jobs, int count, CompletionFunc completion, bool clearbefore, bool blockingui)
|
||||||
{
|
{
|
||||||
assert(completion != nullptr);
|
assert(completion != nullptr);
|
||||||
|
videoclearFade();
|
||||||
if (count)
|
if (count)
|
||||||
{
|
{
|
||||||
runner = new ScreenJobRunner(jobs, count, completion, clearbefore);
|
runner = new ScreenJobRunner(jobs, count, completion, clearbefore);
|
||||||
|
|
|
@ -257,8 +257,8 @@ void displayrest(double smoothratio)
|
||||||
if (blend[3])
|
if (blend[3])
|
||||||
{
|
{
|
||||||
// result must be multiplied by 4 and normalised to 255. (4*255 = 1020)
|
// result must be multiplied by 4 and normalised to 255. (4*255 = 1020)
|
||||||
auto comp = [&](int i) { return clamp(int(blend[i] * 1020), 0, 255); };
|
auto comp = [&](int i, int maxv=255) { return clamp(int(blend[i] * 1020), 0, maxv); };
|
||||||
videoFadePalette(comp(0), comp(1), comp(2), comp(3));
|
videoFadePalette(comp(0), comp(1), comp(2), comp(3, 192)); // Never fully saturate the alpha channel
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
videoclearFade();
|
videoclearFade();
|
||||||
|
|
Loading…
Reference in a new issue