summaryrefslogtreecommitdiff
path: root/indra/newview/llface.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-12-16 21:29:28 +0200
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-12-17 11:00:53 +0200
commit96e0662f2ce9480a261215ff26b0077ff5de8792 (patch)
tree189a0728a1c5b3bb055b1b0392bd8daf0c1fb62a /indra/newview/llface.cpp
parentcd3f6f1e5b90fc5129f6525681594d3dd7953948 (diff)
#5159 Fix Animated textures freeze
Negative near zero radius was resulting in 0 return. Might need to cover negative values in general.
Diffstat (limited to 'indra/newview/llface.cpp')
-rw-r--r--indra/newview/llface.cpp6
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 ;
}