summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-11-01 18:12:19 +0000
committerRider Linden <rider@lindenlab.com>2018-11-01 18:12:19 +0000
commite6b5ed3fefb1b5f0fca59075a20404a160b5116b (patch)
tree20196e39e2391e59c8dc4f2871709bc64dab4f9d /indra
parent2c5d17aa6badb25718c8a328c83be3a8f3debd8e (diff)
parenta67cf385d763325119f4d2a37beb96c9c6a80282 (diff)
Merged in graham_linden/viewer-eep-fixes (pull request #178)
Default
Diffstat (limited to 'indra')
-rw-r--r--indra/llinventory/llsettingssky.cpp16
-rw-r--r--indra/llrender/llglslshader.cpp8
-rw-r--r--indra/llrender/llshadermgr.cpp38
3 files changed, 16 insertions, 46 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index 9d839e88d0..f21cca34a6 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -169,13 +169,13 @@ LLSettingsSky::validation_list_t legacyHazeValidationList()
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)("*")),
LLSD(LLSDArray(3.0f)(3.0f)(3.0f)("*")))));
legacyHazeValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_HAZE_DENSITY, false, LLSD::TypeReal,
- boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(4.0f)))));
+ boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(5.0f)))));
legacyHazeValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_HAZE_HORIZON, false, LLSD::TypeReal,
- boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
+ boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(5.0f)))));
legacyHazeValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DENSITY_MULTIPLIER, false, LLSD::TypeReal,
- boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0001f)(0.9f)))));
+ boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0001f)(2.0f)))));
legacyHazeValidation.push_back(LLSettingsBase::Validator(LLSettingsSky::SETTING_DISTANCE_MULTIPLIER, false, LLSD::TypeReal,
- boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(100.0f)))));
+ boost::bind(&LLSettingsBase::Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0001f)(1000.0f)))));
}
return legacyHazeValidation;
}
@@ -763,6 +763,10 @@ LLSD LLSettingsSky::translateLegacyHazeSettings(const LLSD& legacy)
// AdvancedAtmospherics TODO
// These need to be translated into density profile info in the new settings format...
// LEGACY_ATMOSPHERICS
+ if (legacy.has(SETTING_AMBIENT))
+ {
+ legacyhazesettings[SETTING_AMBIENT] = LLColor3(legacy[SETTING_AMBIENT]).getValue();
+ }
if (legacy.has(SETTING_BLUE_DENSITY))
{
legacyhazesettings[SETTING_BLUE_DENSITY] = LLColor3(legacy[SETTING_BLUE_DENSITY]).getValue();
@@ -804,10 +808,6 @@ LLSD LLSettingsSky::translateLegacySettings(const LLSD& legacy)
newsettings[SETTING_LEGACY_HAZE] = legacyhazesettings;
}
- if (legacy.has(SETTING_AMBIENT))
- {
- newsettings[SETTING_AMBIENT] = LLColor3(legacy[SETTING_AMBIENT]).getValue();
- }
if (legacy.has(SETTING_CLOUD_COLOR))
{
newsettings[SETTING_CLOUD_COLOR] = LLColor3(legacy[SETTING_CLOUD_COLOR]).getValue();
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index f0cc9acc06..de15d1d75b 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -487,18 +487,18 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString> * attributes,
return success;
}
-BOOL LLGLSLShader::attachObject(std::string object)
+BOOL LLGLSLShader::attachObject(std::string object_path)
{
- if (LLShaderMgr::instance()->mShaderObjects.count(object) > 0)
+ if (LLShaderMgr::instance()->mShaderObjects.count(object_path) > 0)
{
stop_glerror();
- glAttachObjectARB(mProgramObject, LLShaderMgr::instance()->mShaderObjects[object]);
+ glAttachObjectARB(mProgramObject, LLShaderMgr::instance()->mShaderObjects[object_path]);
stop_glerror();
return TRUE;
}
else
{
- LL_SHADER_LOADING_WARNS() << "Attempting to attach shader object that hasn't been compiled: " << object << LL_ENDL;
+ LL_SHADER_LOADING_WARNS() << "Attempting to attach shader object: '" << object_path << "' that hasn't been compiled." << LL_ENDL;
return FALSE;
}
}
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index 9da705bb2d..d6fe35e2ca 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -628,7 +628,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
if (file == NULL)
{
- LL_SHADER_LOADING_WARNS() << "GLSL Shader file not found: " << filename << LL_ENDL;
+ LL_SHADER_LOADING_WARNS() << "GLSL Shader file not found: " << open_file_name << LL_ENDL;
return 0;
}
@@ -958,38 +958,8 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
{
//an error occured, print log
LL_WARNS("ShaderLoading") << "GLSL Compilation Error:" << LL_ENDL;
- dumpObjectLog(ret, TRUE, filename);
-#if LL_WINDOWS
- std::stringstream ostr;
- //dump shader source for debugging
- for (GLuint i = 0; i < shader_code_count; i++)
- {
- ostr << i << ": " << shader_code_text[i];
-
- if (i % 128 == 0)
- { //dump every 128 lines
-
- LL_WARNS("ShaderLoading") << "\n" << ostr.str() << LL_ENDL;
- ostr = std::stringstream();
- }
-
- }
-
- LL_WARNS("ShaderLoading") << "\n" << ostr.str() << LL_ENDL;
-#else
- std::string str;
-
- for (GLuint i = 0; i < shader_code_count; i++) {
- str.append(shader_code_text[i]);
-
- if (i % 128 == 0)
- {
- LL_WARNS("ShaderLoading") << str << LL_ENDL;
- str = "";
- }
- }
-#endif
-
+ dumpObjectLog(ret, TRUE, open_file_name);
+ dumpShaderSource(shader_code_count, shader_code_text);
ret = 0;
}
}
@@ -1018,7 +988,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
if (shader_level > 1)
{
shader_level--;
- return loadShaderFile(filename,shader_level,type, defines, texture_index_channels);
+ return loadShaderFile(filename, shader_level, type, defines, texture_index_channels);
}
LL_WARNS("ShaderLoading") << "Failed to load " << filename << LL_ENDL;
}