forked from Mirrors/openclonk
Another eta, this time for the fade cross check
This was behind the rare "white dots" issues. Boy, floating point numbers are fiddly to work with - corner cases everywhere.stable-6.1
parent
5d505a5751
commit
ccc7382ab9
|
@ -781,8 +781,9 @@ std::list<C4FoWBeamTriangle> C4FoWLightSection::CalculateTriangles(C4FoWRegion *
|
|||
tri.fadeRY = tri.fanRY + d * dy;
|
||||
|
||||
// Do the fades cross?
|
||||
const double fadeCrossEta = 0.01
|
||||
if ((tri.fadeRX - lightRX) / (tri.fadeRY - lightRY)
|
||||
< (tri.fadeLX - lightRX) / (tri.fadeLY - lightRY))
|
||||
< (tri.fadeLX - lightRX) / (tri.fadeLY - lightRY) + fadeCrossEta)
|
||||
{
|
||||
// Average it
|
||||
tri.fadeLX = tri.fadeRX = (tri.fadeLX + tri.fadeRX) / 2;
|
||||
|
|
Loading…
Reference in New Issue