diff options
| author | Richard Linden <none@none> | 2011-08-11 10:09:28 -0700 |
|---|---|---|
| committer | Richard Linden <none@none> | 2011-08-11 10:09:28 -0700 |
| commit | 9a9e78740ada6a64847d1e915ae8e92258e8f10a (patch) | |
| tree | 43935b338c5a87ca32f9240389470a96271fa1f5 /indra/newview/llvosky.cpp | |
| parent | 8b09dfb8907c364f09ee82d00926219ae52b5ee9 (diff) | |
| parent | 7cc7d143837f2b75f750c139e33fdf5afa8a8866 (diff) | |
Automated merge with file:///e:\code\viewer-experience
Diffstat (limited to 'indra/newview/llvosky.cpp')
| -rw-r--r-- | indra/newview/llvosky.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 66ba6249d3..ef21e7373e 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -755,6 +755,11 @@ void LLVOSky::calcSkyColorWLVert(LLVector3 & Pn, LLColor3 & vary_HazeColor, LLCo // project the direction ray onto the sky dome. F32 phi = acos(Pn[1]); F32 sinA = sin(F_PI - phi); + if (fabsf(sinA) < 0.01f) + { //avoid division by zero + sinA = 0.01f; + } + F32 Plen = dome_radius * sin(F_PI + phi + asin(dome_offset_ratio * sinA)) / sinA; Pn *= Plen; |
