From 531c5c4e49283dcb8b5ef3d862185dc315e01b86 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 27 Jul 2011 00:19:54 -0500 Subject: SH-2120 Fix for water being very dark when basic shaders disabled. --- indra/newview/llvosky.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llvosky.cpp') diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 66ba6249d3..3a94b03a84 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -754,7 +754,7 @@ 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); + F32 sinA = llmax(sin(F_PI - phi), 0.01f); F32 Plen = dome_radius * sin(F_PI + phi + asin(dome_offset_ratio * sinA)) / sinA; Pn *= Plen; -- cgit v1.2.3