diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/lllegacyatmospherics.cpp | 11 | 
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/lllegacyatmospherics.cpp b/indra/newview/lllegacyatmospherics.cpp index 04623c4452..0c4e5b48e8 100644 --- a/indra/newview/lllegacyatmospherics.cpp +++ b/indra/newview/lllegacyatmospherics.cpp @@ -333,8 +333,17 @@ void LLAtmospherics::calcSkyColorWLVert(LLVector3 & Pn, AtmosphericsVars& vars)  		// temp2.x is 0 at the sun and increases away from sun  	temp2.mV[0] = llmax(temp2.mV[0], .001f);	  		// Set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot) -	temp2.mV[0] *= glow.mV[0]; + +	if (glow.mV[0] > 0) // don't pow(zero,negative value), glow from 0 to 2 +	{  		// Higher glow.x gives dimmer glow (because next step is 1 / "angle") +		temp2.mV[0] *= glow.mV[0]; +	} +	else +	{ +		temp2.mV[0] = F32_MIN; +	} +  	temp2.mV[0] = pow(temp2.mV[0], glow.mV[2]);  		// glow.z should be negative, so we're doing a sort of (1 / "angle") function  | 
