diff options
author | Geenz <geenz@geenzo.com> | 2019-03-29 11:57:45 -0700 |
---|---|---|
committer | Geenz <geenz@geenzo.com> | 2019-03-29 11:57:45 -0700 |
commit | 0272c47e5a31cf972e02fbf14cb2642f86f75d78 (patch) | |
tree | 030d1e05727a42d3a864e019601247df0ae869a0 /indra/newview | |
parent | f3ea75cfa903f5dedc01930a50312049f4207e46 (diff) |
Tweaked naming a bit, also white space.
Will wait for a response from @graham_linden regarding moving the sRGB conversion functions in llmath.h to llrender.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/lldrawpoolwlsky.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llvosky.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llvovolume.cpp | 20 | ||||
-rw-r--r-- | indra/newview/llvovolume.h | 2 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 11 |
5 files changed, 28 insertions, 31 deletions
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp index f674766935..a3aa0e289f 100644 --- a/indra/newview/lldrawpoolwlsky.cpp +++ b/indra/newview/lldrawpoolwlsky.cpp @@ -503,7 +503,7 @@ void LLDrawPoolWLSky::renderHeavenlyBodies() LLColor4 color(gSky.mVOSkyp->getSun().getInterpColor()); - sun_shader->uniform4fv(LLShaderMgr::DIFFUSE_COLOR, 1, color.mV); + sun_shader->uniform4fv(LLShaderMgr::DIFFUSE_COLOR, 1, color.mV); sun_shader->uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor); LLFacePool::LLOverrideFaceColor color_override(this, color); @@ -553,9 +553,9 @@ void LLDrawPoolWLSky::renderHeavenlyBodies() F32 moon_brightness = (float)psky->getMoonBrightness(); - moon_shader->uniform1f(LLShaderMgr::MOON_BRIGHTNESS, moon_brightness); - moon_shader->uniform4fv(LLShaderMgr::MOONLIGHT_COLOR, 1, gSky.mVOSkyp->getMoon().getColor().mV); - moon_shader->uniform4fv(LLShaderMgr::DIFFUSE_COLOR, 1, color.mV); + moon_shader->uniform1f(LLShaderMgr::MOON_BRIGHTNESS, moon_brightness); + moon_shader->uniform4fv(LLShaderMgr::MOONLIGHT_COLOR, 1, gSky.mVOSkyp->getMoon().getColor().mV); + moon_shader->uniform4fv(LLShaderMgr::DIFFUSE_COLOR, 1, color.mV); moon_shader->uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor); LLFacePool::LLOverrideFaceColor color_override(this, color); diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 954a590682..a181fdaf50 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -207,12 +207,12 @@ void LLSkyTex::create(const F32 brightness) void LLSkyTex::createGLImage(S32 which) { - if (LLPipeline::RenderDeferred) { - mTexture[which]->setExplicitFormat(GL_SRGB8_ALPHA8, GL_RGBA); - } - else { - mTexture[which]->setExplicitFormat(GL_RGBA8, GL_RGBA); - } + if (LLPipeline::RenderDeferred) { + mTexture[which]->setExplicitFormat(GL_SRGB8_ALPHA8, GL_RGBA); + } + else { + mTexture[which]->setExplicitFormat(GL_RGBA8, GL_RGBA); + } mTexture[which]->createGLTexture(0, mImageRaw[which], 0, TRUE, LLGLTexture::LOCAL); mTexture[which]->setAddressMode(LLTexUnit::TAM_CLAMP); } @@ -619,10 +619,10 @@ void LLVOSky::initCubeMap() } else if (gSavedSettings.getBOOL("RenderWater") && gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps) { - bool wantsRGB = LLPipeline::RenderDeferred; + bool wantsRGB = LLPipeline::RenderDeferred; - mCubeMap = new LLCubeMap(wantsRGB); - mCubeMap->init(images); + mCubeMap = new LLCubeMap(wantsRGB); + mCubeMap->init(images); } gGL.getTexUnit(0)->disable(); } diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 16fca58f8c..1fd7c7d3ce 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -3239,17 +3239,17 @@ LLColor3 LLVOVolume::getLightColor() const } } -LLColor3 LLVOVolume::getLightsRGBColor() const +LLColor3 LLVOVolume::getLightSRGBColor() const { - const LLLightParams *param_block = (const LLLightParams *)getParameterEntry(LLNetworkData::PARAMS_LIGHT); - if (param_block) - { - return LLColor3(param_block->getsRGBColor()) * param_block->getsRGBColor().mV[3]; - } - else - { - return LLColor3(1, 1, 1); - } + const LLLightParams *param_block = (const LLLightParams *)getParameterEntry(LLNetworkData::PARAMS_LIGHT); + if (param_block) + { + return LLColor3(param_block->getSRGBColor()) * param_block->getSRGBColor().mV[3]; + } + else + { + return LLColor3(1, 1, 1); + } } LLUUID LLVOVolume::getLightTextureID() const diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index aeabcda911..da2b086f4a 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -251,7 +251,7 @@ public: BOOL getIsLight() const; LLColor3 getLightBaseColor() const; // not scaled by intensity LLColor3 getLightColor() const; // scaled by intensity - LLColor3 getLightsRGBColor() const; // Used to get the (cached) light color in sRGB color space. Also scaled by intensity. + LLColor3 getLightSRGBColor() const; // Used to get the (cached) light color in sRGB color space. Also scaled by intensity. LLUUID getLightTextureID() const; bool isLightSpotlight() const; LLVector3 getSpotLightParams() const; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index b8c8a42125..f84cd594c9 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -8368,7 +8368,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, LLRenderTarget* light_ shader.uniform1f(LLShaderMgr::DEFERRED_NORM_CUTOFF, RenderEdgeNormCutoff); shader.uniform4fv(LLShaderMgr::SUNLIGHT_COLOR, 1, mSunDiffuse.mV); - shader.uniform4fv(LLShaderMgr::MOONLIGHT_COLOR, 1, srgbColor4(mMoonDiffuse).mV); + shader.uniform4fv(LLShaderMgr::MOONLIGHT_COLOR, 1, mMoonDiffuse.mV); LLEnvironment& environment = LLEnvironment::instance(); shader.uniform1i(LLShaderMgr::SUN_UP_FACTOR, environment.getIsSunUp() ? 1 : 0); @@ -8705,7 +8705,7 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget* screen_target) const F32* c = center.getF32ptr(); F32 s = volume->getLightRadius()*1.5f; - LLColor3 col = volume->getLightsRGBColor(); + LLColor3 col = volume->getLightSRGBColor(); if (col.magVecSquared() < 0.001f) { @@ -8797,10 +8797,7 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget* screen_target) setupSpotLight(gDeferredSpotLightProgram, drawablep); - LLColor3 col = volume->getLightsRGBColor(); - /*col.mV[0] = powf(col.mV[0], 2.2f); - col.mV[1] = powf(col.mV[1], 2.2f); - col.mV[2] = powf(col.mV[2], 2.2f);*/ + LLColor3 col = volume->getLightSRGBColor(); gDeferredSpotLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, c); gDeferredSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s); @@ -8888,7 +8885,7 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget* screen_target) setupSpotLight(gDeferredMultiSpotLightProgram, drawablep); - LLColor3 col = volume->getLightsRGBColor(); + LLColor3 col = volume->getLightSRGBColor(); gDeferredMultiSpotLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, tc.v); gDeferredMultiSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s); |