MAINT-8817 remove automatic update of inv_proj matrix so sunLightF which expects it not to match the projection mat works again

Fix misspellinging in missing settings asset notification string

Fix moon quat conversion to get proper directional rotation

Add early out so attempting to set parcel env settings doesn't crash
meow-7.2.2
Graham Linden 2018-06-29 20:15:10 +01:00
parent 1eda16b319
commit d5c465b4ab
5 changed files with 16 additions and 9 deletions

View File

@ -796,7 +796,7 @@ LLSD LLSettingsSky::translateLegacySettings(const LLSD& legacy)
LLQuaternion sunquat = convert_azimuth_and_altitude_to_quat(azimuth, altitude);
// original WL moon dir was diametrically opposed to the sun dir
LLQuaternion moonquat = convert_azimuth_and_altitude_to_quat(azimuth + F_PI, altitude + F_PI);
LLQuaternion moonquat = convert_azimuth_and_altitude_to_quat(azimuth + F_PI, -altitude);
newsettings[SETTING_SUN_ROTATION] = sunquat.getValue();
newsettings[SETTING_MOON_ROTATION] = moonquat.getValue();

View File

@ -1275,11 +1275,13 @@ void LLRender::syncMatrices()
{ //update projection matrix, normal, and MVP
glh::matrix4f& mat = mMatrix[MM_PROJECTION][mMatIdx[MM_PROJECTION]];
if (shader->getUniformLocation(LLShaderMgr::INVERSE_PROJECTION_MATRIX))
{
glh::matrix4f inv_proj = mat.inverse();
shader->uniformMatrix4fv(LLShaderMgr::INVERSE_PROJECTION_MATRIX, 1, FALSE, inv_proj.m);
}
// it would be nice to have this automatically track the state of the proj matrix
// but certain render paths require it to be mismatched *sigh*
//if (shader->getUniformLocation(LLShaderMgr::INVERSE_PROJECTION_MATRIX))
//{
// glh::matrix4f inv_proj = mat.inverse();
// shader->uniformMatrix4fv(LLShaderMgr::INVERSE_PROJECTION_MATRIX, 1, FALSE, inv_proj.m);
//}
shader->uniformMatrix4fv(name[MM_PROJECTION], 1, GL_FALSE, mat.m);
shader->mMatHash[MM_PROJECTION] = mMatHash[MM_PROJECTION];

View File

@ -3297,6 +3297,7 @@ void LLPanelLandEnvironment::doApply()
if (!parcel)
{
LL_WARNS("PARCEL") << "Could not get parcel." << LL_ENDL;
return;
}
S32 parcel_id = parcel->getLocalID();

View File

@ -6258,8 +6258,8 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
// Light 0 = Sun or Moon (All objects)
{
LLVector4 sun_dir = environment.getSunDirectionCFR();
LLVector4 moon_dir = environment.getMoonDirectionCFR();
LLVector4 sun_dir(environment.getSunDirection(), 0.0f);
LLVector4 moon_dir(environment.getMoonDirection(), 0.0f);
mSunDir.setVec(sun_dir);
mMoonDir.setVec(moon_dir);
@ -8480,9 +8480,11 @@ void LLPipeline::renderDeferredLighting()
glh::vec4f tc(mSunDir.mV);
mat.mult_matrix_vec(tc);
mTransformedSunDir.set(tc.v);
mTransformedSunDir.normalize();
glh::vec4f tc_moon(mMoonDir.mV);
mTransformedMoonDir.set(tc_moon.v);
mTransformedMoonDir.normalize();
}
gGL.pushMatrix();
@ -9096,9 +9098,11 @@ void LLPipeline::renderDeferredLightingToRT(LLRenderTarget* target)
glh::vec4f tc(mSunDir.mV);
mat.mult_matrix_vec(tc);
mTransformedSunDir.set(tc.v);
mTransformedSunDir.normalize();
glh::vec4f tc_moon(mMoonDir.mV);
mTransformedMoonDir.set(tc_moon.v);
mTransformedMoonDir.normalize();
}
gGL.pushMatrix();

View File

@ -11101,7 +11101,7 @@ Cannot create large prims that intersect other residents. Please re-try when ot
name="FailedToFindSettings"
persist="true"
type="alertmodal">
Failed to find the settisgs named [DESC] in database.
Failed to find the settings named [DESC] in database.
<tag>fail</tag>
</notification>