diff options
| author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2026-01-15 21:49:17 +0200 |
|---|---|---|
| committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2026-01-15 21:54:48 +0200 |
| commit | e4a079e14dea60d48342473fecb7762c29ad0456 (patch) | |
| tree | a3499be0247d2c8b559882c3d8348b150e2ae0f9 /indra/newview/llface.cpp | |
| parent | a377ec310848657ca6f4b76bdf74aca9cfc6f9da (diff) | |
| parent | 106556538c6d7f4098bd204fcb87860f8e2bff6c (diff) | |
Merge branch 'develop' into project/flat-ui-fonts-update
Diffstat (limited to 'indra/newview/llface.cpp')
| -rw-r--r-- | indra/newview/llface.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index f08ef8d24a..7c631a7280 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -2378,7 +2378,11 @@ F32 LLFace::adjustPartialOverlapPixelArea(F32 cos_angle_to_view_dir, F32 radius //the above calculation is too expensive //the below is a good estimation: bounding box of the bounding sphere: - F32 alpha = 0.5f * (radius + screen_radius - d) / radius ; + F32 alpha = 1.f; + if (!is_approx_zero(radius)) // radius can be something like -1e-10 + { + alpha = 0.5f * (radius + screen_radius - d) / radius; + } alpha = llclamp(alpha, 0.f, 1.f) ; return alpha * alpha ; } |
