Rename getFogColor from water and sky settings to getWaterFogColor and getSkyFogColor.

meow-7.2.2
Graham Linden graham@lindenlab.com 2018-03-08 00:04:03 +00:00
parent 6d77503542
commit 096ea05a93
12 changed files with 22 additions and 22 deletions

View File

@ -76,22 +76,22 @@ public:
setValue(SETTING_BLUR_MULTIPILER, val);
}
LLColor3 getFogColor() const
LLColor3 getWaterFogColor() const
{
return LLColor3(mSettings[SETTING_FOG_COLOR]);
}
void setFogColor(LLColor3 val)
void setWaterFogColor(LLColor3 val)
{
setValue(SETTING_FOG_COLOR, val);
}
F32 getFogDensity() const
F32 getWaterFogDensity() const
{
return mSettings[SETTING_FOG_DENSITY].asReal();
}
void setFogDensity(F32 val)
void setWaterFogDensity(F32 val)
{
setValue(SETTING_FOG_DENSITY, val);
}

View File

@ -609,8 +609,8 @@ void LLDrawPoolWater::shade()
if (screentex > -1)
{
shader->uniform3fv(LLShaderMgr::WATER_FOGCOLOR, 1, pwater->getFogColor().mV);
shader->uniform1f(LLShaderMgr::WATER_FOGDENSITY, pwater->getFogDensity());
shader->uniform3fv(LLShaderMgr::WATER_FOGCOLOR, 1, pwater->getWaterFogColor().mV);
shader->uniform1f(LLShaderMgr::WATER_FOGDENSITY, pwater->getWaterFogDensity());
gPipeline.mWaterDis.bindTexture(0, screentex);
}
@ -620,8 +620,8 @@ void LLDrawPoolWater::shade()
if (mVertexShaderLevel == 1)
{
LLColor4 fog_color(pwater->getFogColor(), 0.f);
fog_color[3] = pwater->getFogDensity();
LLColor4 fog_color(pwater->getWaterFogColor(), 0.f);
fog_color[3] = pwater->getWaterFogDensity();
shader->uniform4fv(LLShaderMgr::WATER_FOGCOLOR, 1, fog_color.mV);
}

View File

@ -184,10 +184,10 @@ void LLFloaterEditWater::syncControls()
mWaterPresetCombo->setValue(name);
//getChild<LLUICtrl>("WaterGlow")->setValue(col.mV[3]);
getChild<LLColorSwatchCtrl>("WaterFogColor")->set(LLColor4(pwater->getFogColor()));
getChild<LLColorSwatchCtrl>("WaterFogColor")->set(LLColor4(pwater->getWaterFogColor()));
// fog and wavelets
mWaterAdapter->mFogDensity = pwater->getFogDensity();
mWaterAdapter->mFogDensity = pwater->getWaterFogDensity();
getChild<LLUICtrl>("WaterFogDensity")->setValue(mWaterAdapter->mFogDensity.getExp());
mWaterAdapter->mUnderWaterFogMod = pwater->getFogMod();

View File

@ -553,8 +553,8 @@ void LLAtmospherics::updateFog(const F32 distance, LLVector3& tosun)
F32 depth = water_height - camera_height;
// get the water param manager variables
float water_fog_density = pwater->getFogDensity();
LLColor4 water_fog_color(pwater->getFogColor());
float water_fog_density = pwater->getWaterFogDensity();
LLColor4 water_fog_color(pwater->getWaterFogColor());
// adjust the color based on depth. We're doing linear approximations
float depth_scale = gSavedSettings.getF32("WaterGLFogDepthScale");

View File

@ -377,11 +377,11 @@ void LLSky::setSunPhase(const F32 phase)
//////////////////////////////////////////////////////////////////////
LLColor4 LLSky::getFogColor() const
LLColor4 LLSky::getSkyFogColor() const
{
if (mVOSkyp)
{
return mVOSkyp->getFogColor();
return mVOSkyp->getSkyFogColor();
}
return LLColor4(1.f, 1.f, 1.f, 1.f);

View File

@ -54,7 +54,7 @@ public:
void setSunDirection(const LLVector3 &sun_direction, const LLVector3 &moon_direction);
LLColor4 getFogColor() const;
LLColor4 getSkyFogColor() const;
void setCloudDensityAtAgent(F32 cloud_density);
void setWind(const LLVector3& wind);

View File

@ -570,8 +570,8 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
color_frac = 1.f - 0.6f*(dist/LLViewerCamera::getInstance()->getFar());
}
LLColor4 fogged_color = color_frac * color + (1 - color_frac)*gSky.getFogColor();
LLColor4 fogged_color_under = color_frac * color_under + (1 - color_frac) * gSky.getFogColor();
LLColor4 fogged_color = color_frac * color + (1 - color_frac)*gSky.getSkyFogColor();
LLColor4 fogged_color_under = color_frac * color_under + (1 - color_frac) * gSky.getSkyFogColor();
F32 FADE_DIST = 3.f;
fogged_color.mV[3] = llmax(0.2f, llmin(0.5f,(dist-FADE_DIST)/FADE_DIST));

View File

@ -920,7 +920,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
gPipeline.mScreen.bindTarget();
if (LLPipeline::sUnderWaterRender && !gPipeline.canUseWindLightShaders())
{
const LLColor4 &col = LLEnvironment::instance().getCurrentWater()->getFogColor();
const LLColor4 &col = LLEnvironment::instance().getCurrentWater()->getWaterFogColor();
glClearColor(col.mV[0], col.mV[1], col.mV[2], 0.f);
}
gPipeline.mScreen.clear();

View File

@ -126,7 +126,7 @@ BOOL LLVOGround::updateGeometry(LLDrawable *drawable)
left_dir.normVec();
// Our center top point
LLColor4 ground_color = gSky.getFogColor();
LLColor4 ground_color = gSky.getSkyFogColor();
ground_color.mV[3] = 1.f;
face->setFaceColor(ground_color);

View File

@ -1254,7 +1254,7 @@ void LLVOSky::updateReflectionGeometry(LLDrawable *drawable, F32 H,
const F32 attenuation = min_attenuation
+ cos_angle_of_view * (max_attenuation - min_attenuation);
LLColor4 hb_refl_col = (1 - attenuation) * hb_col + attenuation * getFogColor();
LLColor4 hb_refl_col = (1 - attenuation) * hb_col + attenuation * getSkyFogColor();
face->setFaceColor(hb_refl_col);
LLVector3 v_far[2];

View File

@ -307,7 +307,7 @@ public:
void setFogRatio(const F32 fog_ratio) { m_legacyAtmospherics.setFogRatio(fog_ratio); }
F32 getFogRatio() const { return m_legacyAtmospherics.getFogRatio(); }
LLColor4 getFogColor() const { return m_legacyAtmospherics.getFogColor(); }
LLColor4 getSkyFogColor() const { return m_legacyAtmospherics.getFogColor(); }
LLColor4 getGLFogColor() const { return m_legacyAtmospherics.getGLFogColor(); }
LLColor4U getFadeColor() const;

View File

@ -10043,7 +10043,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
LLColor3 col = LLEnvironment::instance().getCurrentWater()->getFogColor();
LLColor3 col = LLEnvironment::instance().getCurrentWater()->getWaterFogColor();
glClearColor(col.mV[0], col.mV[1], col.mV[2], 0.f);
mWaterDis.bindTarget();
LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WATER1;