summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Houlton <euclid@lindenlab.com>2020-08-05 12:30:24 -0600
committerDave Houlton <euclid@lindenlab.com>2020-08-05 12:30:24 -0600
commit92ee1be5cf08158a40113a4bab5b7c5a9fc42055 (patch)
treed26f356660bde5d9784d9e4671c5f28f3a9ec039
parent8b314a646f67c8b0ebb81c8b81400b6509c51737 (diff)
SL-13521, clang-format LLRender::syncLightState() (whitespace)
-rw-r--r--indra/llrender/llrender.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 5208db48d2..11d9ef3f57 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -1198,46 +1198,46 @@ void LLRender::refreshState(void)
void LLRender::syncLightState()
{
- LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
+ LLGLSLShader *shader = LLGLSLShader::sCurBoundShaderPtr;
- if (!shader)
- {
- return;
- }
+ if (!shader)
+ {
+ return;
+ }
- if (shader->mLightHash != mLightHash)
- {
- shader->mLightHash = mLightHash;
+ if (shader->mLightHash != mLightHash)
+ {
+ shader->mLightHash = mLightHash;
- LLVector4 position[LL_NUM_LIGHT_UNITS];
- LLVector3 direction[LL_NUM_LIGHT_UNITS];
- LLVector4 attenuation[LL_NUM_LIGHT_UNITS];
- LLVector3 diffuse[LL_NUM_LIGHT_UNITS];
+ LLVector4 position[LL_NUM_LIGHT_UNITS];
+ LLVector3 direction[LL_NUM_LIGHT_UNITS];
+ LLVector4 attenuation[LL_NUM_LIGHT_UNITS];
+ LLVector3 diffuse[LL_NUM_LIGHT_UNITS];
LLVector3 diffuse_b[LL_NUM_LIGHT_UNITS];
bool sun_primary[LL_NUM_LIGHT_UNITS];
- for (U32 i = 0; i < LL_NUM_LIGHT_UNITS; i++)
- {
- LLLightState* light = mLightState[i];
+ for (U32 i = 0; i < LL_NUM_LIGHT_UNITS; i++)
+ {
+ LLLightState *light = mLightState[i];
- position[i] = light->mPosition;
- direction[i] = light->mSpotDirection;
+ position[i] = light->mPosition;
+ direction[i] = light->mSpotDirection;
attenuation[i].set(light->mLinearAtten, light->mQuadraticAtten, light->mSpecular.mV[2], light->mSpecular.mV[3]);
- diffuse[i].set(light->mDiffuse.mV);
+ diffuse[i].set(light->mDiffuse.mV);
diffuse_b[i].set(light->mDiffuseB.mV);
sun_primary[i] = light->mSunIsPrimary;
- }
+ }
- shader->uniform4fv(LLShaderMgr::LIGHT_POSITION, LL_NUM_LIGHT_UNITS, position[0].mV);
- shader->uniform3fv(LLShaderMgr::LIGHT_DIRECTION, LL_NUM_LIGHT_UNITS, direction[0].mV);
- shader->uniform4fv(LLShaderMgr::LIGHT_ATTENUATION, LL_NUM_LIGHT_UNITS, attenuation[0].mV);
- shader->uniform3fv(LLShaderMgr::LIGHT_DIFFUSE, LL_NUM_LIGHT_UNITS, diffuse[0].mV);
- shader->uniform4fv(LLShaderMgr::LIGHT_AMBIENT, 1, mAmbientLightColor.mV);
+ shader->uniform4fv(LLShaderMgr::LIGHT_POSITION, LL_NUM_LIGHT_UNITS, position[0].mV);
+ shader->uniform3fv(LLShaderMgr::LIGHT_DIRECTION, LL_NUM_LIGHT_UNITS, direction[0].mV);
+ shader->uniform4fv(LLShaderMgr::LIGHT_ATTENUATION, LL_NUM_LIGHT_UNITS, attenuation[0].mV);
+ shader->uniform3fv(LLShaderMgr::LIGHT_DIFFUSE, LL_NUM_LIGHT_UNITS, diffuse[0].mV);
+ shader->uniform4fv(LLShaderMgr::LIGHT_AMBIENT, 1, mAmbientLightColor.mV);
shader->uniform1i(LLShaderMgr::SUN_UP_FACTOR, sun_primary[0] ? 1 : 0);
shader->uniform4fv(LLShaderMgr::AMBIENT, 1, mAmbientLightColor.mV);
shader->uniform4fv(LLShaderMgr::SUNLIGHT_COLOR, 1, diffuse[0].mV);
shader->uniform4fv(LLShaderMgr::MOONLIGHT_COLOR, 1, diffuse_b[0].mV);
- }
+ }
}
void LLRender::syncMatrices()