Convert fogball calculations from sRGB to linear

This commit is contained in:
RaveYard 2024-01-10 13:10:26 +01:00 committed by Nash Muhandes
commit 7f7363e30b
2 changed files with 8 additions and 2 deletions

View file

@ -774,7 +774,7 @@ void HWSprite::Process(HWDrawInfo *di, FRenderState& state, AActor* thing, secto
Fogball fogball;
fogball.Position = FVector3(thing->Pos());
fogball.Radius = (float)thing->args[3];
fogball.Color = FVector3(thing->args[0] * (1.0f / 255.0f), thing->args[1] * (1.0f / 255.0f), thing->args[2] * (1.0f / 255.0f));
fogball.Color = FVector3(powf(thing->args[0] * (1.0f / 255.0f), 2.2), powf(thing->args[1] * (1.0f / 255.0f), 2.2), powf(thing->args[2] * (1.0f / 255.0f), 2.2));
fogball.Fog = (float)thing->Alpha;
di->Fogballs.Push(fogball);
return;