summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2019-02-04 21:32:57 +0000
committerRider Linden <rider@lindenlab.com>2019-02-04 21:32:57 +0000
commitdb01f4bb2bce97f76058bbf912cb48c985c3e10a (patch)
treed9f92d13b5084964f941e854985413edffc04740 /indra/llrender
parent0b5c452fd991648f9a5c55eb6865deda5cc1f0a4 (diff)
parent9a007cceeffb1b960ba495cd0e3d592698a52a99 (diff)
Merged in graham_linden/viewer-eep-fixes (pull request #263)
SL-10459, SL-10461
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llrender.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 5733a18f47..173444f708 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -1151,7 +1151,7 @@ void LLRender::syncLightState()
LLVector4 position[8];
LLVector3 direction[8];
- LLVector3 attenuation[8];
+ LLVector4 attenuation[8];
LLVector3 diffuse[8];
for (U32 i = 0; i < 8; i++)
@@ -1160,13 +1160,13 @@ void LLRender::syncLightState()
position[i] = light->mPosition;
direction[i] = light->mSpotDirection;
- attenuation[i].set(light->mLinearAtten, light->mQuadraticAtten, light->mSpecular.mV[3]);
+ attenuation[i].set(light->mLinearAtten, light->mQuadraticAtten, light->mSpecular.mV[2], light->mSpecular.mV[3]);
diffuse[i].set(light->mDiffuse.mV);
}
shader->uniform4fv(LLShaderMgr::LIGHT_POSITION, 8, position[0].mV);
shader->uniform3fv(LLShaderMgr::LIGHT_DIRECTION, 8, direction[0].mV);
- shader->uniform3fv(LLShaderMgr::LIGHT_ATTENUATION, 8, attenuation[0].mV);
+ shader->uniform4fv(LLShaderMgr::LIGHT_ATTENUATION, 8, attenuation[0].mV);
shader->uniform3fv(LLShaderMgr::LIGHT_DIFFUSE, 8, diffuse[0].mV);
shader->uniform4fv(LLShaderMgr::LIGHT_AMBIENT, 1, mAmbientLightColor.mV);
//HACK -- duplicate sunlight color for compatibility with drivers that can't deal with multiple shader objects referencing the same uniform