diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/lldrawpoolwater.cpp | 11 | ||||
-rw-r--r-- | indra/newview/lllegacyatmospherics.cpp | 2 | ||||
-rw-r--r-- | indra/newview/lllegacyatmospherics.h | 10 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llvosky.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llvosky.h | 1 |
6 files changed, 17 insertions, 17 deletions
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index 5c92cf9fce..493c619a99 100644 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -488,22 +488,21 @@ void LLDrawPoolWater::shade() LLVector3 light_dir; LLColor3 light_color; - LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); LLSettingsWater::ptr_t pwater = LLEnvironment::instance().getCurrentWater(); - light_dir = psky->getLightDirection(); + light_dir = voskyp->getLightDirection(); if (LLEnvironment::instance().getIsDayTime()) { - light_color = psky->getSunAmbient(); - light_diffuse = psky->getSunDiffuse(); + light_color = voskyp->getSunAmbientColor(); + light_diffuse = voskyp->getSunDiffuseColor(); light_diffuse.normalize(); light_exp = light_dir * LLVector3(light_dir.mV[0], light_dir.mV[1], 0.f); light_diffuse *= (light_exp + 0.25f); } else { - light_color = psky->getMoonAmbient(); - light_diffuse = psky->getMoonDiffuse(); + light_color = voskyp->getMoonAmbientColor(); + light_diffuse = voskyp->getMoonDiffuseColor(); light_diffuse.normalize(); light_diffuse *= 0.5f; light_exp = light_dir * LLVector3(light_dir.mV[0], light_dir.mV[1], 0.f); diff --git a/indra/newview/lllegacyatmospherics.cpp b/indra/newview/lllegacyatmospherics.cpp index 6bc95c367c..0a788b95c7 100644 --- a/indra/newview/lllegacyatmospherics.cpp +++ b/indra/newview/lllegacyatmospherics.cpp @@ -303,7 +303,7 @@ void LLAtmospherics::calcSkyColorWLVert(LLVector3 & Pn, AtmosphericsVars& vars) // Sunlight attenuation effect (hue and brightness) due to atmosphere // this is used later for sunlight modulation at various altitudes - LLColor3 light_atten = (blue_density * 1.0 + smear(haze_density * 0.25f)) * (density_multiplier * max_y); + LLColor3 light_atten = psky->getLightAttenuation(psky->getMaxY()); // Calculate relative weights LLColor3 temp2(0.f, 0.f, 0.f); diff --git a/indra/newview/lllegacyatmospherics.h b/indra/newview/lllegacyatmospherics.h index 71469a622a..5a5b9c0022 100644 --- a/indra/newview/lllegacyatmospherics.h +++ b/indra/newview/lllegacyatmospherics.h @@ -179,18 +179,12 @@ protected: class LLCubeMap; -// turn on floating point precision -// in vs2003 for this class. Otherwise -// black dots go everywhere from 7:10 - 8:50 -#if LL_MSVC && __MSVC_VER__ < 8 -#pragma optimize("p", on) -#endif - class AtmosphericsVars { public: AtmosphericsVars() : hazeColor(0,0,0) + , hazeColorBelowCloud(0,0,0) , cloudColorSun(0,0,0) , cloudColorAmbient(0,0,0) , cloudDensity(0.0f) @@ -200,6 +194,7 @@ public: } LLColor3 hazeColor; + LLColor3 hazeColorBelowCloud; LLColor3 cloudColorSun; LLColor3 cloudColorAmbient; F32 cloudDensity; @@ -234,6 +229,7 @@ protected: void calcSkyColorWLVert(LLVector3 & Pn, AtmosphericsVars& vars); LLColor3 calcSkyColorWLFrag(LLVector3 & Pn, AtmosphericsVars& vars); + LLColor3 getHazeColor(LLSettingsSky::ptr_t psky, AtmosphericsVars& vars, F32 costheta, F32 cloud_shadow); LLHaze mHaze; F32 mHazeConcentration; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 74deaffe16..3f3d5e54cd 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -597,7 +597,7 @@ public: addText(xpos, ypos, llformat("%d Unique Textures", LLImageGL::sUniqueCount)); ypos += y_inc; - addText(xpos, ypos, llformat("%d Render Calls", last_frame_recording.getSampleCount(LLPipeline::sStatBatchSize))); + addText(xpos, ypos, llformat("%d Render Calls", (U32)last_frame_recording.getSampleCount(LLPipeline::sStatBatchSize))); ypos += y_inc; addText(xpos, ypos, llformat("%d/%d Objects Active", gObjectList.getNumActiveObjects(), gObjectList.getNumObjects())); @@ -612,9 +612,9 @@ public: gPipeline.mTextureMatrixOps = 0; gPipeline.mMatrixOpCount = 0; - if (last_frame_recording.getSampleCount(LLPipeline::sStatBatchSize) > 0) + if ((U32)last_frame_recording.getSampleCount(LLPipeline::sStatBatchSize) > 0) { - addText(xpos, ypos, llformat("Batch min/max/mean: %d/%d/%d", last_frame_recording.getMin(LLPipeline::sStatBatchSize), last_frame_recording.getMax(LLPipeline::sStatBatchSize), last_frame_recording.getMean(LLPipeline::sStatBatchSize))); + addText(xpos, ypos, llformat("Batch min/max/mean: %d/%d/%d", (U32)last_frame_recording.getMin(LLPipeline::sStatBatchSize), (U32)last_frame_recording.getMax(LLPipeline::sStatBatchSize), (U32)last_frame_recording.getMean(LLPipeline::sStatBatchSize))); } ypos += y_inc; diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 55307fe1dc..7a5c258949 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -1430,6 +1430,10 @@ void LLVOSky::setSunDirection(const LLVector3 &sun_dir, const LLVector3 &moon_di } } +LLVector3 LLVOSky::getLightDirection() const +{ + return LLEnvironment::instance().getCurrentSky()->getLightDirection(); +} LLColor4U LLVOSky::getFadeColor() const { diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index e93ff51a66..7b5ea38999 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -274,6 +274,7 @@ public: const LLVector3& getToMoonLast() const { return mMoon.getDirectionCached(); } BOOL isSunUp() const { return mSun.getDirectionCached().mV[2] > -0.05f; } + LLVector3 getLightDirection() const; LLColor3 getSunDiffuseColor() const; LLColor3 getMoonDiffuseColor() const; LLColor4 getSunAmbientColor() const; |