From 14f6bbadef2c39e58a3b54c0c6212949acf50e45 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Mon, 8 Aug 2011 15:29:23 -0500
Subject: SH-2242 Work in progress migrating to glVertexAttrib everywhere
---
indra/newview/app_settings/logcontrol.xml | 2 +-
indra/newview/app_settings/settings.xml | 2 +-
.../shaders/class1/avatar/avatarSkinV.glsl | 3 +-
.../shaders/class1/avatar/avatarV.glsl | 24 +-
.../shaders/class1/avatar/eyeballV.glsl | 15 +-
.../shaders/class1/avatar/pickAvatarV.glsl | 16 +-
.../shaders/class1/deferred/alphaSkinnedV.glsl | 20 +-
.../shaders/class1/deferred/alphaV.glsl | 29 ++-
.../shaders/class1/deferred/attachmentShadowV.glsl | 10 +-
.../shaders/class1/deferred/avatarAlphaV.glsl | 32 +--
.../shaders/class1/deferred/avatarEyesV.glsl | 12 +-
.../shaders/class1/deferred/avatarShadowV.glsl | 23 +-
.../shaders/class1/deferred/avatarV.glsl | 25 +-
.../shaders/class1/deferred/blurLightV.glsl | 6 +-
.../shaders/class1/deferred/bumpSkinnedV.glsl | 16 +-
.../shaders/class1/deferred/bumpV.glsl | 16 +-
.../shaders/class1/deferred/cloudsV.glsl | 11 +-
.../shaders/class1/deferred/diffuseSkinnedV.glsl | 15 +-
.../shaders/class1/deferred/diffuseV.glsl | 14 +-
.../shaders/class1/deferred/fullbrightV.glsl | 16 +-
.../app_settings/shaders/class1/deferred/giV.glsl | 12 +-
.../shaders/class1/deferred/impostorV.glsl | 10 +-
.../shaders/class1/deferred/luminanceV.glsl | 12 +-
.../shaders/class1/deferred/multiPointLightV.glsl | 6 +-
.../shaders/class1/deferred/pointLightV.glsl | 12 +-
.../shaders/class1/deferred/postDeferredV.glsl | 6 +-
.../shaders/class1/deferred/postgiV.glsl | 5 +-
.../shaders/class1/deferred/shadowAlphaMaskV.glsl | 10 +-
.../shaders/class1/deferred/shadowV.glsl | 4 +-
.../app_settings/shaders/class1/deferred/skyV.glsl | 11 +-
.../shaders/class1/deferred/softenLightF.glsl | 6 +-
.../shaders/class1/deferred/softenLightV.glsl | 13 +-
.../shaders/class1/deferred/starsV.glsl | 10 +-
.../shaders/class1/deferred/sunLightV.glsl | 16 +-
.../shaders/class1/deferred/terrainV.glsl | 14 +-
.../shaders/class1/deferred/treeV.glsl | 12 +-
.../shaders/class1/deferred/waterV.glsl | 23 +-
.../shaders/class1/effects/glowExtractF.glsl | 2 +-
.../shaders/class1/effects/glowExtractV.glsl | 6 +-
.../app_settings/shaders/class1/effects/glowV.glsl | 21 +-
.../shaders/class1/environment/terrainV.glsl | 23 +-
.../shaders/class1/environment/waterV.glsl | 13 +-
.../shaders/class1/interface/customalphaV.glsl | 9 +-
.../shaders/class1/interface/glowcombineV.glsl | 9 +-
.../shaders/class1/interface/highlightF.glsl | 4 +-
.../shaders/class1/interface/highlightV.glsl | 18 +-
.../shaders/class1/interface/occlusionV.glsl | 4 +-
.../shaders/class1/interface/solidcolorV.glsl | 10 +-
.../shaders/class1/interface/twotextureaddV.glsl | 9 +-
.../app_settings/shaders/class1/interface/uiV.glsl | 10 +-
.../app_settings/shaders/class1/objects/bumpV.glsl | 13 +-
.../class1/objects/fullbrightShinySkinnedV.glsl | 14 +-
.../shaders/class1/objects/fullbrightShinyV.glsl | 14 +-
.../shaders/class1/objects/fullbrightSkinnedV.glsl | 14 +-
.../shaders/class1/objects/fullbrightV.glsl | 13 +-
.../class1/objects/shinySimpleSkinnedV.glsl | 15 +-
.../shaders/class1/objects/shinyV.glsl | 13 +-
.../shaders/class1/objects/simpleSkinnedV.glsl | 15 +-
.../shaders/class1/objects/simpleV.glsl | 18 +-
.../shaders/class2/avatar/eyeballV.glsl | 16 +-
.../shaders/class2/deferred/alphaSkinnedV.glsl | 27 +-
.../shaders/class2/deferred/alphaV.glsl | 31 +--
.../shaders/class2/deferred/avatarAlphaV.glsl | 31 ++-
.../shaders/class2/deferred/edgeV.glsl | 5 +-
.../shaders/class2/deferred/softenLightV.glsl | 12 +-
.../shaders/class2/deferred/sunLightV.glsl | 15 +-
.../app_settings/shaders/class2/effects/blurV.glsl | 6 +-
.../shaders/class2/effects/drawQuadV.glsl | 10 +-
.../shaders/class2/environment/terrainV.glsl | 22 +-
.../shaders/class2/lighting/sumLightsV.glsl | 2 -
.../shaders/class2/objects/fullbrightShinyV.glsl | 19 +-
.../shaders/class2/objects/fullbrightV.glsl | 18 +-
.../shaders/class2/objects/shinyV.glsl | 18 +-
.../shaders/class2/objects/simpleV.glsl | 20 +-
.../shaders/class2/windlight/cloudsV.glsl | 11 +-
.../shaders/class2/windlight/skyV.glsl | 10 +-
.../shaders/class3/avatar/avatarV.glsl | 27 +-
.../shaders/class3/deferred/giDownsampleV.glsl | 6 +-
.../shaders/class3/deferred/giFinalV.glsl | 5 +-
.../app_settings/shaders/class3/deferred/giV.glsl | 12 +-
.../shaders/class3/deferred/luminanceV.glsl | 12 +-
.../shaders/class3/deferred/postDeferredV.glsl | 6 +-
.../shaders/class3/deferred/postgiV.glsl | 6 +-
.../shaders/class3/deferred/softenLightV.glsl | 11 +-
.../shaders/class3/lighting/sumLightsV.glsl | 1 -
indra/newview/llagent.cpp | 2 +-
indra/newview/lldrawpool.cpp | 4 +-
indra/newview/lldrawpoolalpha.cpp | 23 +-
indra/newview/lldrawpoolalpha.h | 1 +
indra/newview/lldrawpoolavatar.cpp | 68 ++---
indra/newview/lldrawpoolbump.cpp | 2 +-
indra/newview/lldrawpoolsimple.cpp | 38 +--
indra/newview/lldrawpoolsimple.h | 5 +-
indra/newview/lldrawpoolsky.cpp | 6 +-
indra/newview/lldrawpoolterrain.cpp | 4 +
indra/newview/lldrawpooltree.cpp | 5 +-
indra/newview/lldrawpoolwater.cpp | 6 +-
indra/newview/lldrawpoolwlsky.cpp | 4 +-
indra/newview/lldynamictexture.cpp | 8 +
indra/newview/llface.cpp | 48 +++-
indra/newview/llface.h | 6 +-
indra/newview/llfloaterimagepreview.cpp | 4 +-
indra/newview/llfloatermodelpreview.cpp | 16 +-
indra/newview/llmanip.cpp | 4 +-
indra/newview/llmaniptranslate.cpp | 4 +-
indra/newview/llpreviewtexture.cpp | 2 +-
indra/newview/llselectmgr.cpp | 4 +-
indra/newview/llspatialpartition.cpp | 74 +++---
indra/newview/llspatialpartition.h | 1 -
indra/newview/lltexlayer.cpp | 3 +
indra/newview/lltextureview.cpp | 4 +-
indra/newview/llviewerjointmesh.cpp | 24 +-
indra/newview/llviewershadermgr.cpp | 280 +++++++++++++++++----
indra/newview/llviewershadermgr.h | 25 +-
indra/newview/llviewerwindow.cpp | 2 +-
indra/newview/llvosurfacepatch.cpp | 6 +
indra/newview/llvovolume.cpp | 24 +-
indra/newview/pipeline.cpp | 56 +++--
indra/newview/pipeline.h | 4 +
119 files changed, 1164 insertions(+), 718 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml
index ae72dee900..a76eb3cd37 100644
--- a/indra/newview/app_settings/logcontrol.xml
+++ b/indra/newview/app_settings/logcontrol.xml
@@ -43,7 +43,7 @@
tags
-
+
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 9bb320d882..ed1e3c2057 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -7565,7 +7565,7 @@
Type
Boolean
Value
- 0
+ 1
RenderDebugNormalScale
RenderDebugNormalScale
+ TranslationService
+
+ GoogleTranslateAPIv2Key
+
+ BingTranslateAPIKey
+
TutorialURL
", begin);
+ err_msg = body.substr(begin, end-begin);
+ LLStringUtil::replaceString(err_msg, "
", ""); // strip CR
+ return false;
+ }
+
+ // Sample response: Hola
+ size_t begin = body.find(">");
+ if (begin == std::string::npos || begin >= (body.size() - 1))
+ {
+ return false;
+ }
+
+ size_t end = body.find("", ++begin);
+ if (end == std::string::npos || end < begin)
+ {
+ return false;
+ }
+
+ detected_lang = ""; // unsupported by this API
+ translation = body.substr(begin, end-begin);
+ LLStringUtil::replaceString(translation, "
", ""); // strip CR
+ return true;
}
- LLHTTPClient::get(url, result, m_Header, m_GoogleTimeout);
+private:
+ static std::string getAPIKey()
+ {
+ return gSavedSettings.getString("BingTranslateAPIKey");
+ }
+};
+
+LLTranslate::TranslationReceiver::TranslationReceiver(const std::string& from_lang, const std::string& to_lang)
+: mFromLang(from_lang)
+, mToLang(to_lang)
+, mHandler(LLTranslate::getPreferredHandler())
+{
}
-//static
-void LLTranslate::getTranslateUrl(std::string &translate_url, const std::string &from_lang, const std::string &to_lang, const std::string &mesg)
+// virtual
+void LLTranslate::TranslationReceiver::completedRaw(
+ U32 http_status,
+ const std::string& reason,
+ const LLChannelDescriptors& channels,
+ const LLIOPipe::buffer_ptr_t& buffer)
{
- char * curl_str = curl_escape(mesg.c_str(), mesg.size());
- std::string const escaped_mesg(curl_str);
- curl_free(curl_str);
-
- translate_url = m_GoogleURL
- + escaped_mesg + m_GoogleLangSpec
- + from_lang // 'from' language; empty string for auto
- + "%7C" // |
- + to_lang; // 'to' language
+ LLBufferStream istr(channels, buffer.get());
+ std::stringstream strstrm;
+ strstrm << istr.rdbuf();
+
+ const std::string body = strstrm.str();
+ std::string translation, detected_lang, err_msg;
+ int status = http_status;
+ if (mHandler.parseResponse(status, body, translation, detected_lang, err_msg))
+ {
+ // Fix up the response
+ LLStringUtil::replaceString(translation, "<", "<");
+ LLStringUtil::replaceString(translation, ">",">");
+ LLStringUtil::replaceString(translation, ""","\"");
+ LLStringUtil::replaceString(translation, "'","'");
+ LLStringUtil::replaceString(translation, "&","&");
+ LLStringUtil::replaceString(translation, "'","'");
+
+ handleResponse(translation, detected_lang);
+ }
+ else
+ {
+ llwarns << "Translation request failed: " << err_msg << llendl;
+ LL_DEBUGS("Translate") << "HTTP status: " << status << " " << reason << LL_ENDL;
+ LL_DEBUGS("Translate") << "Error response body: " << body << LL_ENDL;
+ handleFailure(status, err_msg);
+ }
}
//static
-bool LLTranslate::parseGoogleTranslate(const std::string& body, std::string &translation, std::string &detected_language)
+void LLTranslate::translateMessage(
+ TranslationReceiverPtr &receiver,
+ const std::string &from_lang,
+ const std::string &to_lang,
+ const std::string &mesg)
{
- Json::Value root;
- Json::Reader reader;
-
- bool success = reader.parse(body, root);
- if (!success)
+ std::string url;
+ receiver->mHandler.getTranslateURL(url, from_lang, to_lang, mesg);
+
+ static const float REQUEST_TIMEOUT = 5;
+ static LLSD sHeader;
+
+ if (!sHeader.size())
{
- LL_WARNS("Translate") << "Non valid response from Google Translate API: '" << reader.getFormatedErrorMessages() << "'" << LL_ENDL;
- return false;
+ std::string user_agent = llformat("%s %d.%d.%d (%d)",
+ LLVersionInfo::getChannel().c_str(),
+ LLVersionInfo::getMajor(),
+ LLVersionInfo::getMinor(),
+ LLVersionInfo::getPatch(),
+ LLVersionInfo::getBuild());
+
+ sHeader.insert("Accept", "text/plain");
+ sHeader.insert("User-Agent", user_agent);
}
-
- translation = root[m_GoogleData].get(m_GoogleTranslation, "").asString();
- detected_language = root[m_GoogleData].get(m_GoogleLanguage, "").asString();
- return true;
+
+ LL_DEBUGS("Translate") << "Sending translation request: " << url << LL_ENDL;
+ LLHTTPClient::get(url, receiver, sHeader, REQUEST_TIMEOUT);
}
//static
@@ -119,3 +308,22 @@ std::string LLTranslate::getTranslateLanguage()
return language;
}
+// static
+const LLTranslationAPIHandler& LLTranslate::getPreferredHandler()
+{
+ static LLGoogleV1Handler google_v1;
+ static LLGoogleV2Handler google_v2;
+ static LLBingHandler bing;
+
+ std::string service = gSavedSettings.getString("TranslationService");
+ if (service == "google_v2")
+ {
+ return google_v2;
+ }
+ else if (service == "google_v1")
+ {
+ return google_v1;
+ }
+
+ return bing;
+}
diff --git a/indra/newview/lltranslate.h b/indra/newview/lltranslate.h
index e85a42e878..1dee792f7b 100644
--- a/indra/newview/lltranslate.h
+++ b/indra/newview/lltranslate.h
@@ -30,89 +30,42 @@
#include "llhttpclient.h"
#include "llbufferstream.h"
+class LLTranslationAPIHandler;
+
class LLTranslate
{
LOG_CLASS(LLTranslate);
+
public :
class TranslationReceiver: public LLHTTPClient::Responder
{
- protected:
- TranslationReceiver(const std::string &from_lang, const std::string &to_lang)
- : m_fromLang(from_lang),
- m_toLang(to_lang)
- {
- }
-
- virtual void handleResponse(const std::string &translation, const std::string &recognized_lang) {};
- virtual void handleFailure() {};
-
public:
- ~TranslationReceiver()
- {
- }
-
- virtual void completedRaw( U32 status,
- const std::string& reason,
- const LLChannelDescriptors& channels,
- const LLIOPipe::buffer_ptr_t& buffer)
- {
- if (200 <= status && status < 300)
- {
- LLBufferStream istr(channels, buffer.get());
- std::stringstream strstrm;
- strstrm << istr.rdbuf();
+ /*virtual*/ void completedRaw(
+ U32 http_status,
+ const std::string& reason,
+ const LLChannelDescriptors& channels,
+ const LLIOPipe::buffer_ptr_t& buffer);
- const std::string result = strstrm.str();
- std::string translation;
- std::string detected_language;
+ protected:
+ friend class LLTranslate;
- if (!parseGoogleTranslate(result, translation, detected_language))
- {
- handleFailure();
- return;
- }
-
- // Fix up the response
- LLStringUtil::replaceString(translation, "<", "<");
- LLStringUtil::replaceString(translation, ">",">");
- LLStringUtil::replaceString(translation, ""","\"");
- LLStringUtil::replaceString(translation, "'","'");
- LLStringUtil::replaceString(translation, "&","&");
- LLStringUtil::replaceString(translation, "'","'");
+ TranslationReceiver(const std::string& from_lang, const std::string& to_lang);
- handleResponse(translation, detected_language);
- }
- else
- {
- LL_WARNS("Translate") << "HTTP request for Google Translate failed with status " << status << ", reason: " << reason << LL_ENDL;
- handleFailure();
- }
- }
+ virtual void handleResponse(const std::string &translation, const std::string &recognized_lang) = 0;
+ virtual void handleFailure(int status, const std::string& err_msg) = 0;
- protected:
- const std::string m_toLang;
- const std::string m_fromLang;
+ std::string mFromLang;
+ std::string mToLang;
+ const LLTranslationAPIHandler& mHandler;
};
- static void translateMessage(LLHTTPClient::ResponderPtr &result, const std::string &from_lang, const std::string &to_lang, const std::string &mesg);
- static float m_GoogleTimeout;
+ typedef boost::intrusive_ptr TranslationReceiverPtr;
+
+ static void translateMessage(TranslationReceiverPtr &receiver, const std::string &from_lang, const std::string &to_lang, const std::string &mesg);
static std::string getTranslateLanguage();
private:
- static void getTranslateUrl(std::string &translate_url, const std::string &from_lang, const std::string &to_lang, const std::string &text);
- static bool parseGoogleTranslate(const std::string& body, std::string &translation, std::string &detected_language);
-
- static LLSD m_Header;
- static const char* m_GoogleURL;
- static const char* m_GoogleLangSpec;
- static const char* m_AcceptHeader;
- static const char* m_AcceptType;
- static const char* m_AgentHeader;
- static const char* m_UserAgent;
-
- static const char* m_GoogleData;
- static const char* m_GoogleTranslation;
- static const char* m_GoogleLanguage;
+ static const LLTranslationAPIHandler& getPreferredHandler();
};
#endif
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 68745d5aeb..ff02214194 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -3138,7 +3138,7 @@ protected:
{
// filter out non-interesting responeses
if ( !translation.empty()
- && (m_toLang != detected_language)
+ && (mToLang != detected_language)
&& (LLStringUtil::compareInsensitive(translation, m_origMesg) != 0) )
{
m_chat.mText += " (" + translation + ")";
@@ -3147,9 +3147,8 @@ protected:
LLNotificationsUI::LLNotificationManager::instance().onChat(m_chat, m_toastArgs);
}
- void handleFailure()
+ void handleFailure(int status, const std::string& err_msg)
{
- LLTranslate::TranslationReceiver::handleFailure();
m_chat.mText += " (?)";
LLNotificationsUI::LLNotificationManager::instance().onChat(m_chat, m_toastArgs);
@@ -3388,7 +3387,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
const std::string from_lang = ""; // leave empty to trigger autodetect
const std::string to_lang = LLTranslate::getTranslateLanguage();
- LLHTTPClient::ResponderPtr result = ChatTranslationReceiver::build(from_lang, to_lang, mesg, chat, args);
+ LLTranslate::TranslationReceiverPtr result = ChatTranslationReceiver::build(from_lang, to_lang, mesg, chat, args);
LLTranslate::translateMessage(result, from_lang, to_lang, mesg);
}
else
--
cgit v1.2.3
From e23ecf311c729be7e6611ef2fe21badaf9f1c3ed Mon Sep 17 00:00:00 2001
From: Vadim ProductEngine
Date: Wed, 7 Sep 2011 00:09:49 +0300
Subject: STORM-1577 WIP Implemented chat translation preferences management.
---
indra/newview/CMakeLists.txt | 2 +
indra/newview/llfloaterpreference.cpp | 9 +
indra/newview/llfloaterpreference.h | 1 +
indra/newview/llfloatertranslationsettings.cpp | 146 ++++++++++++++
indra/newview/llfloatertranslationsettings.h | 59 ++++++
indra/newview/llviewerfloaterreg.cpp | 2 +
.../xui/en/floater_translation_settings.xml | 222 +++++++++++++++++++++
.../default/xui/en/panel_preferences_chat.xml | 12 ++
8 files changed, 453 insertions(+)
create mode 100644 indra/newview/llfloatertranslationsettings.cpp
create mode 100644 indra/newview/llfloatertranslationsettings.h
create mode 100644 indra/newview/skins/default/xui/en/floater_translation_settings.xml
(limited to 'indra/newview')
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index a117d9a593..e7ca2a4294 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -237,6 +237,7 @@ set(viewer_SOURCE_FILES
llfloatertools.cpp
llfloatertopobjects.cpp
llfloatertos.cpp
+ llfloatertranslationsettings.cpp
llfloateruipreview.cpp
llfloaterurlentry.cpp
llfloatervoiceeffect.cpp
@@ -799,6 +800,7 @@ set(viewer_HEADER_FILES
llfloatertools.h
llfloatertopobjects.h
llfloatertos.h
+ llfloatertranslationsettings.h
llfloateruipreview.h
llfloaterurlentry.h
llfloatervoiceeffect.h
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index d65928e385..07c07d608a 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -345,6 +345,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.MaturitySettings", boost::bind(&LLFloaterPreference::onChangeMaturity, this));
mCommitCallbackRegistrar.add("Pref.BlockList", boost::bind(&LLFloaterPreference::onClickBlockList, this));
mCommitCallbackRegistrar.add("Pref.Proxy", boost::bind(&LLFloaterPreference::onClickProxySettings, this));
+ mCommitCallbackRegistrar.add("Pref.TranslationSettings", boost::bind(&LLFloaterPreference::onClickTranslationSettings, this));
sSkin = gSavedSettings.getString("SkinCurrent");
@@ -602,6 +603,9 @@ void LLFloaterPreference::cancel()
}
// hide joystick pref floater
LLFloaterReg::hideInstance("pref_joystick");
+
+ // hide translation settings floater
+ LLFloaterReg::hideInstance("prefs_translation");
// cancel hardware menu
LLFloaterHardwareSettings* hardware_settings = LLFloaterReg::getTypedInstance("prefs_hardware_settings");
@@ -1553,6 +1557,11 @@ void LLFloaterPreference::onClickProxySettings()
LLFloaterReg::showInstance("prefs_proxy");
}
+void LLFloaterPreference::onClickTranslationSettings()
+{
+ LLFloaterReg::showInstance("prefs_translation");
+}
+
void LLFloaterPreference::updateDoubleClickControls()
{
// check is one of double-click actions settings enabled
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index ef9bc2dd53..ee6bb235be 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -157,6 +157,7 @@ public:
void onChangeMaturity();
void onClickBlockList();
void onClickProxySettings();
+ void onClickTranslationSettings();
void applyUIColor(LLUICtrl* ctrl, const LLSD& param);
void getUIColor(LLUICtrl* ctrl, const LLSD& param);
diff --git a/indra/newview/llfloatertranslationsettings.cpp b/indra/newview/llfloatertranslationsettings.cpp
new file mode 100644
index 0000000000..56f101d149
--- /dev/null
+++ b/indra/newview/llfloatertranslationsettings.cpp
@@ -0,0 +1,146 @@
+/**
+ * @file llfloatertranslationsettings.cpp
+ * @brief Machine translation settings for chat
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloatertranslationsettings.h"
+
+// Viewer includes
+#include "llviewercontrol.h" // for gSavedSettings
+
+// Linden library includes
+#include "llbutton.h"
+#include "llcheckboxctrl.h"
+#include "llcombobox.h"
+#include "llfloaterreg.h"
+#include "lllineeditor.h"
+#include "llnotificationsutil.h"
+#include "llradiogroup.h"
+
+LLFloaterTranslationSettings::LLFloaterTranslationSettings(const LLSD& key)
+: LLFloater(key)
+, mMachineTranslationCB(NULL)
+, mLanguageCombo(NULL)
+, mTranslationServiceRadioGroup(NULL)
+, mBingAPIKeyEditor(NULL)
+, mGoogleAPIKeyEditor(NULL)
+{
+}
+
+// virtual
+BOOL LLFloaterTranslationSettings::postBuild()
+{
+ mMachineTranslationCB = getChild("translate_chat_checkbox");
+ mLanguageCombo = getChild("translate_language_combo");
+ mTranslationServiceRadioGroup = getChild("translation_service_rg");
+ mBingAPIKeyEditor = getChild("bing_api_key");
+ mGoogleAPIKeyEditor = getChild("google_api_key");
+
+ mMachineTranslationCB->setCommitCallback(boost::bind(&LLFloaterTranslationSettings::updateControlsEnabledState, this));
+ mTranslationServiceRadioGroup->setCommitCallback(boost::bind(&LLFloaterTranslationSettings::updateControlsEnabledState, this));
+ getChild("ok_btn")->setClickedCallback(boost::bind(&LLFloaterTranslationSettings::onBtnOK, this));
+ getChild("cancel_btn")->setClickedCallback(boost::bind(&LLFloater::closeFloater, this, false));
+
+ center();
+ return TRUE;
+}
+
+// virtual
+void LLFloaterTranslationSettings::onOpen(const LLSD& key)
+{
+ mMachineTranslationCB->setValue(gSavedSettings.getBOOL("TranslateChat"));
+ mLanguageCombo->setSelectedByValue(gSavedSettings.getString("TranslateLanguage"), TRUE);
+ mTranslationServiceRadioGroup->setSelectedByValue(gSavedSettings.getString("TranslationService"), TRUE);
+ mBingAPIKeyEditor->setText(gSavedSettings.getString("BingTranslateAPIKey"));
+ mGoogleAPIKeyEditor->setText(gSavedSettings.getString("GoogleTranslateAPIv2Key"));
+
+ updateControlsEnabledState();
+}
+
+std::string LLFloaterTranslationSettings::getSelectedService() const
+{
+ return mTranslationServiceRadioGroup->getSelectedValue().asString();
+}
+
+void LLFloaterTranslationSettings::showError(const std::string& err_name)
+{
+ LLSD args;
+ args["MESSAGE"] = getString(err_name);
+ LLNotificationsUtil::add("GenericAlert", args);
+}
+
+bool LLFloaterTranslationSettings::validate()
+{
+ bool translate_chat = mMachineTranslationCB->getValue().asBoolean();
+ if (!translate_chat) return true;
+
+ std::string service = getSelectedService();
+ if (service == "bing" && mBingAPIKeyEditor->getText().empty())
+ {
+ showError("no_bing_api_key");
+ return false;
+ }
+
+ if (service == "google_v2" && mGoogleAPIKeyEditor->getText().empty())
+ {
+ showError("no_google_api_key");
+ return false;
+ }
+
+ return true;
+}
+
+void LLFloaterTranslationSettings::updateControlsEnabledState()
+{
+ // Enable/disable controls based on the checkbox value.
+ bool on = mMachineTranslationCB->getValue().asBoolean();
+ std::string service = getSelectedService();
+
+ mTranslationServiceRadioGroup->setEnabled(on);
+ mLanguageCombo->setEnabled(on);
+
+ getChild("bing_api_key_label")->setEnabled(on);
+ mBingAPIKeyEditor->setEnabled(on);
+
+ getChild("google_api_key_label")->setEnabled(on);
+ mGoogleAPIKeyEditor->setEnabled(on);
+
+ mBingAPIKeyEditor->setEnabled(service == "bing");
+ mGoogleAPIKeyEditor->setEnabled(service == "google_v2");
+}
+
+void LLFloaterTranslationSettings::onBtnOK()
+{
+ if (validate())
+ {
+ gSavedSettings.setBOOL("TranslateChat", mMachineTranslationCB->getValue().asBoolean());
+ gSavedSettings.setString("TranslateLanguage", mLanguageCombo->getSelectedValue().asString());
+ gSavedSettings.setString("TranslationService", getSelectedService());
+ gSavedSettings.setString("BingTranslateAPIKey", mBingAPIKeyEditor->getText());
+ gSavedSettings.setString("GoogleTranslateAPIv2Key", mGoogleAPIKeyEditor->getText());
+ closeFloater(false);
+ }
+}
diff --git a/indra/newview/llfloatertranslationsettings.h b/indra/newview/llfloatertranslationsettings.h
new file mode 100644
index 0000000000..1c03b86f4d
--- /dev/null
+++ b/indra/newview/llfloatertranslationsettings.h
@@ -0,0 +1,59 @@
+/**
+ * @file llfloatertranslationsettings.h
+ * @brief Machine translation settings for chat
+ *
+ * $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2011, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLFLOATERTRANSLATIONSETTINGS_H
+#define LL_LLFLOATERTRANSLATIONSETTINGS_H
+
+#include "llfloater.h"
+
+class LLCheckBoxCtrl;
+class LLComboBox;
+class LLLineEditor;
+class LLRadioGroup;
+
+class LLFloaterTranslationSettings : public LLFloater
+{
+public:
+ LLFloaterTranslationSettings(const LLSD& key);
+ /*virtual*/ BOOL postBuild();
+ /*virtual*/ void onOpen(const LLSD& key);
+
+private:
+ std::string getSelectedService() const;
+ void showError(const std::string& err_name);
+ bool validate();
+ void updateControlsEnabledState();
+ void onMachineTranslationToggle();
+ void onBtnOK();
+
+ LLCheckBoxCtrl* mMachineTranslationCB;
+ LLComboBox* mLanguageCombo;
+ LLLineEditor* mBingAPIKeyEditor;
+ LLLineEditor* mGoogleAPIKeyEditor;
+ LLRadioGroup* mTranslationServiceRadioGroup;
+};
+
+#endif // LL_LLFLOATERTRANSLATIONSETTINGS_H
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index fecc6d91bd..3be26d87e2 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -102,6 +102,7 @@
#include "llfloatertools.h"
#include "llfloatertos.h"
#include "llfloatertopobjects.h"
+#include "llfloatertranslationsettings.h"
#include "llfloateruipreview.h"
#include "llfloatervoiceeffect.h"
#include "llfloaterwhitelistentry.h"
@@ -234,6 +235,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build);
LLFloaterReg::add("prefs_proxy", "floater_preferences_proxy.xml", (LLFloaterBuildFunc)&LLFloaterReg::build);
LLFloaterReg::add("prefs_hardware_settings", "floater_hardware_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build);
+ LLFloaterReg::add("prefs_translation", "floater_translation_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build);
LLFloaterReg::add("perm_prefs", "floater_perm_prefs.xml", (LLFloaterBuildFunc)&LLFloaterReg::build);
LLFloaterReg::add("pref_joystick", "floater_joystick.xml", (LLFloaterBuildFunc)&LLFloaterReg::build);
LLFloaterReg::add("preview_anim", "floater_preview_animation.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "preview");
diff --git a/indra/newview/skins/default/xui/en/floater_translation_settings.xml b/indra/newview/skins/default/xui/en/floater_translation_settings.xml
new file mode 100644
index 0000000000..40a176830c
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_translation_settings.xml
@@ -0,0 +1,222 @@
+
+
+
+ Bing Translator requires and appID to function.
+ Google Translate requires an API key to function.
+
+
+
+ Translate chat into:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Choose translation service to use:
+
+
+
+
+
+
+
+
+ Bing [http://www.bing.com/developers/createapp.aspx AppID]:
+
+
+
+
+ Google [http://code.google.com/apis/language/translate/v2/pricing.html API key]:
+
+
+
+
+ ([http://code.google.com/apis/language/translate/v2/pricing.html pricing])
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
index ea09286592..3fbf484ab2 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml
@@ -319,4 +319,16 @@
name="Korean"
value="ko" />
+
\ No newline at end of file
--
cgit v1.2.3
From 7975ab138b6ac54fc831613e4d3dfb913c5efbd2 Mon Sep 17 00:00:00 2001
From: Vadim ProductEngine
Date: Wed, 7 Sep 2011 16:14:47 +0300
Subject: STORM-1577 Removed support for Google Translate v1 API.
---
indra/newview/app_settings/settings.xml | 10 ++--
indra/newview/llfloatertranslationsettings.cpp | 8 +--
indra/newview/lltranslate.cpp | 67 +++-------------------
.../xui/en/floater_translation_settings.xml | 4 +-
4 files changed, 18 insertions(+), 71 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 2549538df2..2f1a2093b2 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -10925,18 +10925,18 @@
TranslationService
- GoogleTranslateAPIv2Key
+ GoogleTranslateAPIKey
- WindowFullScreen
+ FullScreen
Comment
- SL viewer window full screen
+ run a fullscreen session
Persist
1
Type
diff --git a/indra/newview/app_settings/shaders/class2/deferred/edgeF.glsl b/indra/newview/app_settings/shaders/class2/deferred/edgeF.glsl
deleted file mode 100644
index f75a08779c..0000000000
--- a/indra/newview/app_settings/shaders/class2/deferred/edgeF.glsl
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * @file edgeF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#extension GL_ARB_texture_rectangle : enable
-
-#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 gl_FragColor;
-#endif
-
-uniform sampler2DRect depthMap;
-uniform sampler2DRect normalMap;
-
-VARYING vec2 vary_fragcoord;
-
-uniform float depth_cutoff;
-uniform float norm_cutoff;
-
-uniform mat4 inv_proj;
-uniform vec2 screen_res;
-
-float getDepth(vec2 pos_screen)
-{
- float z = texture2DRect(depthMap, pos_screen.xy).r;
- z = z*2.0-1.0;
- vec4 ndc = vec4(0.0, 0.0, z, 1.0);
- vec4 p = inv_proj*ndc;
- return p.z/p.w;
-}
-
-void main()
-{
- vec3 norm = texture2DRect(normalMap, vary_fragcoord.xy).xyz;
- norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
- float depth = getDepth(vary_fragcoord.xy);
-
- vec2 tc = vary_fragcoord.xy;
-
- float sc = 0.75;
-
- vec2 de;
- de.x = (depth-getDepth(tc+vec2(sc, sc))) + (depth-getDepth(tc+vec2(-sc, -sc)));
- de.y = (depth-getDepth(tc+vec2(-sc, sc))) + (depth-getDepth(tc+vec2(sc, -sc)));
- de /= depth;
- de *= de;
- de = step(depth_cutoff, de);
-
- vec2 ne;
- vec3 nexnorm = texture2DRect(normalMap, tc+vec2(-sc,-sc)).rgb;
- nexnorm = vec3((nexnorm.xy-0.5)*2.0,nexnorm.z); // unpack norm
- ne.x = dot(nexnorm, norm);
- vec3 neynorm = texture2DRect(normalMap, tc+vec2(sc,sc)).rgb;
- neynorm = vec3((neynorm.xy-0.5)*2.0,neynorm.z); // unpack norm
- ne.y = dot(neynorm, norm);
-
- ne = 1.0-ne;
-
- ne = step(norm_cutoff, ne);
-
- gl_FragColor.a = dot(de,de)+dot(ne,ne);
-}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/edgeV.glsl b/indra/newview/app_settings/shaders/class2/deferred/edgeV.glsl
deleted file mode 100644
index 69c6acc07a..0000000000
--- a/indra/newview/app_settings/shaders/class2/deferred/edgeV.glsl
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * @file edgeV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-uniform mat4 modelview_projection_matrix;
-
-ATTRIBUTE vec3 position;
-
-VARYING vec2 vary_fragcoord;
-uniform vec2 screen_res;
-
-void main()
-{
- //transform vertex
- vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
- gl_Position = pos;
- vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giDownsampleF.glsl b/indra/newview/app_settings/shaders/class3/deferred/giDownsampleF.glsl
deleted file mode 100644
index 832cf46150..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/giDownsampleF.glsl
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * @file giDownsampleF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-
-#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 gl_FragColor;
-#endif
-
-uniform sampler2DRect giLightMap;
-
-uniform vec2 kern[32];
-uniform float dist_factor;
-uniform float blur_size;
-uniform vec2 delta;
-uniform int kern_length;
-uniform float kern_scale;
-uniform vec3 blur_quad;
-
-VARYING vec2 vary_fragcoord;
-
-uniform mat4 inv_proj;
-uniform vec2 screen_res;
-
-vec4 getPosition(vec2 pos_screen)
-{
- float depth = texture2DRect(depthMap, pos_screen.xy).a;
- vec2 sc = pos_screen.xy*2.0;
- sc /= screen_res;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
-float getDepth(vec2 pos_screen)
-{
- float z = texture2DRect(depthMap, pos_screen.xy).a;
- z = z*2.0-1.0;
- vec4 ndc = vec4(0.0, 0.0, z, 1.0);
- vec4 p = inv_proj*ndc;
- return p.z/p.w;
-}
-
-void main()
-{
- vec3 norm = texture2DRect(normalMap, vary_fragcoord.xy).xyz;
- norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
- float depth = getDepth(vary_fragcoord.xy);
-
- vec3 ccol = texture2DRect(giLightMap, vary_fragcoord.xy).rgb;
- vec2 dlt = kern_scale * delta/(vec2(1.0,1.0)+norm.xy*norm.xy);
- dlt /= clamp(-depth*blur_quad.x, 1.0, 3.0);
- float defined_weight = kern[0].x;
- vec3 col = ccol*kern[0].x;
-
- for (int i = 0; i < kern_length; i++)
- {
- vec2 tc = vary_fragcoord.xy + kern[i].y*dlt;
- vec3 sampNorm = texture2DRect(normalMap, tc.xy).xyz;
- sampNorm = vec3((sampNorm.xy-0.5)*2.0,sampNorm.z); // unpack norm
-
- float d = dot(norm.xyz, sampNorm);
-
- if (d > 0.5)
- {
- float sampdepth = getDepth(tc.xy);
- sampdepth -= depth;
- if (sampdepth*sampdepth < blur_quad.z)
- {
- col += texture2DRect(giLightMap, tc).rgb*kern[i].x;
- defined_weight += kern[i].x;
- }
- }
- }
-
- col /= defined_weight;
-
- //col = ccol;
-
- col = col*blur_quad.y;
-
- gl_FragColor.xyz = col;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl b/indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl
deleted file mode 100644
index 380d5207c3..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * @file postgiV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-uniform mat4 modelview_projection_matrix;
-
-ATTRIBUTE vec3 position;
-
-VARYING vec2 vary_fragcoord;
-uniform vec2 screen_res;
-
-void main()
-{
- //transform vertex
- vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
- gl_Position = pos;
- vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giF.glsl b/indra/newview/app_settings/shaders/class3/deferred/giF.glsl
deleted file mode 100644
index ee992f2fe9..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/giF.glsl
+++ /dev/null
@@ -1,213 +0,0 @@
-/**
- * @file giF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#extension GL_ARB_texture_rectangle : enable
-
-#ifdef DEFINE_GL_FRAGCOLOR;
-out vec4 gl_FragColor;
-#endif
-
-uniform sampler2DRect depthMap;
-uniform sampler2DRect normalMap;
-uniform sampler2DRect lightMap;
-uniform sampler2DRect specularRect;
-
-uniform sampler2D noiseMap;
-
-uniform sampler2D diffuseGIMap;
-uniform sampler2D specularGIMap;
-uniform sampler2D normalGIMap;
-uniform sampler2D depthGIMap;
-
-uniform sampler2D lightFunc;
-
-// Inputs
-VARYING vec2 vary_fragcoord;
-
-uniform vec2 screen_res;
-
-uniform vec4 sunlight_color;
-
-uniform mat4 inv_proj;
-uniform mat4 gi_mat; //gPipeline.mGIMatrix - eye space to sun space
-uniform mat4 gi_mat_proj; //gPipeline.mGIMatrixProj - eye space to projected sun space
-uniform mat4 gi_norm_mat; //gPipeline.mGINormalMatrix - eye space normal to sun space normal matrix
-uniform mat4 gi_inv_proj; //gPipeline.mGIInvProj - projected sun space to sun space
-uniform float gi_sample_width;
-uniform float gi_noise;
-uniform float gi_attenuation;
-uniform float gi_range;
-
-vec4 getPosition(vec2 pos_screen)
-{
- float depth = texture2DRect(depthMap, pos_screen.xy).a;
- vec2 sc = pos_screen.xy*2.0;
- sc /= screen_res;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
-vec4 getGIPosition(vec2 gi_tc)
-{
- float depth = texture2D(depthGIMap, gi_tc).a;
- vec2 sc = gi_tc*2.0;
- sc -= vec2(1.0, 1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = gi_inv_proj*ndc;
- pos.xyz /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
-vec3 giAmbient(vec3 pos, vec3 norm)
-{
- vec4 gi_c = gi_mat_proj * vec4(pos, 1.0);
- gi_c.xyz /= gi_c.w;
-
- vec4 gi_pos = gi_mat*vec4(pos,1.0);
- vec3 gi_norm = (gi_norm_mat*vec4(norm,1.0)).xyz;
- gi_norm = normalize(gi_norm);
-
- vec4 c_spec = texture2DRect(specularRect, vary_fragcoord.xy);
- vec3 nz = texture2D(noiseMap, vary_fragcoord.xy/128.0).rgb;
- gi_pos.xyz += nz.x*gi_noise*gi_norm.xyz;
- vec2 tcx = gi_norm.xy;
- vec2 tcy = gi_norm.yx;
-
- vec4 eye_pos = gi_mat*vec4(0,0,0,1.0);
-
- vec3 eye_dir = normalize(gi_pos.xyz-eye_pos.xyz);
- vec3 eye_ref = reflect(eye_dir, gi_norm);
-
- float da = 0.0; //texture2DRect(lightMap, vary_fragcoord.xy).r*0.5;
- vec3 fdiff = vec3(da);
- float fda = da;
-
- vec3 rcol = vec3(0,0,0);
-
- float fsa = 0.0;
-
-
- for (int i = -1; i <= 1; i += 2 )
- {
- for (int j = -1; j <= 1; j+= 2)
- {
- vec2 tc = vec2(i, j)*0.75+gi_norm.xy*nz.z;
- tc += nz.xy*2.0;
- tc *= gi_sample_width*0.25;
- tc += gi_c.xy;
-
- vec3 lnorm = -(texture2D(normalGIMap, tc.xy).xyz*2.0-1.0);
- vec3 lpos = getGIPosition(tc.xy).xyz;
-
- vec3 at = lpos-gi_pos.xyz;
- float dist = length(at);
- float dist_atten = clamp(1.0/(gi_attenuation*dist), 0.0, 1.0);
-
-
- if (dist_atten > 0.01)
- { //possible contribution of indirect light to this surface
- vec3 ldir = at;
-
- float ld = -dot(ldir, lnorm);
-
- if (ld < 0.0)
- {
- float ang_atten = dot(ldir, gi_norm);
-
- if (ang_atten > 0.0)
- {
- vec4 spec = texture2D(specularGIMap, tc.xy);
- at = normalize(at);
- vec3 diff;
-
- float da = 0.0;
-
- //contribution from indirect source to visible pixel
- vec3 ha = at;
- ha.z -= 1.0;
- ha = normalize(ha);
- if (spec.a > 0.0)
- {
- float sa = dot(ha,lnorm);
- da = texture2D(lightFunc, vec2(sa, spec.a)).r;
- }
- else
- {
- da = -lnorm.z;
- }
-
- diff = texture2D(diffuseGIMap, tc.xy).rgb+spec.rgb*spec.a*2.0;
-
- if (da > 0.0)
- { //contribution from visible pixel to eye
- vec3 ha = normalize(at-eye_dir);
- if (c_spec.a > 0.0)
- {
- float sa = dot(ha, gi_norm);
- da = dist_atten*texture2D(lightFunc, vec2(sa, c_spec.a)).r;
- }
- else
- {
- da = dist_atten*dot(gi_norm, normalize(ldir));
- }
- fda += da;
- fdiff += da*(c_spec.rgb*c_spec.a*2.0+vec3(1,1,1))*diff.rgb;
- }
- }
- }
- }
- }
- }
-
- fdiff *= sunlight_color.rgb;
-
- vec3 ret = fda*fdiff;
-
- return clamp(ret,vec3(0.0), vec3(1.0));
-}
-
-void main()
-{
- vec2 pos_screen = vary_fragcoord.xy;
- vec4 pos = getPosition(pos_screen);
-
- float rad = gi_range*0.5;
-
- vec3 norm = texture2DRect(normalMap, pos_screen).xyz;
- norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
- float dist = max(length(pos.xyz)-rad, 0.0);
-
- float da = clamp(1.0-dist/rad, 0.0, 1.0);
-
- vec3 ambient = da > 0.0 ? giAmbient(pos.xyz, norm) : vec3(0);
-
-
- gl_FragColor.xyz = mix(vec3(0), ambient, da);
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giFinalF.glsl b/indra/newview/app_settings/shaders/class3/deferred/giFinalF.glsl
deleted file mode 100644
index 3ace57e3cb..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/giFinalF.glsl
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * @file giFinalF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#extension GL_ARB_texture_rectangle : enable
-
-#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 gl_FragColor;
-#endif
-
-uniform sampler2DRect diffuseRect;
-uniform sampler2D bloomMap;
-uniform sampler2DRect edgeMap;
-
-uniform vec2 screen_res;
-VARYING vec2 vary_fragcoord;
-
-
-void main()
-{
- vec4 bloom = texture2D(bloomMap, vary_fragcoord.xy/screen_res);
- vec4 diff = texture2DRect(diffuseRect, vary_fragcoord.xy);
-
- gl_FragColor = bloom + diff;
- //gl_FragColor.rgb = vec3(texture2DRect(edgeMap, vary_fragcoord.xy).a);
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giFinalV.glsl b/indra/newview/app_settings/shaders/class3/deferred/giFinalV.glsl
deleted file mode 100644
index 60eca06d35..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/giFinalV.glsl
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * @file giFinalV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-uniform mat4 modelview_projection_matrix;
-
-ATTRIBUTE vec3 position;
-
-
-VARYING vec2 vary_fragcoord;
-uniform vec2 screen_res;
-
-void main()
-{
- //transform vertex
- vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
- gl_Position = pos;
- vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giV.glsl b/indra/newview/app_settings/shaders/class3/deferred/giV.glsl
deleted file mode 100644
index 8272dbf31b..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/giV.glsl
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * @file giV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-uniform mat4 modelview_projection_matrix;
-
-ATTRIBUTE vec3 position;
-ATTRIBUTE vec4 diffuse_color;
-ATTRIBUTE vec2 texcoord0;
-
-
-VARYING vec2 vary_fragcoord;
-VARYING vec4 vertex_color;
-
-uniform vec2 screen_res;
-
-void main()
-{
- //transform vertex
- vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
- gl_Position = pos;
-
- vary_fragcoord = (pos.xy * 0.5 + 0.5)*screen_res;
- vec4 tex = vec4(texcoord0,0,1);
- tex.w = 1.0;
-
- vertex_color = diffuse_color;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/luminanceF.glsl b/indra/newview/app_settings/shaders/class3/deferred/luminanceF.glsl
deleted file mode 100644
index 3057b63ecd..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/luminanceF.glsl
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * @file luminanceF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#extension GL_ARB_texture_rectangle : enable
-
-#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 gl_FragColor;
-#endif
-
-uniform sampler2DRect lightMap;
-uniform sampler2DRect diffuseRect;
-
-VARYING vec2 vary_fragcoord;
-void main()
-{
- float i = texture2DRect(lightMap, vary_fragcoord.xy).r;
- gl_FragColor.rgb = vec3(i);
- gl_FragColor.a = 1.0;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl b/indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl
deleted file mode 100644
index 062875e72f..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * @file giV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-uniform mat4 modelview_projection_matrix;
-
-VARYING vec2 vary_fragcoord;
-VARYING vec4 vertex_color;
-
-uniform vec2 screen_res;
-
-ATTRIBUTE vec3 position;
-ATTRIBUTE vec4 diffuse_color;
-
-void main()
-{
- //transform vertex
- vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
- gl_Position = pos;
-
- vary_fragcoord = (pos.xy * 0.5 + 0.5)*screen_res;
-
- vertex_color = diffuse_color;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/postDeferredF.glsl b/indra/newview/app_settings/shaders/class3/deferred/postDeferredF.glsl
deleted file mode 100644
index c7ccf3a613..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/postDeferredF.glsl
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * @file postDeferredF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#extension GL_ARB_texture_rectangle : enable
-
-#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 gl_FragColor;
-#endif
-
-uniform sampler2DRect diffuseRect;
-uniform sampler2DRect specularRect;
-
-uniform sampler2DRect localLightMap;
-uniform sampler2DRect sunLightMap;
-uniform sampler2DRect giLightMap;
-uniform sampler2DRect edgeMap;
-
-uniform sampler2D luminanceMap;
-
-uniform sampler2DRect lightMap;
-
-uniform sampler2D lightFunc;
-uniform sampler2D noiseMap;
-
-uniform float sun_lum_scale;
-uniform float sun_lum_offset;
-uniform float lum_scale;
-uniform float lum_lod;
-uniform vec4 ambient;
-uniform float gi_brightness;
-uniform float gi_luminance;
-
-uniform vec4 sunlight_color;
-
-uniform vec2 screen_res;
-VARYING vec2 vary_fragcoord;
-
-void main()
-{
- vec2 tc = vary_fragcoord.xy;
- vec4 lcol = texture2DLod(luminanceMap, vec2(0.5, 0.5), lum_lod);
-
- vec3 gi_col = texture2DRect(giLightMap, vary_fragcoord.xy).rgb;
- vec4 sun_col = texture2DRect(sunLightMap, vary_fragcoord.xy);
- vec3 local_col = texture2DRect(localLightMap, vary_fragcoord.xy).rgb;
-
- float scol = texture2DRect(lightMap, vary_fragcoord.xy).r;
-
- vec3 diff = texture2DRect(diffuseRect, vary_fragcoord.xy).rgb;
- vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy);
-
- gi_col = gi_col*(diff.rgb+spec.rgb*spec.a);
-
- float lum = 1.0-clamp(pow(lcol.r, gi_brightness)+sun_lum_offset, 0.0, 1.0);
-
- lum *= sun_lum_scale;
-
- sun_col *= 1.0+(lum*lum_scale*scol);
-
- vec4 col;
- col.rgb = gi_col+sun_col.rgb+local_col;
-
- col.a = sun_col.a;
-
- vec3 bcol = vec3(0,0,0);
- float tweight = 0.0;
- for (int i = 0; i < 16; i++)
- {
- float weight = (float(i)+1.0)/2.0;
- bcol += texture2DLod(luminanceMap, vary_fragcoord.xy/screen_res, weight).rgb*weight*weight*weight;
- tweight += weight*weight;
- }
-
- bcol /= tweight;
- bcol *= gi_luminance;
- col.rgb += bcol*lum;
-
- gl_FragColor = col;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/postDeferredV.glsl b/indra/newview/app_settings/shaders/class3/deferred/postDeferredV.glsl
deleted file mode 100644
index 0049d8ea78..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/postDeferredV.glsl
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * @file postDeferredV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-uniform mat4 modelview_projection_matrix;
-
-ATTRIBUTE vec3 position;
-
-VARYING vec2 vary_fragcoord;
-uniform vec2 screen_res;
-
-void main()
-{
- //transform vertex
- vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
- gl_Position = pos;
- vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/postgiF.glsl b/indra/newview/app_settings/shaders/class3/deferred/postgiF.glsl
deleted file mode 100644
index 499a72222d..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/postgiF.glsl
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * @file postgiF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#extension GL_ARB_texture_rectangle : enable
-
-#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 gl_FragColor;
-#endif
-
-uniform sampler2DRect depthMap;
-uniform sampler2DRect normalMap;
-uniform sampler2DRect giLightMap;
-uniform sampler2D noiseMap;
-uniform sampler2D giMip;
-uniform sampler2DRect edgeMap;
-
-
-uniform vec2 delta;
-uniform float kern_scale;
-uniform float gi_edge_weight;
-uniform float gi_blur_brightness;
-
-VARYING vec2 vary_fragcoord;
-
-void main()
-{
- vec2 dlt = kern_scale*delta;
- float defined_weight = 0.0;
- vec3 col = vec3(0.0);
-
- float e = 1.0;
-
- for (int i = 1; i < 8; i++)
- {
- vec2 tc = vary_fragcoord.xy + float(i) * dlt;
-
- e = max(e, 0.0);
- float wght = e;
-
- col += texture2DRect(giLightMap, tc).rgb*wght;
- defined_weight += wght;
-
- e *= e;
- e -=(texture2DRect(edgeMap, tc.xy-dlt*0.25).a+
- texture2DRect(edgeMap, tc.xy+dlt*0.25).a)*gi_edge_weight;
- }
-
- e = 1.0;
-
- for (int i = 1; i < 8; i++)
- {
- vec2 tc = vary_fragcoord.xy - float(i) * dlt;
-
- e = max(e,0.0);
- float wght = e;
-
- col += texture2DRect(giLightMap, tc).rgb*wght;
- defined_weight += wght;
-
- e *= e;
- e -= (texture2DRect(edgeMap, tc.xy-dlt*0.25).a+
- texture2DRect(edgeMap, tc.xy+dlt*0.25).a)*gi_edge_weight;
-
- }
-
- col /= max(defined_weight, 0.01);
-
- gl_FragColor.rgb = col * gi_blur_brightness;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/postgiV.glsl b/indra/newview/app_settings/shaders/class3/deferred/postgiV.glsl
deleted file mode 100644
index 6d590c8051..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/postgiV.glsl
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * @file postgiV.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-uniform mat4 modelview_projection_matrix;
-
-ATTRIBUTE vec3 position;
-
-VARYING vec2 vary_fragcoord;
-uniform vec2 screen_res;
-
-void main()
-{
- //transform vertex
- vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
- gl_Position = pos;
- vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
deleted file mode 100644
index 7089c53f1c..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
+++ /dev/null
@@ -1,337 +0,0 @@
-/**
- * @file softenLightF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#extension GL_ARB_texture_rectangle : enable
-
-#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 gl_FragColor;
-#endif
-
-uniform sampler2DRect diffuseRect;
-uniform sampler2DRect specularRect;
-uniform sampler2DRect normalMap;
-uniform sampler2DRect lightMap;
-uniform sampler2D noiseMap;
-uniform samplerCube environmentMap;
-uniform sampler2D lightFunc;
-uniform vec3 gi_quad;
-
-uniform float blur_size;
-uniform float blur_fidelity;
-
-// Inputs
-uniform vec4 morphFactor;
-uniform vec3 camPosLocal;
-//uniform vec4 camPosWorld;
-uniform vec4 gamma;
-uniform vec4 lightnorm;
-uniform vec4 sunlight_color;
-uniform vec4 ambient;
-uniform vec4 blue_horizon;
-uniform vec4 blue_density;
-uniform vec4 haze_horizon;
-uniform vec4 haze_density;
-uniform vec4 cloud_shadow;
-uniform vec4 density_multiplier;
-uniform vec4 distance_multiplier;
-uniform vec4 max_y;
-uniform vec4 glow;
-uniform float scene_light_strength;
-uniform vec3 env_mat[3];
-uniform vec4 shadow_clip;
-uniform mat3 ssao_effect_mat;
-
-uniform sampler2DRect depthMap;
-uniform mat4 inv_proj;
-uniform vec2 screen_res;
-
-VARYING vec4 vary_light;
-VARYING vec2 vary_fragcoord;
-
-vec3 vary_PositionEye;
-
-vec3 vary_SunlitColor;
-vec3 vary_AmblitColor;
-vec3 vary_AdditiveColor;
-vec3 vary_AtmosAttenuation;
-uniform float gi_ambiance;
-
-vec4 getPosition_d(vec2 pos_screen, float depth)
-{
- vec2 sc = pos_screen.xy*2.0;
- sc /= screen_res;
- sc -= vec2(1.0,1.0);
- vec4 ndc = vec4(sc.x, sc.y, 2.0*depth-1.0, 1.0);
- vec4 pos = inv_proj * ndc;
- pos /= pos.w;
- pos.w = 1.0;
- return pos;
-}
-
-vec4 getPosition(vec2 pos_screen)
-{ //get position in screen space (world units) given window coordinate and depth map
- float depth = texture2DRect(depthMap, pos_screen.xy).a;
- return getPosition_d(pos_screen, depth);
-}
-
-vec3 getPositionEye()
-{
- return vary_PositionEye;
-}
-vec3 getSunlitColor()
-{
- return vary_SunlitColor;
-}
-vec3 getAmblitColor()
-{
- return vary_AmblitColor;
-}
-vec3 getAdditiveColor()
-{
- return vary_AdditiveColor;
-}
-vec3 getAtmosAttenuation()
-{
- return vary_AtmosAttenuation;
-}
-
-
-void setPositionEye(vec3 v)
-{
- vary_PositionEye = v;
-}
-
-void setSunlitColor(vec3 v)
-{
- vary_SunlitColor = v;
-}
-
-void setAmblitColor(vec3 v)
-{
- vary_AmblitColor = v;
-}
-
-void setAdditiveColor(vec3 v)
-{
- vary_AdditiveColor = v;
-}
-
-void setAtmosAttenuation(vec3 v)
-{
- vary_AtmosAttenuation = v;
-}
-
-void calcAtmospherics(vec3 inPositionEye, float ambFactor) {
-
- vec3 P = inPositionEye;
- setPositionEye(P);
-
- //(TERRAIN) limit altitude
- if (P.y > max_y.x) P *= (max_y.x / P.y);
- if (P.y < -max_y.x) P *= (-max_y.x / P.y);
-
- vec3 tmpLightnorm = lightnorm.xyz;
-
- vec3 Pn = normalize(P);
- float Plen = length(P);
-
- vec4 temp1 = vec4(0);
- vec3 temp2 = vec3(0);
- vec4 blue_weight;
- vec4 haze_weight;
- vec4 sunlight = sunlight_color;
- vec4 light_atten;
-
- //sunlight attenuation effect (hue and brightness) due to atmosphere
- //this is used later for sunlight modulation at various altitudes
- light_atten = (blue_density * 1.0 + vec4(haze_density.r) * 0.25) * (density_multiplier.x * max_y.x);
- //I had thought blue_density and haze_density should have equal weighting,
- //but attenuation due to haze_density tends to seem too strong
-
- temp1 = blue_density + vec4(haze_density.r);
- blue_weight = blue_density / temp1;
- haze_weight = vec4(haze_density.r) / temp1;
-
- //(TERRAIN) compute sunlight from lightnorm only (for short rays like terrain)
- temp2.y = max(0.0, tmpLightnorm.y);
- temp2.y = 1. / temp2.y;
- sunlight *= exp( - light_atten * temp2.y);
-
- // main atmospheric scattering line integral
- temp2.z = Plen * density_multiplier.x;
-
- // Transparency (-> temp1)
- // ATI Bugfix -- can't store temp1*temp2.z*distance_multiplier.x in a variable because the ati
- // compiler gets confused.
- temp1 = exp(-temp1 * temp2.z * distance_multiplier.x);
-
- //final atmosphere attenuation factor
- setAtmosAttenuation(temp1.rgb);
-
- //compute haze glow
- //(can use temp2.x as temp because we haven't used it yet)
- temp2.x = dot(Pn, tmpLightnorm.xyz);
- temp2.x = 1. - temp2.x;
- //temp2.x is 0 at the sun and increases away from sun
- temp2.x = max(temp2.x, .03); //was glow.y
- //set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot)
- temp2.x *= glow.x;
- //higher glow.x gives dimmer glow (because next step is 1 / "angle")
- temp2.x = pow(temp2.x, glow.z);
- //glow.z should be negative, so we're doing a sort of (1 / "angle") function
-
- //add "minimum anti-solar illumination"
- temp2.x += .25;
-
- //increase ambient when there are more clouds
- vec4 tmpAmbient = ambient*gi_ambiance + (vec4(1.) - ambient*gi_ambiance) * cloud_shadow.x * 0.5;
-
- /* decrease value and saturation (that in HSV, not HSL) for occluded areas
- * // for HSV color/geometry used here, see http://gimp-savvy.com/BOOK/index.html?node52.html
- * // The following line of code performs the equivalent of:
- * float ambAlpha = tmpAmbient.a;
- * float ambValue = dot(vec3(tmpAmbient), vec3(0.577)); // projection onto <1/rt(3), 1/rt(3), 1/rt(3)>, the neutral white-black axis
- * vec3 ambHueSat = vec3(tmpAmbient) - vec3(ambValue);
- * tmpAmbient = vec4(RenderSSAOEffect.valueFactor * vec3(ambValue) + RenderSSAOEffect.saturationFactor *(1.0 - ambFactor) * ambHueSat, ambAlpha);
- */
- tmpAmbient = vec4(mix(ssao_effect_mat * tmpAmbient.rgb, tmpAmbient.rgb, ambFactor), tmpAmbient.a);
-
- //haze color
- setAdditiveColor(
- vec3(blue_horizon * blue_weight * (sunlight*(1.-cloud_shadow.x) + tmpAmbient)
- + (haze_horizon.r * haze_weight) * (sunlight*(1.-cloud_shadow.x) * temp2.x
- + tmpAmbient)));
-
- //brightness of surface both sunlight and ambient
- setSunlitColor(vec3(sunlight * .5));
- setAmblitColor(vec3(tmpAmbient * .25));
- setAdditiveColor(getAdditiveColor() * vec3(1.0 - temp1));
-}
-
-vec3 atmosLighting(vec3 light)
-{
- light *= getAtmosAttenuation().r;
- light += getAdditiveColor();
- return (2.0 * light);
-}
-
-vec3 atmosTransport(vec3 light) {
- light *= getAtmosAttenuation().r;
- light += getAdditiveColor() * 2.0;
- return light;
-}
-vec3 atmosGetDiffuseSunlightColor()
-{
- return getSunlitColor();
-}
-
-vec3 scaleDownLight(vec3 light)
-{
- return (light / scene_light_strength );
-}
-
-vec3 scaleUpLight(vec3 light)
-{
- return (light * scene_light_strength);
-}
-
-vec3 atmosAmbient(vec3 light)
-{
- return getAmblitColor() + light / 2.0;
-}
-
-vec3 atmosAffectDirectionalLight(float lightIntensity)
-{
- return getSunlitColor() * lightIntensity;
-}
-
-vec3 scaleSoftClip(vec3 light)
-{
- //soft clip effect:
- light = 1. - clamp(light, vec3(0.), vec3(1.));
- light = 1. - pow(light, gamma.xxx);
-
- return light;
-}
-
-void main()
-{
- vec2 tc = vary_fragcoord.xy;
- float depth = texture2DRect(depthMap, tc.xy).a;
- vec3 pos = getPosition_d(tc, depth).xyz;
- vec3 norm = texture2DRect(normalMap, tc).xyz;
- norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
- //vec3 nz = texture2D(noiseMap, vary_fragcoord.xy/128.0).xyz;
-
- float da = max(dot(norm.xyz, vary_light.xyz), 0.0);
-
- vec4 diffuse = texture2DRect(diffuseRect, tc);
- vec3 col;
- float bloom = 0.0;
-
- if (diffuse.a < 0.9)
- {
- vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy);
-
- da = texture2D(lightFunc, vec2(da, 0.0)).r;
-
- vec2 scol_ambocc = texture2DRect(lightMap, vary_fragcoord.xy).rg;
- float scol = max(scol_ambocc.r, diffuse.a);
- float ambocc = scol_ambocc.g;
-
- calcAtmospherics(pos.xyz, ambocc);
-
- col = atmosAmbient(vec3(0));
- col += atmosAffectDirectionalLight(max(min(da, scol), diffuse.a));
-
- col *= diffuse.rgb;
-
- if (spec.a > 0.0) // specular reflection
- {
- // the old infinite-sky shiny reflection
- //
- vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
- float sa = dot(refnormpersp, vary_light.xyz);
- vec3 dumbshiny = vary_SunlitColor*scol*texture2D(lightFunc, vec2(sa, spec.a)).r;
-
- // add the two types of shiny together
- vec3 spec_contrib = dumbshiny * spec.rgb;
- bloom = dot(spec_contrib, spec_contrib);
- col += spec_contrib;
- }
-
- col = atmosLighting(col);
- col = scaleSoftClip(col);
-
- col = mix(col, diffuse.rgb, diffuse.a);
- }
- else
- {
- col = diffuse.rgb;
- }
-
- gl_FragColor.rgb = col;
- gl_FragColor.a = bloom;
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightV.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightV.glsl
deleted file mode 100644
index 682508aaf3..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/softenLightV.glsl
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * @file softenLightF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-uniform mat4 modelview_projection_matrix;
-
-ATTRIBUTE vec3 position;
-ATTRIBUTE vec2 texcoord0;
-
-uniform vec2 screen_res;
-
-VARYING vec4 vary_light;
-VARYING vec2 vary_fragcoord;
-void main()
-{
- //transform vertex
- vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);
- gl_Position = pos;
-
- vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;
-
- vary_light = vec4(texcoord0,0,1);
-}
diff --git a/indra/newview/app_settings/shaders/class3/deferred/treeF.glsl b/indra/newview/app_settings/shaders/class3/deferred/treeF.glsl
deleted file mode 100644
index 4d4b5b190a..0000000000
--- a/indra/newview/app_settings/shaders/class3/deferred/treeF.glsl
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * @file treeF.glsl
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2007, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef gl_FragData
-out vec4 gl_FragData[3];
-#endif
-
-VARYING vec4 vertex_color;
-VARYING vec2 vary_texcoord0;
-
-uniform sampler2D diffuseMap;
-
-VARYING vec3 vary_normal;
-
-void main()
-{
- vec4 col = texture2D(diffuseMap, vary_texcoord0.xy);
- gl_FragData[0] = vec4(vertex_color.rgb*col.rgb, col.a <= 0.5 ? 0.0 : 0.005);
- gl_FragData[1] = vec4(0,0,0,0);
- vec3 nvn = normalize(vary_normal);
- gl_FragData[2] = vec4(nvn.xy * 0.5 + 0.5, nvn.z, 0.0);
-}
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index fcb256fbfc..c45e2ce270 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -590,7 +590,7 @@ static void settings_modify()
gSavedSettings.setBOOL("VectorizeSkin", FALSE);
// disable fullscreen mode, unsupported
- gSavedSettings.setBOOL("WindowFullScreen", FALSE);
+ //gSavedSettings.setBOOL("WindowFullScreen", FALSE);
#endif
}
@@ -2946,7 +2946,7 @@ bool LLAppViewer::initWindow()
VIEWER_WINDOW_CLASSNAME,
gSavedSettings.getS32("WindowX"), gSavedSettings.getS32("WindowY"),
gSavedSettings.getS32("WindowWidth"), gSavedSettings.getS32("WindowHeight"),
- gSavedSettings.getBOOL("WindowFullScreen"), ignorePixelDepth);
+ gSavedSettings.getBOOL("FullScreen"), ignorePixelDepth);
LL_INFOS("AppInit") << "gViewerwindow created." << LL_ENDL;
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index 6effa77ced..1c89766b26 100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -527,11 +527,12 @@ void LLGLTexMemBar::draw()
LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*6,
text_color, LLFontGL::LEFT, LLFontGL::TOP);
- text = llformat("GL Tot: %d/%d MB Bound: %d/%d MB Raw Tot: %d MB Bias: %.2f Cache: %.1f/%.1f MB Net Tot Tex: %.1f MB Tot Obj: %.1f MB Tot Htp: %d",
+ text = llformat("GL Tot: %d/%d MB Bound: %d/%d MB FBO: %d MB Raw Tot: %d MB Bias: %.2f Cache: %.1f/%.1f MB Net Tot Tex: %.1f MB Tot Obj: %.1f MB Tot Htp: %d",
total_mem,
max_total_mem,
bound_mem,
max_bound_mem,
+ LLRenderTarget::sBytesAllocated/(1024*1024),
LLImageRaw::sGlobalRawMemory >> 20, discard_bias,
cache_usage, cache_max_usage, total_texture_downloaded, total_object_downloaded, total_http_requests);
//, cache_entries, cache_max_entries
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index d22e5f0af2..5b178f82d8 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -622,7 +622,6 @@ void settings_setup_listeners()
gSavedSettings.getControl("RenderDeferred")->getSignal()->connect(boost::bind(&handleRenderDeferredChanged, _2));
gSavedSettings.getControl("RenderShadowDetail")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("RenderDeferredSSAO")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
- gSavedSettings.getControl("RenderDeferredGI")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("RenderPerformanceTest")->getSignal()->connect(boost::bind(&handleRenderPerfTestChanged, _2));
gSavedSettings.getControl("TextureMemory")->getSignal()->connect(boost::bind(&handleVideoMemoryChanged, _2));
gSavedSettings.getControl("AuditTexture")->getSignal()->connect(boost::bind(&handleAuditTextureChanged, _2));
diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp
index 331eb8b8f4..3e20abecb7 100644
--- a/indra/newview/llviewerjointmesh.cpp
+++ b/indra/newview/llviewerjointmesh.cpp
@@ -706,9 +706,9 @@ void LLViewerJointMesh::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_w
if (num_verts)
{
- face->getGeometryAvatar(verticesp, normalsp, tex_coordsp, vertex_weightsp, clothing_weightsp);
face->getVertexBuffer()->getIndexStrider(indicesp);
-
+ face->getGeometryAvatar(verticesp, normalsp, tex_coordsp, vertex_weightsp, clothing_weightsp);
+
verticesp += mMesh->mFaceVertexOffset;
normalsp += mMesh->mFaceVertexOffset;
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 17d2a04301..764c247f01 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -152,7 +152,6 @@ LLGLSLShader gPostNightVisionProgram;
// Deferred rendering shaders
LLGLSLShader gDeferredImpostorProgram;
-LLGLSLShader gDeferredEdgeProgram;
LLGLSLShader gDeferredWaterProgram;
LLGLSLShader gDeferredDiffuseProgram;
LLGLSLShader gDeferredDiffuseAlphaMaskProgram;
@@ -183,16 +182,12 @@ LLGLSLShader gDeferredAlphaProgram;
LLGLSLShader gDeferredAvatarEyesProgram;
LLGLSLShader gDeferredFullbrightProgram;
LLGLSLShader gDeferredEmissiveProgram;
-LLGLSLShader gDeferredGIProgram;
-LLGLSLShader gDeferredGIFinalProgram;
-LLGLSLShader gDeferredPostGIProgram;
LLGLSLShader gDeferredPostProgram;
LLGLSLShader gFXAAProgram;
LLGLSLShader gDeferredPostNoDoFProgram;
LLGLSLShader gDeferredWLSkyProgram;
LLGLSLShader gDeferredWLCloudProgram;
LLGLSLShader gDeferredStarProgram;
-LLGLSLShader gLuminanceGatherProgram;
LLViewerShaderMgr::LLViewerShaderMgr() :
mVertexShaderLevel(SHADER_COUNT, 0),
@@ -273,12 +268,8 @@ LLViewerShaderMgr::LLViewerShaderMgr() :
mShaderList.push_back(&gDeferredFullbrightProgram);
mShaderList.push_back(&gDeferredEmissiveProgram);
mShaderList.push_back(&gDeferredAvatarEyesProgram);
- mShaderList.push_back(&gDeferredPostGIProgram);
- mShaderList.push_back(&gDeferredEdgeProgram);
mShaderList.push_back(&gDeferredPostProgram);
mShaderList.push_back(&gFXAAProgram);
- mShaderList.push_back(&gDeferredGIProgram);
- mShaderList.push_back(&gDeferredGIFinalProgram);
mShaderList.push_back(&gDeferredWaterProgram);
mShaderList.push_back(&gDeferredAvatarAlphaProgram);
mShaderList.push_back(&gDeferredWLSkyProgram);
@@ -368,24 +359,8 @@ void LLViewerShaderMgr::initAttribsAndUniforms(void)
mReservedUniforms.push_back("noiseMap");
mReservedUniforms.push_back("lightFunc");
mReservedUniforms.push_back("lightMap");
- mReservedUniforms.push_back("luminanceMap");
- mReservedUniforms.push_back("giLightMap");
- mReservedUniforms.push_back("giMip");
- mReservedUniforms.push_back("edgeMap");
mReservedUniforms.push_back("bloomMap");
- mReservedUniforms.push_back("sunLightMap");
- mReservedUniforms.push_back("localLightMap");
mReservedUniforms.push_back("projectionMap");
- mReservedUniforms.push_back("diffuseGIMap");
- mReservedUniforms.push_back("specularGIMap");
- mReservedUniforms.push_back("normalGIMap");
- mReservedUniforms.push_back("minpGIMap");
- mReservedUniforms.push_back("maxpGIMap");
- mReservedUniforms.push_back("depthGIMap");
- mReservedUniforms.push_back("lastDiffuseGIMap");
- mReservedUniforms.push_back("lastNormalGIMap");
- mReservedUniforms.push_back("lastMinpGIMap");
- mReservedUniforms.push_back("lastMaxpGIMap");
mWLUniforms.push_back("camPosLocal");
@@ -531,15 +506,8 @@ void LLViewerShaderMgr::setShaders()
gSavedSettings.getBOOL("WindLightUseAtmosShaders"))
{
if (gSavedSettings.getS32("RenderShadowDetail") > 0)
- {
- if (gSavedSettings.getBOOL("RenderDeferredGI"))
- { //shadows + gi
- deferred_class = 3;
- }
- else
- { //shadows
- deferred_class = 2;
- }
+ { //shadows
+ deferred_class = 2;
}
else
{ //no shadows
@@ -1108,13 +1076,8 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredFullbrightProgram.unload();
gDeferredEmissiveProgram.unload();
gDeferredAvatarEyesProgram.unload();
- gDeferredPostGIProgram.unload();
- gDeferredEdgeProgram.unload();
gDeferredPostProgram.unload();
gFXAAProgram.unload();
- gLuminanceGatherProgram.unload();
- gDeferredGIProgram.unload();
- gDeferredGIFinalProgram.unload();
gDeferredWaterProgram.unload();
gDeferredWLSkyProgram.unload();
gDeferredWLCloudProgram.unload();
@@ -1569,62 +1532,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
success = gDeferredStarProgram.createShader(NULL, &mWLUniforms);
}
- if (mVertexShaderLevel[SHADER_DEFERRED] > 1)
- {
- if (success)
- {
- gDeferredEdgeProgram.mName = "Deferred Edge Shader";
- gDeferredEdgeProgram.mShaderFiles.clear();
- gDeferredEdgeProgram.mShaderFiles.push_back(make_pair("deferred/edgeV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredEdgeProgram.mShaderFiles.push_back(make_pair("deferred/edgeF.glsl", GL_FRAGMENT_SHADER_ARB));
- gDeferredEdgeProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
- success = gDeferredEdgeProgram.createShader(NULL, NULL);
- }
- }
-
- if (mVertexShaderLevel[SHADER_DEFERRED] > 2)
- {
- if (success)
- {
- gDeferredPostGIProgram.mName = "Deferred Post GI Shader";
- gDeferredPostGIProgram.mShaderFiles.clear();
- gDeferredPostGIProgram.mShaderFiles.push_back(make_pair("deferred/postgiV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredPostGIProgram.mShaderFiles.push_back(make_pair("deferred/postgiF.glsl", GL_FRAGMENT_SHADER_ARB));
- gDeferredPostGIProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
- success = gDeferredPostGIProgram.createShader(NULL, NULL);
- }
-
- if (success)
- {
- gDeferredGIProgram.mName = "Deferred GI Shader";
- gDeferredGIProgram.mShaderFiles.clear();
- gDeferredGIProgram.mShaderFiles.push_back(make_pair("deferred/giV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredGIProgram.mShaderFiles.push_back(make_pair("deferred/giF.glsl", GL_FRAGMENT_SHADER_ARB));
- gDeferredGIProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
- success = gDeferredGIProgram.createShader(NULL, NULL);
- }
-
- if (success)
- {
- gDeferredGIFinalProgram.mName = "Deferred GI Final Shader";
- gDeferredGIFinalProgram.mShaderFiles.clear();
- gDeferredGIFinalProgram.mShaderFiles.push_back(make_pair("deferred/giFinalV.glsl", GL_VERTEX_SHADER_ARB));
- gDeferredGIFinalProgram.mShaderFiles.push_back(make_pair("deferred/giFinalF.glsl", GL_FRAGMENT_SHADER_ARB));
- gDeferredGIFinalProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
- success = gDeferredGIFinalProgram.createShader(NULL, NULL);
- }
-
- if (success)
- {
- gLuminanceGatherProgram.mName = "Luminance Gather Shader";
- gLuminanceGatherProgram.mShaderFiles.clear();
- gLuminanceGatherProgram.mShaderFiles.push_back(make_pair("deferred/luminanceV.glsl", GL_VERTEX_SHADER_ARB));
- gLuminanceGatherProgram.mShaderFiles.push_back(make_pair("deferred/luminanceF.glsl", GL_FRAGMENT_SHADER_ARB));
- gLuminanceGatherProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
- success = gLuminanceGatherProgram.createShader(NULL, NULL);
- }
- }
-
return success;
}
diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h
index aeb8553fa1..74708c94a7 100644
--- a/indra/newview/llviewershadermgr.h
+++ b/indra/newview/llviewershadermgr.h
@@ -111,24 +111,8 @@ public:
DEFERRED_NOISE,
DEFERRED_LIGHTFUNC,
DEFERRED_LIGHT,
- DEFERRED_LUMINANCE,
- DEFERRED_GI_LIGHT,
- DEFERRED_GI_MIP,
- DEFERRED_EDGE,
DEFERRED_BLOOM,
- DEFERRED_SUN_LIGHT,
- DEFERRED_LOCAL_LIGHT,
DEFERRED_PROJECTION,
- DEFERRED_GI_DIFFUSE,
- DEFERRED_GI_SPECULAR,
- DEFERRED_GI_NORMAL,
- DEFERRED_GI_MIN_POS,
- DEFERRED_GI_MAX_POS,
- DEFERRED_GI_DEPTH,
- DEFERRED_GI_LAST_DIFFUSE,
- DEFERRED_GI_LAST_NORMAL,
- DEFERRED_GI_LAST_MIN_POS,
- DEFERRED_GI_LAST_MAX_POS,
END_RESERVED_UNIFORMS
} eGLSLReservedUniforms;
@@ -364,7 +348,6 @@ extern LLGLSLShader gPostNightVisionProgram;
// Deferred rendering shaders
extern LLGLSLShader gDeferredImpostorProgram;
-extern LLGLSLShader gDeferredEdgeProgram;
extern LLGLSLShader gDeferredWaterProgram;
extern LLGLSLShader gDeferredDiffuseProgram;
extern LLGLSLShader gDeferredDiffuseAlphaMaskProgram;
@@ -383,14 +366,11 @@ extern LLGLSLShader gDeferredMultiLightProgram;
extern LLGLSLShader gDeferredSpotLightProgram;
extern LLGLSLShader gDeferredMultiSpotLightProgram;
extern LLGLSLShader gDeferredSunProgram;
-extern LLGLSLShader gDeferredGIProgram;
-extern LLGLSLShader gDeferredGIFinalProgram;
extern LLGLSLShader gDeferredBlurLightProgram;
extern LLGLSLShader gDeferredAvatarProgram;
extern LLGLSLShader gDeferredSoftenProgram;
extern LLGLSLShader gDeferredShadowProgram;
extern LLGLSLShader gDeferredShadowAlphaMaskProgram;
-extern LLGLSLShader gDeferredPostGIProgram;
extern LLGLSLShader gDeferredPostProgram;
extern LLGLSLShader gFXAAProgram;
extern LLGLSLShader gDeferredPostNoDoFProgram;
@@ -404,7 +384,6 @@ extern LLGLSLShader gDeferredAvatarAlphaProgram;
extern LLGLSLShader gDeferredWLSkyProgram;
extern LLGLSLShader gDeferredWLCloudProgram;
extern LLGLSLShader gDeferredStarProgram;
-extern LLGLSLShader gLuminanceGatherProgram;
#endif
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 5f010624a8..e672f7c4f1 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -661,8 +661,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
{
S32 shadow_detail = gSavedSettings.getS32("RenderShadowDetail");
BOOL ssao = gSavedSettings.getBOOL("RenderDeferredSSAO");
- bool gi = LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_DEFERRED);
-
+
//allocate deferred rendering color buffers
if (!mDeferredScreen.allocate(resX, resY, GL_RGBA, TRUE, TRUE, LLTexUnit::TT_RECT_TEXTURE, FALSE, samples)) return false;
if (!mDeferredDepth.allocate(resX, resY, 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE, samples)) return false;
@@ -678,68 +677,22 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
mFXAABuffer.release();
}
-#if LL_DARWIN
- // As of OS X 10.6.7, Apple doesn't support multiple color formats in a single FBO
- if (!mEdgeMap.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE)) return false;
-#else
- if (!mEdgeMap.allocate(resX, resY, LLRender::sGLCoreProfile ? GL_RGBA : GL_ALPHA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE)) return false;
-#endif
-
if (shadow_detail > 0 || ssao)
- { //only need mDeferredLight[0] for shadows OR ssao
- if (!mDeferredLight[0].allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE)) return false;
+ { //only need mDeferredLight for shadows OR ssao
+ if (!mDeferredLight.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE)) return false;
}
else
{
- mDeferredLight[0].release();
- }
-
- if (ssao)
- { //only need mDeferredLight[1] for ssao
- if (!mDeferredLight[1].allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, false)) return false;
- }
- else
- {
- mDeferredLight[1].release();
- }
-
- if (gi)
- { //only need mDeferredLight[2] and mGIMapPost for gi
- if (!mDeferredLight[2].allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, false)) return false;
- for (U32 i = 0; i < 2; i++)
- {
-#if LL_DARWIN
- // As of OS X 10.6.7, Apple doesn't support multiple color formats in a single FBO
- if (!mGIMapPost[i].allocate(resX,resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE)) return false;
-#else
- if (!mGIMapPost[i].allocate(resX,resY, GL_RGB, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE)) return false;
-#endif
- }
- }
- else
- {
- mDeferredLight[2].release();
-
- for (U32 i = 0; i < 2; i++)
- {
- mGIMapPost[i].release();
- }
+ mDeferredLight.release();
}
F32 scale = gSavedSettings.getF32("RenderShadowResolutionScale");
-#if LL_DARWIN
- U32 shadow_fmt = 0;
-#else
- //HACK: make alpha masking work on ATI depth shadows (work around for ATI driver bug)
- U32 shadow_fmt = gGLManager.mIsATI ? GL_ALPHA : 0;
-#endif
-
if (shadow_detail > 0)
{ //allocate 4 sun shadow maps
for (U32 i = 0; i < 4; i++)
{
- if (!mShadow[i].allocate(U32(resX*scale),U32(resY*scale), shadow_fmt, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE)) return false;
+ if (!mShadow[i].allocate(U32(resX*scale),U32(resY*scale), 0, TRUE, FALSE, LLTexUnit::TT_RECT_TEXTURE)) return false;
}
}
else
@@ -757,7 +710,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
{ //allocate two spot shadow maps
for (U32 i = 4; i < 6; i++)
{
- if (!mShadow[i].allocate(width, height, shadow_fmt, TRUE, FALSE)) return false;
+ if (!mShadow[i].allocate(width, height, 0, TRUE, FALSE)) return false;
}
}
else
@@ -767,21 +720,11 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
mShadow[i].release();
}
}
-
- width = nhpo2(resX)/2;
- height = nhpo2(resY)/2;
- if (!mLuminanceMap.allocate(width,height, GL_RGBA, FALSE, FALSE)) return false;
}
else
{
- for (U32 i = 0; i < 3; i++)
- {
- mDeferredLight[i].release();
- }
- for (U32 i = 0; i < 2; i++)
- {
- mGIMapPost[i].release();
- }
+ mDeferredLight.release();
+
for (U32 i = 0; i < 6; i++)
{
mShadow[i].release();
@@ -790,9 +733,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
mScreen.release();
mDeferredScreen.release(); //make sure to release any render targets that share a depth buffer with mDeferredScreen first
mDeferredDepth.release();
- mEdgeMap.release();
- mLuminanceMap.release();
-
+
if (!mScreen.allocate(resX, resY, GL_RGBA, TRUE, TRUE, LLTexUnit::TT_RECT_TEXTURE, FALSE)) return false;
}
@@ -876,18 +817,10 @@ void LLPipeline::releaseScreenBuffers()
mPhysicsDisplay.release();
mDeferredScreen.release();
mDeferredDepth.release();
- for (U32 i = 0; i < 3; i++)
- {
- mDeferredLight[i].release();
- }
-
- mEdgeMap.release();
- mGIMap.release();
- mGIMapPost[0].release();
- mGIMapPost[1].release();
- mHighlight.release();
- mLuminanceMap.release();
+ mDeferredLight.release();
+ mHighlight.release();
+
for (U32 i = 0; i < 6; i++)
{
mShadow[i].release();
@@ -1008,12 +941,6 @@ void LLPipeline::createGLBuffers()
delete [] lg;
}
-
- if (gSavedSettings.getBOOL("RenderDeferredGI"))
- {
- mGIMap.allocate(512,512,GL_RGBA, TRUE, FALSE);
- addDeferredAttachments(mGIMap);
- }
}
gBumpImageList.restoreGL();
@@ -6689,7 +6616,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
static LLFastTimer::DeclareTimer FTM_BIND_DEFERRED("Bind Deferred");
-void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, LLRenderTarget* gi_source, LLRenderTarget* last_gi_post, U32 noise_map)
+void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 noise_map)
{
LLFastTimer t(FTM_BIND_DEFERRED);
@@ -6721,124 +6648,6 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, LLRen
gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}
- if (gi_source)
- {
- BOOL has_gi = FALSE;
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_DIFFUSE);
- if (channel > -1)
- {
- has_gi = TRUE;
- gi_source->bindTexture(0, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_SPECULAR);
- if (channel > -1)
- {
- has_gi = TRUE;
- gi_source->bindTexture(1, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_NORMAL);
- if (channel > -1)
- {
- has_gi = TRUE;
- gi_source->bindTexture(2, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_MIN_POS);
- if (channel > -1)
- {
- has_gi = TRUE;
- gi_source->bindTexture(1, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_MAX_POS);
- if (channel > -1)
- {
- has_gi = TRUE;
- gi_source->bindTexture(3, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_LAST_DIFFUSE);
- if (channel > -1)
- {
- has_gi = TRUE;
- last_gi_post->bindTexture(0, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_LAST_NORMAL);
- if (channel > -1)
- {
- has_gi = TRUE;
- last_gi_post->bindTexture(2, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_LAST_MAX_POS);
- if (channel > -1)
- {
- has_gi = TRUE;
- last_gi_post->bindTexture(1, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_LAST_MIN_POS);
- if (channel > -1)
- {
- has_gi = TRUE;
- last_gi_post->bindTexture(3, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_DEPTH);
- if (channel > -1)
- {
- has_gi = TRUE;
- gGL.getTexUnit(channel)->bind(gi_source, TRUE);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
- stop_glerror();
-
- glTexParameteri(LLTexUnit::getInternalType(mGIMap.getUsage()), GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE);
- glTexParameteri(LLTexUnit::getInternalType(mGIMap.getUsage()), GL_DEPTH_TEXTURE_MODE_ARB, GL_ALPHA);
-
- stop_glerror();
- }
-
- if (has_gi)
- {
- F32 range_x = llmin(mGIRange.mV[0], 1.f);
- F32 range_y = llmin(mGIRange.mV[1], 1.f);
-
- LLVector2 scale(range_x,range_y);
-
- LLVector2 kern[25];
-
- for (S32 i = 0; i < 5; ++i)
- {
- for (S32 j = 0; j < 5; ++j)
- {
- S32 idx = i*5+j;
- kern[idx].mV[0] = (i-2)*0.5f;
- kern[idx].mV[1] = (j-2)*0.5f;
- kern[idx].scaleVec(scale);
- }
- }
-
- shader.uniform2fv("gi_kern", 25, (F32*) kern);
- shader.uniformMatrix4fv("gi_mat", 1, FALSE, mGIMatrix.m);
- shader.uniformMatrix4fv("gi_mat_proj", 1, FALSE, mGIMatrixProj.m);
- shader.uniformMatrix4fv("gi_inv_proj", 1, FALSE, mGIInvProj.m);
- shader.uniformMatrix4fv("gi_norm_mat", 1, FALSE, mGINormalMatrix.m);
- }
- }
- stop_glerror();
-
channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_DEPTH, mDeferredDepth.getUsage());
if (channel > -1)
{
@@ -6875,55 +6684,26 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, LLRen
stop_glerror();
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_LIGHT, mDeferredLight[light_index].getUsage());
+ channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_LIGHT, mDeferredLight.getUsage());
if (channel > -1)
{
- mDeferredLight[light_index].bindTexture(0, channel);
+ if (light_index > 0)
+ {
+ mScreen.bindTexture(0, channel);
+ }
+ else
+ {
+ mDeferredLight.bindTexture(0, channel);
+ }
gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_LUMINANCE);
- if (channel > -1)
- {
- gGL.getTexUnit(channel)->bindManual(LLTexUnit::TT_TEXTURE, mLuminanceMap.getTexture(), true);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_TRILINEAR);
- }
-
channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_BLOOM);
if (channel > -1)
{
mGlow[1].bindTexture(0, channel);
}
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_GI_LIGHT, LLTexUnit::TT_RECT_TEXTURE);
- if (channel > -1)
- {
- gi_source->bindTexture(0, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_EDGE, LLTexUnit::TT_RECT_TEXTURE);
- if (channel > -1)
- {
- mEdgeMap.bindTexture(0, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_SUN_LIGHT, LLTexUnit::TT_RECT_TEXTURE);
- if (channel > -1)
- {
- mDeferredLight[1].bindTexture(0, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
- }
-
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_LOCAL_LIGHT, LLTexUnit::TT_RECT_TEXTURE);
- if (channel > -1)
- {
- mDeferredLight[2].bindTexture(0, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
- }
-
-
stop_glerror();
for (U32 i = 0; i < 4; i++)
@@ -7032,20 +6812,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, LLRen
shader.uniform1f ("spot_shadow_offset", gSavedSettings.getF32("RenderSpotShadowOffset"));
shader.uniform1f("spot_shadow_bias", gSavedSettings.getF32("RenderSpotShadowBias"));
- shader.uniform1f("lum_scale", gSavedSettings.getF32("RenderLuminanceScale"));
- shader.uniform1f("sun_lum_scale", gSavedSettings.getF32("RenderSunLuminanceScale"));
- shader.uniform1f("sun_lum_offset", gSavedSettings.getF32("RenderSunLuminanceOffset"));
shader.uniform3fv("sun_dir", 1, mTransformedSunDir.mV);
- shader.uniform1f("lum_lod", gSavedSettings.getF32("RenderLuminanceDetail"));
- shader.uniform1f("gi_range", gSavedSettings.getF32("RenderGIRange"));
- shader.uniform1f("gi_brightness", gSavedSettings.getF32("RenderGIBrightness"));
- shader.uniform1f("gi_luminance", gSavedSettings.getF32("RenderGILuminance"));
- shader.uniform1f("gi_edge_weight", gSavedSettings.getF32("RenderGIBlurEdgeWeight"));
- shader.uniform1f("gi_blur_brightness", gSavedSettings.getF32("RenderGIBlurBrightness"));
- shader.uniform1f("gi_sample_width", mGILightRadius);
- shader.uniform1f("gi_noise", gSavedSettings.getF32("RenderGINoise"));
- shader.uniform1f("gi_attenuation", gSavedSettings.getF32("RenderGIAttenuation"));
- shader.uniform1f("gi_ambiance", gSavedSettings.getF32("RenderGIAmbiance"));
shader.uniform2f("shadow_res", mShadow[0].getWidth(), mShadow[0].getHeight());
shader.uniform2f("proj_shadow_res", mShadow[4].getWidth(), mShadow[4].getHeight());
shader.uniform1f("depth_cutoff", gSavedSettings.getF32("RenderEdgeDepthCutoff"));
@@ -7137,13 +6904,13 @@ void LLPipeline::renderDeferredLighting()
if (gSavedSettings.getBOOL("RenderDeferredSSAO") || gSavedSettings.getS32("RenderShadowDetail") > 0)
{
- mDeferredLight[0].bindTarget();
+ mDeferredLight.bindTarget();
{ //paint shadow/SSAO light map (direct lighting lightmap)
LLFastTimer ftm(FTM_SUN_SHADOW);
bindDeferredShader(gDeferredSunProgram, 0);
mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
glClearColor(1,1,1,1);
- mDeferredLight[0].clear(GL_COLOR_BUFFER_BIT);
+ mDeferredLight.clear(GL_COLOR_BUFFER_BIT);
glClearColor(0,0,0,0);
glh::matrix4f inv_trans = glh_get_current_modelview().inverse().transpose();
@@ -7166,7 +6933,7 @@ void LLPipeline::renderDeferredLighting()
}
gDeferredSunProgram.uniform3fv("offset", slice, offset);
- gDeferredSunProgram.uniform2f("screenRes", mDeferredLight[0].getWidth(), mDeferredLight[0].getHeight());
+ gDeferredSunProgram.uniform2f("screenRes", mDeferredLight.getWidth(), mDeferredLight.getHeight());
{
LLGLDisable blend(GL_BLEND);
@@ -7178,125 +6945,16 @@ void LLPipeline::renderDeferredLighting()
unbindDeferredShader(gDeferredSunProgram);
}
- mDeferredLight[0].flush();
+ mDeferredLight.flush();
}
- { //global illumination specific block (still experimental)
- if (gSavedSettings.getBOOL("RenderDeferredBlurLight") &&
- gSavedSettings.getBOOL("RenderDeferredGI"))
- {
- LLFastTimer ftm(FTM_EDGE_DETECTION);
- //generate edge map
- LLGLDisable blend(GL_BLEND);
- LLGLDisable test(GL_ALPHA_TEST);
- LLGLDepthTest depth(GL_FALSE);
- LLGLDisable stencil(GL_STENCIL_TEST);
-
- {
- gDeferredEdgeProgram.bind();
- mEdgeMap.bindTarget();
- bindDeferredShader(gDeferredEdgeProgram);
- mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
- mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3);
- unbindDeferredShader(gDeferredEdgeProgram);
- mEdgeMap.flush();
- }
- }
-
- if (LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_DEFERRED) > 2)
- {
- { //get luminance map from previous frame's light map
- LLGLEnable blend(GL_BLEND);
- LLGLDisable test(GL_ALPHA_TEST);
- LLGLDepthTest depth(GL_FALSE);
- LLGLDisable stencil(GL_STENCIL_TEST);
-
- //static F32 fade = 1.f;
-
- {
- gGL.setSceneBlendType(LLRender::BT_ALPHA);
- gLuminanceGatherProgram.bind();
- gLuminanceGatherProgram.uniform2f("screen_res", mDeferredLight[0].getWidth(), mDeferredLight[0].getHeight());
- mLuminanceMap.bindTarget();
- bindDeferredShader(gLuminanceGatherProgram);
- mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
- mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3);
- unbindDeferredShader(gLuminanceGatherProgram);
- mLuminanceMap.flush();
- gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mLuminanceMap.getTexture(), true);
- gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_TRILINEAR);
- glGenerateMipmap(GL_TEXTURE_2D);
- }
- }
-
- { //paint noisy GI map (bounce lighting lightmap)
- LLFastTimer ftm(FTM_GI_TRACE);
- LLGLDisable blend(GL_BLEND);
- LLGLDepthTest depth(GL_FALSE);
- LLGLDisable test(GL_ALPHA_TEST);
-
- mGIMapPost[0].bindTarget();
-
- bindDeferredShader(gDeferredGIProgram, 0, &mGIMap, 0, mTrueNoiseMap);
- mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
- mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3);
- unbindDeferredShader(gDeferredGIProgram);
- mGIMapPost[0].flush();
- }
-
- U32 pass_count = 0;
- if (gSavedSettings.getBOOL("RenderDeferredBlurLight"))
- {
- pass_count = llclamp(gSavedSettings.getU32("RenderGIBlurPasses"), (U32) 1, (U32) 128);
- }
-
- for (U32 i = 0; i < pass_count; ++i)
- { //gather/soften indirect lighting map
- LLFastTimer ftm(FTM_GI_GATHER);
- bindDeferredShader(gDeferredPostGIProgram, 0, &mGIMapPost[0], NULL, mTrueNoiseMap);
- F32 blur_size = gSavedSettings.getF32("RenderGIBlurSize")/((F32) i * gSavedSettings.getF32("RenderGIBlurIncrement")+1.f);
- gDeferredPostGIProgram.uniform2f("delta", 1.f, 0.f);
- gDeferredPostGIProgram.uniform1f("kern_scale", blur_size);
- gDeferredPostGIProgram.uniform1f("gi_blur_brightness", gSavedSettings.getF32("RenderGIBlurBrightness"));
-
- mGIMapPost[1].bindTarget();
- {
- LLGLDisable blend(GL_BLEND);
- LLGLDepthTest depth(GL_FALSE);
- stop_glerror();
- mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
- mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3);
- stop_glerror();
- }
-
- mGIMapPost[1].flush();
- unbindDeferredShader(gDeferredPostGIProgram);
- bindDeferredShader(gDeferredPostGIProgram, 0, &mGIMapPost[1], NULL, mTrueNoiseMap);
- mGIMapPost[0].bindTarget();
-
- gDeferredPostGIProgram.uniform2f("delta", 0.f, 1.f);
-
- {
- LLGLDisable blend(GL_BLEND);
- LLGLDepthTest depth(GL_FALSE);
- stop_glerror();
- mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
- mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3);
- stop_glerror();
- }
- mGIMapPost[0].flush();
- unbindDeferredShader(gDeferredPostGIProgram);
- }
- }
- }
-
if (gSavedSettings.getBOOL("RenderDeferredSSAO"))
{ //soften direct lighting lightmap
LLFastTimer ftm(FTM_SOFTEN_SHADOW);
//blur lightmap
- mDeferredLight[1].bindTarget();
+ mScreen.bindTarget();
glClearColor(1,1,1,1);
- mDeferredLight[1].clear(GL_COLOR_BUFFER_BIT);
+ mScreen.clear(GL_COLOR_BUFFER_BIT);
glClearColor(0,0,0,0);
bindDeferredShader(gDeferredBlurLightProgram);
@@ -7332,12 +6990,12 @@ void LLPipeline::renderDeferredLighting()
stop_glerror();
}
- mDeferredLight[1].flush();
+ mScreen.flush();
unbindDeferredShader(gDeferredBlurLightProgram);
bindDeferredShader(gDeferredBlurLightProgram, 1);
mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
- mDeferredLight[0].bindTarget();
+ mDeferredLight.bindTarget();
gDeferredBlurLightProgram.uniform2f("delta", 0.f, 1.f);
@@ -7348,7 +7006,7 @@ void LLPipeline::renderDeferredLighting()
mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3);
stop_glerror();
}
- mDeferredLight[0].flush();
+ mDeferredLight.flush();
unbindDeferredShader(gDeferredBlurLightProgram);
}
@@ -7364,25 +7022,15 @@ void LLPipeline::renderDeferredLighting()
//mScreen.copyContents(mDeferredScreen, 0, 0, mDeferredScreen.getWidth(), mDeferredScreen.getHeight(),
// 0, 0, mScreen.getWidth(), mScreen.getHeight(), GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT, GL_NEAREST);
- if (LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_DEFERRED) > 2)
- {
- mDeferredLight[1].bindTarget();
- // clear color buffer here (GI) - zeroing alpha (glow) is important or it will accumulate against sky
- glClearColor(0,0,0,0);
- mScreen.clear(GL_COLOR_BUFFER_BIT);
- }
- else
- {
- mScreen.bindTarget();
- // clear color buffer here - zeroing alpha (glow) is important or it will accumulate against sky
- glClearColor(0,0,0,0);
- mScreen.clear(GL_COLOR_BUFFER_BIT);
- }
-
+ mScreen.bindTarget();
+ // clear color buffer here - zeroing alpha (glow) is important or it will accumulate against sky
+ glClearColor(0,0,0,0);
+ mScreen.clear(GL_COLOR_BUFFER_BIT);
+
if (gSavedSettings.getBOOL("RenderDeferredAtmospheric"))
{ //apply sunlight contribution
LLFastTimer ftm(FTM_ATMOSPHERICS);
- bindDeferredShader(gDeferredSoftenProgram, 0, &mGIMapPost[0]);
+ bindDeferredShader(gDeferredSoftenProgram);
{
LLGLDepthTest depth(GL_FALSE);
LLGLDisable blend(GL_BLEND);
@@ -7426,13 +7074,6 @@ void LLPipeline::renderDeferredLighting()
BOOL render_local = gSavedSettings.getBOOL("RenderLocalLights");
- if (LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_DEFERRED) > 2)
- {
- mDeferredLight[1].flush();
- mDeferredLight[2].bindTarget();
- mDeferredLight[2].clear(GL_COLOR_BUFFER_BIT);
- }
-
if (render_local)
{
gGL.setSceneBlendType(LLRender::BT_ADD);
@@ -7723,47 +7364,6 @@ void LLPipeline::renderDeferredLighting()
}
gGL.setColorMask(true, true);
-
- if (LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_DEFERRED) > 2)
- {
- mDeferredLight[2].flush();
-
- mScreen.bindTarget();
- mScreen.clear(GL_COLOR_BUFFER_BIT);
-
- gGL.setSceneBlendType(LLRender::BT_ALPHA);
-
- { //mix various light maps (local, sun, gi)
- LLFastTimer ftm(FTM_POST);
- LLGLDisable blend(GL_BLEND);
- LLGLDisable test(GL_ALPHA_TEST);
- LLGLDepthTest depth(GL_FALSE);
- LLGLDisable stencil(GL_STENCIL_TEST);
-
- bindDeferredShader(gDeferredPostProgram, 0, &mGIMapPost[0]);
-
- gDeferredPostProgram.bind();
- mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
- LLVertexBuffer::unbind();
-
-// glVertexPointer(2, GL_FLOAT, 0, vert);
- gGL.diffuseColor3f(1,1,1);
-
- gGL.pushMatrix();
- gGL.loadIdentity();
- gGL.matrixMode(LLRender::MM_PROJECTION);
- gGL.pushMatrix();
- gGL.loadIdentity();
-
- mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3);
-
- gGL.popMatrix();
- gGL.matrixMode(LLRender::MM_MODELVIEW);
- gGL.popMatrix();
-
- unbindDeferredShader(gDeferredPostProgram);
- }
- }
}
{ //render non-deferred geometry (alpha, fullbright, glow)
@@ -7963,25 +7563,9 @@ void LLPipeline::unbindDeferredShader(LLGLSLShader &shader)
shader.disableTexture(LLViewerShaderMgr::DEFERRED_DIFFUSE, mDeferredScreen.getUsage());
shader.disableTexture(LLViewerShaderMgr::DEFERRED_SPECULAR, mDeferredScreen.getUsage());
shader.disableTexture(LLViewerShaderMgr::DEFERRED_DEPTH, mDeferredScreen.getUsage());
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_LIGHT, mDeferredLight[0].getUsage());
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_LIGHT, LLTexUnit::TT_RECT_TEXTURE);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_EDGE, mEdgeMap.getUsage());
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_SUN_LIGHT, mDeferredLight[1].getUsage());
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_LOCAL_LIGHT, mDeferredLight[2].getUsage());
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_LUMINANCE);
+ shader.disableTexture(LLViewerShaderMgr::DEFERRED_LIGHT, mDeferredLight.getUsage());
shader.disableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_MIP);
shader.disableTexture(LLViewerShaderMgr::DEFERRED_BLOOM);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_NORMAL);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_DIFFUSE);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_SPECULAR);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_DEPTH);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_MIN_POS);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_MAX_POS);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_LAST_NORMAL);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_LAST_DIFFUSE);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_LAST_MIN_POS);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_GI_LAST_MAX_POS);
for (U32 i = 0; i < 4; i++)
{
@@ -8631,184 +8215,6 @@ BOOL LLPipeline::getVisiblePointCloud(LLCamera& camera, LLVector3& min, LLVector
return TRUE;
}
-void LLPipeline::generateGI(LLCamera& camera, LLVector3& lightDir, std::vector& vpc)
-{
- if (LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_DEFERRED) < 3)
- {
- return;
- }
-
- LLVector3 up;
-
- //LLGLEnable depth_clamp(GL_DEPTH_CLAMP_NV);
-
- if (lightDir.mV[2] > 0.5f)
- {
- up = LLVector3(1,0,0);
- }
- else
- {
- up = LLVector3(0, 0, 1);
- }
-
-
- F32 gi_range = gSavedSettings.getF32("RenderGIRange");
-
- U32 res = mGIMap.getWidth();
-
- F32 atten = llmax(gSavedSettings.getF32("RenderGIAttenuation"), 0.001f);
-
- //set radius to range at which distance attenuation of incoming photons is near 0
-
- F32 lrad = sqrtf(1.f/(atten*0.01f));
-
- F32 lrange = lrad+gi_range*0.5f;
-
- LLVector3 pad(lrange,lrange,lrange);
-
- glh::matrix4f view = look(LLVector3(128.f,128.f,128.f), lightDir, up);
-
- LLVector3 cp = camera.getOrigin()+camera.getAtAxis()*(gi_range*0.5f);
-
- glh::vec3f scp(cp.mV);
- view.mult_matrix_vec(scp);
- cp.setVec(scp.v);
-
- F32 pix_width = lrange/(res*0.5f);
-
- //move cp to the nearest pix_width
- for (U32 i = 0; i < 3; i++)
- {
- cp.mV[i] = llround(cp.mV[i], pix_width);
- }
-
- LLVector3 min = cp-pad;
- LLVector3 max = cp+pad;
-
- //set mGIRange to range in tc space[0,1] that covers texture block of intersecting lights around a point
- mGIRange.mV[0] = (max.mV[0]-min.mV[0])/res;
- mGIRange.mV[1] = (max.mV[1]-min.mV[1])/res;
- mGILightRadius = lrad/lrange*0.5f;
-
- glh::matrix4f proj = gl_ortho(min.mV[0], max.mV[0],
- min.mV[1], max.mV[1],
- -max.mV[2], -min.mV[2]);
-
- LLCamera sun_cam = camera;
-
- glh::matrix4f eye_view = glh_get_current_modelview();
-
- //get eye space to camera space matrix
- mGIMatrix = view*eye_view.inverse();
- mGINormalMatrix = mGIMatrix.inverse().transpose();
- mGIInvProj = proj.inverse();
- mGIMatrixProj = proj*mGIMatrix;
-
- //translate and scale to [0,1]
- glh::matrix4f trans(.5f, 0.f, 0.f, .5f,
- 0.f, 0.5f, 0.f, 0.5f,
- 0.f, 0.f, 0.5f, 0.5f,
- 0.f, 0.f, 0.f, 1.f);
-
- mGIMatrixProj = trans*mGIMatrixProj;
-
- glh_set_current_modelview(view);
- glh_set_current_projection(proj);
-
- LLViewerCamera::updateFrustumPlanes(sun_cam, TRUE, FALSE, TRUE);
-
- sun_cam.ignoreAgentFrustumPlane(LLCamera::AGENT_PLANE_NEAR);
- static LLCullResult result;
-
- pushRenderTypeMask();
-
- andRenderTypeMask(LLPipeline::RENDER_TYPE_SIMPLE,
- LLPipeline::RENDER_TYPE_FULLBRIGHT,
- LLPipeline::RENDER_TYPE_BUMP,
- LLPipeline::RENDER_TYPE_VOLUME,
- LLPipeline::RENDER_TYPE_TREE,
- LLPipeline::RENDER_TYPE_TERRAIN,
- LLPipeline::RENDER_TYPE_WATER,
- LLPipeline::RENDER_TYPE_VOIDWATER,
- LLPipeline::RENDER_TYPE_PASS_ALPHA_SHADOW,
- LLPipeline::RENDER_TYPE_AVATAR,
- LLPipeline::RENDER_TYPE_PASS_SIMPLE,
- LLPipeline::RENDER_TYPE_PASS_BUMP,
- LLPipeline::RENDER_TYPE_PASS_FULLBRIGHT,
- LLPipeline::RENDER_TYPE_PASS_SHINY,
- END_RENDER_TYPES);
-
-
-
- S32 occlude = LLPipeline::sUseOcclusion;
- //LLPipeline::sUseOcclusion = 0;
- LLPipeline::sShadowRender = TRUE;
-
- //only render large objects into GI map
- sMinRenderSize = gSavedSettings.getF32("RenderGIMinRenderSize");
-
- LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_GI_SOURCE;
- mGIMap.bindTarget();
-
- F64 last_modelview[16];
- F64 last_projection[16];
- for (U32 i = 0; i < 16; i++)
- {
- last_modelview[i] = gGLLastModelView[i];
- last_projection[i] = gGLLastProjection[i];
- gGLLastModelView[i] = mGIModelview.m[i];
- gGLLastProjection[i] = mGIProjection.m[i];
- }
-
- sun_cam.setOrigin(0.f, 0.f, 0.f);
- updateCull(sun_cam, result);
- stateSort(sun_cam, result);
-
- for (U32 i = 0; i < 16; i++)
- {
- gGLLastModelView[i] = last_modelview[i];
- gGLLastProjection[i] = last_projection[i];
- }
-
- mGIProjection = proj;
- mGIModelview = view;
-
- LLGLEnable cull(GL_CULL_FACE);
-
- //generate GI map
- gGL.matrixMode(LLRender::MM_PROJECTION);
- gGL.pushMatrix();
- gGL.loadMatrix(proj.m);
- gGL.matrixMode(LLRender::MM_MODELVIEW);
- gGL.pushMatrix();
- gGL.loadMatrix(view.m);
-
- stop_glerror();
- gGLLastMatrix = NULL;
-
- mGIMap.clear();
-
- {
- //LLGLEnable enable(GL_DEPTH_CLAMP_NV);
- renderGeomDeferred(camera);
- }
-
- mGIMap.flush();
-
- gGL.matrixMode(LLRender::MM_PROJECTION);
- gGL.popMatrix();
- gGL.matrixMode(LLRender::MM_MODELVIEW);
- gGL.popMatrix();
- gGLLastMatrix = NULL;
-
- LLPipeline::sUseOcclusion = occlude;
- LLPipeline::sShadowRender = FALSE;
- sMinRenderSize = 0.f;
-
- popRenderTypeMask();
-
-}
-
void LLPipeline::renderHighlight(const LLViewerObject* obj, F32 fade)
{
if (obj && obj->getVolume())
@@ -9010,8 +8416,6 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
return;
}
- generateGI(camera, lightDir, fp);
-
//get good split distances for frustum
for (U32 i = 0; i < fp.size(); ++i)
{
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 02898aff1f..d24bab747b 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -248,7 +248,7 @@ public:
void renderGeomDeferred(LLCamera& camera);
void renderGeomPostDeferred(LLCamera& camera);
void renderGeomShadow(LLCamera& camera);
- void bindDeferredShader(LLGLSLShader& shader, U32 light_index = 0, LLRenderTarget* gi_source = NULL, LLRenderTarget* last_gi_post = NULL, U32 noise_map = 0xFFFFFFFF);
+ void bindDeferredShader(LLGLSLShader& shader, U32 light_index = 0, U32 noise_map = 0xFFFFFFFF);
void setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep);
void unbindDeferredShader(LLGLSLShader& shader);
@@ -262,7 +262,6 @@ public:
void renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& camera, LLCullResult& result, BOOL use_shader = TRUE, BOOL use_occlusion = TRUE);
- void generateGI(LLCamera& camera, LLVector3& lightDir, std::vector& vpc);
void renderHighlights();
void renderDebug();
void renderPhysicsDisplay();
@@ -534,10 +533,7 @@ public:
LLRenderTarget mFXAABuffer;
LLRenderTarget mEdgeMap;
LLRenderTarget mDeferredDepth;
- LLRenderTarget mDeferredLight[3];
- LLRenderTarget mGIMap;
- LLRenderTarget mGIMapPost[2];
- LLRenderTarget mLuminanceMap;
+ LLRenderTarget mDeferredLight;
LLRenderTarget mHighlight;
LLRenderTarget mPhysicsDisplay;
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 16f48f3a4e..45d6d85937 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -2549,19 +2549,6 @@
-
-
-
-
-
-
Date: Tue, 4 Oct 2011 09:38:57 -0700
Subject: DS_Store update to handle developer and release app names
---
.../newview/installers/darwin/release-dmg/_DS_Store | Bin 12292 -> 12292 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/installers/darwin/release-dmg/_DS_Store b/indra/newview/installers/darwin/release-dmg/_DS_Store
index 7022814254..747ca961d8 100644
Binary files a/indra/newview/installers/darwin/release-dmg/_DS_Store and b/indra/newview/installers/darwin/release-dmg/_DS_Store differ
--
cgit v1.2.3
From ae0cd901f8917f1cacc4c402e5a51a06632a076b Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 4 Oct 2011 17:25:55 -0500
Subject: SH-2428 Make GCC 4.4 happy by using LLVector4a striders with
LLAlphaObject subclasses -- also vectorize particle VBO updates
---
indra/newview/CMakeLists.txt | 2 -
indra/newview/llviewerobject.h | 4 +-
indra/newview/llvograss.cpp | 22 ++--
indra/newview/llvograss.h | 2 +-
indra/newview/llvopartgroup.cpp | 94 +++++++++-----
indra/newview/llvopartgroup.h | 2 +-
indra/newview/llvotextbubble.cpp | 272 ---------------------------------------
indra/newview/llvotextbubble.h | 66 ----------
8 files changed, 78 insertions(+), 386 deletions(-)
delete mode 100644 indra/newview/llvotextbubble.cpp
delete mode 100644 indra/newview/llvotextbubble.h
(limited to 'indra/newview')
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index fe80a47ca4..0381609cbd 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -588,7 +588,6 @@ set(viewer_SOURCE_FILES
llvopartgroup.cpp
llvosky.cpp
llvosurfacepatch.cpp
- llvotextbubble.cpp
llvotree.cpp
llvovolume.cpp
llvowater.cpp
@@ -1145,7 +1144,6 @@ set(viewer_HEADER_FILES
llvopartgroup.h
llvosky.h
llvosurfacepatch.h
- llvotextbubble.h
llvotree.h
llvotreenew.h
llvovolume.h
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 53e951e483..a77725c1ca 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -1,4 +1,4 @@
-/**
+/**
* @file llviewerobject.h
* @brief Description of LLViewerObject class, which is the base class for most objects in the viewer.
*
@@ -811,7 +811,7 @@ public:
virtual F32 getPartSize(S32 idx);
virtual void getGeometry(S32 idx,
- LLStrider& verticesp,
+ LLStrider& verticesp,
LLStrider& normalsp,
LLStrider& texcoordsp,
LLStrider& colorsp,
diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp
index 32822e1181..8a79d564d3 100644
--- a/indra/newview/llvograss.cpp
+++ b/indra/newview/llvograss.cpp
@@ -464,7 +464,7 @@ void LLVOGrass::plantBlades()
}
void LLVOGrass::getGeometry(S32 idx,
- LLStrider& verticesp,
+ LLStrider& verticesp,
LLStrider& normalsp,
LLStrider& texcoordsp,
LLStrider& colorsp,
@@ -516,21 +516,24 @@ void LLVOGrass::getGeometry(S32 idx,
position.mV[0] = mPosition.mV[VX] + x + xf;
position.mV[1] = mPosition.mV[VY] + y + yf;
position.mV[2] = mRegionp->getLand().resolveHeightRegion(position);
- *verticesp++ = v1 = position + mRegionp->getOriginAgent();
- *verticesp++ = v1;
+ v1 = position + mRegionp->getOriginAgent();
+ (*verticesp++).load3(v1.mV);
+ (*verticesp++).load3(v1.mV);
position.mV[0] += dzx;
position.mV[1] += dzy;
position.mV[2] += blade_height;
- *verticesp++ = v2 = position + mRegionp->getOriginAgent();
- *verticesp++ = v2;
+ v2 = position + mRegionp->getOriginAgent();
+ (*verticesp++).load3(v2.mV);
+ (*verticesp++).load3(v2.mV);
position.mV[0] = mPosition.mV[VX] + x - xf;
position.mV[1] = mPosition.mV[VY] + y - xf;
position.mV[2] = mRegionp->getLand().resolveHeightRegion(position);
- *verticesp++ = v3 = position + mRegionp->getOriginAgent();
- *verticesp++ = v3;
+ v3 = position + mRegionp->getOriginAgent();
+ (*verticesp++).load3(v3.mV);
+ (*verticesp++).load3(v3.mV);
LLVector3 normal1 = (v1-v2) % (v2-v3);
normal1.mV[VZ] = 0.75f;
@@ -541,8 +544,9 @@ void LLVOGrass::getGeometry(S32 idx,
position.mV[0] += dzx;
position.mV[1] += dzy;
position.mV[2] += blade_height;
- *verticesp++ = v1 = position + mRegionp->getOriginAgent();
- *verticesp++ = v1;
+ v1 = position + mRegionp->getOriginAgent();
+ (*verticesp++).load3(v1.mV);
+ (*verticesp++).load3(v1.mV);
*(normalsp++) = normal1;
*(normalsp++) = normal2;
diff --git a/indra/newview/llvograss.h b/indra/newview/llvograss.h
index c262fdcc79..00a59facf7 100644
--- a/indra/newview/llvograss.h
+++ b/indra/newview/llvograss.h
@@ -59,7 +59,7 @@ public:
/*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);
/*virtual*/ BOOL updateGeometry(LLDrawable *drawable);
/*virtual*/ void getGeometry(S32 idx,
- LLStrider& verticesp,
+ LLStrider& verticesp,
LLStrider& normalsp,
LLStrider& texcoordsp,
LLStrider& colorsp,
diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp
index d7edc94c2f..5c10a80b07 100644
--- a/indra/newview/llvopartgroup.cpp
+++ b/indra/newview/llvopartgroup.cpp
@@ -274,7 +274,7 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable)
}
void LLVOPartGroup::getGeometry(S32 idx,
- LLStrider& verticesp,
+ LLStrider& verticesp,
LLStrider& normalsp,
LLStrider& texcoordsp,
LLStrider& colorsp,
@@ -290,37 +290,54 @@ void LLVOPartGroup::getGeometry(S32 idx,
U32 vert_offset = mDrawable->getFace(idx)->getGeomIndex();
- LLVector3 part_pos_agent(part.mPosAgent);
- LLVector3 camera_agent = getCameraPosition();
- LLVector3 at = part_pos_agent - camera_agent;
- LLVector3 up;
- LLVector3 right;
-
- right = at % LLVector3(0.f, 0.f, 1.f);
- right.normalize();
- up = right % at;
- up.normalize();
+ LLVector4a part_pos_agent;
+ part_pos_agent.load3(part.mPosAgent.mV);
+ LLVector4a camera_agent;
+ camera_agent.load3(getCameraPosition().mV);
+ LLVector4a at;
+ at.setSub(part_pos_agent, camera_agent);
+ LLVector4a up(0, 0, 1);
+ LLVector4a right;
+
+ right.setCross3(at, up);
+ right.normalize3fast();
+ up.setCross3(right, at);
+ up.normalize3fast();
if (part.mFlags & LLPartData::LL_PART_FOLLOW_VELOCITY_MASK)
{
- LLVector3 normvel = part.mVelocity;
- normvel.normalize();
+ LLVector4a normvel;
+ normvel.load3(part.mVelocity.mV);
+ normvel.normalize3fast();
LLVector2 up_fracs;
- up_fracs.mV[0] = normvel*right;
- up_fracs.mV[1] = normvel*up;
+ up_fracs.mV[0] = normvel.dot3(right).getF32();
+ up_fracs.mV[1] = normvel.dot3(up).getF32();
up_fracs.normalize();
- LLVector3 new_up;
- LLVector3 new_right;
- new_up = up_fracs.mV[0] * right + up_fracs.mV[1]*up;
- new_right = up_fracs.mV[1] * right - up_fracs.mV[0]*up;
+ LLVector4a new_up;
+ LLVector4a new_right;
+
+ //new_up = up_fracs.mV[0] * right + up_fracs.mV[1]*up;
+ LLVector4a t = right;
+ t.mul(up_fracs.mV[0]);
+ new_up = up;
+ new_up.mul(up_fracs.mV[1]);
+ new_up.add(t);
+
+ //new_right = up_fracs.mV[1] * right - up_fracs.mV[0]*up;
+ t = right;
+ t.mul(up_fracs.mV[1]);
+ new_right = up;
+ new_right.mul(up_fracs.mV[0]);
+ t.sub(new_right);
+
up = new_up;
- right = new_right;
- up.normalize();
- right.normalize();
+ right = t;
+ up.normalize3fast();
+ right.normalize3fast();
}
- right *= 0.5f*part.mScale.mV[0];
- up *= 0.5f*part.mScale.mV[1];
+ right.mul(0.5f*part.mScale.mV[0]);
+ up.mul(0.5f*part.mScale.mV[1]);
LLVector3 normal = -LLViewerCamera::getInstance()->getXAxis();
@@ -329,14 +346,25 @@ void LLVOPartGroup::getGeometry(S32 idx,
// this works because there is actually a 4th float stored after the vertex position which is used as a texture index
// also, somebody please VECTORIZE THIS
- verticesp->mV[3] = 0.f;
- *verticesp++ = part_pos_agent + up - right;
- verticesp->mV[3] = 0.f;
- *verticesp++ = part_pos_agent - up - right;
- verticesp->mV[3] = 0.f;
- *verticesp++ = part_pos_agent + up + right;
- verticesp->mV[3] = 0.f;
- *verticesp++ = part_pos_agent - up + right;
+ LLVector4a ppapu;
+ LLVector4a ppamu;
+
+ ppapu.setAdd(part_pos_agent, up);
+ ppamu.setSub(part_pos_agent, up);
+
+ verticesp->setSub(ppapu, right);
+ (*verticesp++).getF32ptr()[3] = 0.f;
+ verticesp->setSub(ppamu, right);
+ (*verticesp++).getF32ptr()[3] = 0.f;
+ verticesp->setAdd(ppapu, right);
+ (*verticesp++).getF32ptr()[3] = 0.f;
+ verticesp->setAdd(ppamu, right);
+ (*verticesp++).getF32ptr()[3] = 0.f;
+
+ //*verticesp++ = part_pos_agent + up - right;
+ //*verticesp++ = part_pos_agent - up - right;
+ //*verticesp++ = part_pos_agent + up + right;
+ //*verticesp++ = part_pos_agent - up + right;
*colorsp++ = part.mColor;
*colorsp++ = part.mColor;
@@ -453,7 +481,7 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group)
LLVertexBuffer* buffer = group->mVertexBuffer;
LLStrider indicesp;
- LLStrider verticesp;
+ LLStrider verticesp;
LLStrider normalsp;
LLStrider texcoordsp;
LLStrider colorsp;
diff --git a/indra/newview/llvopartgroup.h b/indra/newview/llvopartgroup.h
index 4db893b4ef..e58fed86d9 100644
--- a/indra/newview/llvopartgroup.h
+++ b/indra/newview/llvopartgroup.h
@@ -60,7 +60,7 @@ public:
/*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);
/*virtual*/ BOOL updateGeometry(LLDrawable *drawable);
void getGeometry(S32 idx,
- LLStrider& verticesp,
+ LLStrider& verticesp,
LLStrider& normalsp,
LLStrider& texcoordsp,
LLStrider& colorsp,
diff --git a/indra/newview/llvotextbubble.cpp b/indra/newview/llvotextbubble.cpp
deleted file mode 100644
index a92172fe23..0000000000
--- a/indra/newview/llvotextbubble.cpp
+++ /dev/null
@@ -1,272 +0,0 @@
-/**
- * @file llvotextbubble.cpp
- * @brief Viewer-object text bubble.
- *
- * $LicenseInfo:firstyear=2001&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llvotextbubble.h"
-
-#include "imageids.h"
-#include "llviewercontrol.h"
-#include "llprimitive.h"
-#include "llrendersphere.h"
-
-#include "llbox.h"
-#include "lldrawable.h"
-#include "llface.h"
-#include "llviewertexturelist.h"
-#include "llvolume.h"
-#include "pipeline.h"
-#include "llvector4a.h"
-#include "llviewerregion.h"
-
-LLVOTextBubble::LLVOTextBubble(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
-: LLAlphaObject(id, pcode, regionp)
-{
- setScale(LLVector3(1.5f, 1.5f, 0.25f));
- mbCanSelect = FALSE;
- mLOD = MIN_LOD;
- mVolumeChanged = TRUE;
- setVelocity(LLVector3(0.f, 0.f, 0.75f));
- LLVolumeParams volume_params;
- volume_params.setType(LL_PCODE_PROFILE_CIRCLE, LL_PCODE_PATH_LINE);
- volume_params.setBeginAndEndS(0.f, 1.f);
- volume_params.setBeginAndEndT(0.f, 1.f);
- volume_params.setRatio(0.25f, 0.25f);
- volume_params.setShear(0.f, 0.f);
- setVolume(volume_params, 0);
- mColor = LLColor4(1.0f, 0.0f, 0.0f, 1.f);
- S32 i;
- for (i = 0; i < getNumTEs(); i++)
- {
- setTEColor(i, mColor);
- setTETexture(i, LLUUID(IMG_DEFAULT));
- }
-}
-
-
-LLVOTextBubble::~LLVOTextBubble()
-{
-}
-
-
-BOOL LLVOTextBubble::isActive() const
-{
- return TRUE;
-}
-
-BOOL LLVOTextBubble::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
-{
- static LLFastTimer::DeclareTimer ftm("Text Bubble");
- LLFastTimer t(ftm);
-
- F32 dt = mUpdateTimer.getElapsedTimeF32();
- // Die after a few seconds.
- if (dt > 1.5f)
- {
- return FALSE;
- }
-
- LLViewerObject::idleUpdate(agent, world, time);
-
- setScale(0.5f * (1.f+dt) * LLVector3(1.5f, 1.5f, 0.5f));
-
- F32 alpha = 0.35f*dt;
-
- LLColor4 color = mColor;
- color.mV[VALPHA] -= alpha;
- if (color.mV[VALPHA] <= 0.05f)
- {
- return FALSE;
- }
- S32 i;
- for (i = 0; i < getNumTEs(); i++)
- {
- setTEColor(i, color);
- setTEFullbright(i, TRUE);
- }
-
- gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE);
- return TRUE;
-}
-
-
-void LLVOTextBubble::updateTextures()
-{
- // Update the image levels of all textures...
-
- for (U32 i = 0; i < getNumTEs(); i++)
- {
- const LLTextureEntry *te = getTE(i);
- F32 texel_area_ratio = fabs(te->mScaleS * te->mScaleT);
- texel_area_ratio = llclamp(texel_area_ratio, .125f, 16.f);
- LLViewerTexture *imagep = getTEImage(i);
- if (imagep)
- {
- imagep->addTextureStats(mPixelArea / texel_area_ratio);
- }
- }
-}
-
-
-LLDrawable *LLVOTextBubble::createDrawable(LLPipeline *pipeline)
-{
- pipeline->allocDrawable(this);
- mDrawable->setLit(FALSE);
- mDrawable->setRenderType(LLPipeline::RENDER_TYPE_VOLUME);
-
- for (U32 i = 0; i < getNumTEs(); i++)
- {
- LLViewerTexture *imagep;
- const LLTextureEntry *texture_entry = getTE(i);
- imagep = LLViewerTextureManager::getFetchedTexture(texture_entry->getID());
-
- mDrawable->addFace((LLFacePool*) NULL, imagep);
- }
-
- return mDrawable;
-}
-
-// virtual
-BOOL LLVOTextBubble::setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume)
-{
- if (LLPrimitive::setVolume(volume_params, mLOD))
- {
- if (mDrawable)
- {
- gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE);
- mVolumeChanged = TRUE;
- }
- return TRUE;
- }
- return FALSE;
-}
-
-
-BOOL LLVOTextBubble::updateLOD()
-{
- return FALSE;
-}
-
-BOOL LLVOTextBubble::updateGeometry(LLDrawable *drawable)
-{
- if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_VOLUME)))
- return TRUE;
-
- if (mVolumeChanged)
- {
- LLVolumeParams volume_params = getVolume()->getParams();
- setVolume(volume_params, 0);
-
- LLPipeline::sCompiles++;
-
- drawable->setNumFaces(getVolume()->getNumFaces(), drawable->getFace(0)->getPool(), getTEImage(0));
- }
-
- LLMatrix4 identity4;
- LLMatrix3 identity3;
- for (S32 i = 0; i < drawable->getNumFaces(); i++)
- {
- LLFace *face = drawable->getFace(i);
- face->setTEOffset(i);
- face->setTexture(LLViewerFetchedTexture::sSmokeImagep);
- face->setState(LLFace::FULLBRIGHT);
- }
-
- mVolumeChanged = FALSE;
-
- mDrawable->movePartition();
- return TRUE;
-}
-
-void LLVOTextBubble::updateFaceSize(S32 idx)
-{
- LLFace* face = mDrawable->getFace(idx);
-
- if (idx == 0 || idx == 2)
- {
- face->setSize(0,0);
- }
- else
- {
- const LLVolumeFace& vol_face = getVolume()->getVolumeFace(idx);
- face->setSize(vol_face.mNumVertices, vol_face.mNumIndices);
- }
-}
-
-void LLVOTextBubble::getGeometry(S32 idx,
- LLStrider& verticesp,
- LLStrider& normalsp,
- LLStrider& texcoordsp,
- LLStrider& colorsp,
- LLStrider& indicesp)
-{
- if (idx == 0 || idx == 2)
- {
- return;
- }
-
- const LLVolumeFace& face = getVolume()->getVolumeFace(idx);
-
- LLVector4a pos;
- pos.load3(getPositionAgent().mV);
-
- LLVector4a scale;
- scale.load3(getScale().mV);
-
- LLColor4U color = LLColor4U(getTE(idx)->getColor());
- U32 offset = mDrawable->getFace(idx)->getGeomIndex();
-
- LLVector4a* dst_pos = (LLVector4a*) verticesp.get();
- LLVector4a* src_pos = (LLVector4a*) face.mPositions;
-
- LLVector4a* dst_norm = (LLVector4a*) normalsp.get();
- LLVector4a* src_norm = (LLVector4a*) face.mNormals;
-
- LLVector2* dst_tc = (LLVector2*) texcoordsp.get();
- LLVector2* src_tc = (LLVector2*) face.mTexCoords;
-
- LLVector4a::memcpyNonAliased16((F32*) dst_norm, (F32*) src_norm, face.mNumVertices*4*sizeof(F32));
- LLVector4a::memcpyNonAliased16((F32*) dst_tc, (F32*) src_tc, face.mNumVertices*2*sizeof(F32));
-
-
- for (U32 i = 0; i < face.mNumVertices; i++)
- {
- LLVector4a t;
- t.setMul(src_pos[i], scale);
- dst_pos[i].setAdd(t, pos);
- *colorsp++ = color;
- }
-
- for (U32 i = 0; i < face.mNumIndices; i++)
- {
- *indicesp++ = face.mIndices[i] + offset;
- }
-}
-
-U32 LLVOTextBubble::getPartitionType() const
-{
- return LLViewerRegion::PARTITION_PARTICLE;
-}
diff --git a/indra/newview/llvotextbubble.h b/indra/newview/llvotextbubble.h
deleted file mode 100644
index 9c39929711..0000000000
--- a/indra/newview/llvotextbubble.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * @file llvotextbubble.h
- * @brief Description of LLVORock class, which a derivation of LLViewerObject
- *
- * $LicenseInfo:firstyear=2001&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLVOTEXTBUBBLE_H
-#define LL_LLVOTEXTBUBBLE_H
-
-#include "llviewerobject.h"
-#include "llframetimer.h"
-
-class LLVOTextBubble : public LLAlphaObject
-{
-public:
- LLVOTextBubble(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
-
- /*virtual*/ BOOL isActive() const; // Whether this object needs to do an idleUpdate.
- /*virtual*/ BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
-
- /*virtual*/ void updateTextures();
- /*virtual*/ LLDrawable* createDrawable(LLPipeline *pipeline);
- /*virtual*/ BOOL updateGeometry(LLDrawable *drawable);
- /*virtual*/ BOOL updateLOD();
- /*virtual*/ void updateFaceSize(S32 idx);
-
- /*virtual*/ void getGeometry(S32 idx,
- LLStrider& verticesp,
- LLStrider& normalsp,
- LLStrider& texcoordsp,
- LLStrider& colorsp,
- LLStrider& indicesp);
-
- virtual U32 getPartitionType() const;
-
- LLColor4 mColor;
- S32 mLOD;
- BOOL mVolumeChanged;
-
-protected:
- ~LLVOTextBubble();
- BOOL setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume = false);
- LLFrameTimer mUpdateTimer;
-};
-
-#endif // LL_VO_TEXT_BUBBLE
--
cgit v1.2.3
From 425b10601da5f0e0df265489d8d427afbd506332 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 4 Oct 2011 18:11:11 -0500
Subject: SH-2459 Default to 2x antialiasing instead of 4x/8x
---
indra/newview/featuretable.txt | 4 ++--
indra/newview/featuretable_linux.txt | 4 ++--
indra/newview/featuretable_mac.txt | 4 ++--
indra/newview/featuretable_xp.txt | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index ca66ae989c..9379d336d0 100755
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -155,7 +155,7 @@ WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
-RenderFSAASamples 1 4
+RenderFSAASamples 1 2
//
// Ultra graphics (REALLY PURTY!)
@@ -184,7 +184,7 @@ WLSkyDetail 1 128
RenderDeferred 1 1
RenderDeferredSSAO 1 1
RenderShadowDetail 1 2
-RenderFSAASamples 1 8
+RenderFSAASamples 1 2
//
diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt
index 6e962f3c56..18efcf5665 100644
--- a/indra/newview/featuretable_linux.txt
+++ b/indra/newview/featuretable_linux.txt
@@ -153,7 +153,7 @@ WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 0
-RenderFSAASamples 1 4
+RenderFSAASamples 1 2
//
// Ultra graphics (REALLY PURTY!)
@@ -183,7 +183,7 @@ WLSkyDetail 1 128
RenderDeferred 1 1
RenderDeferredSSAO 1 1
RenderShadowDetail 1 2
-RenderFSAASamples 1 8
+RenderFSAASamples 1 2
//
// Class Unknown Hardware (unknown)
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index 36ffa54184..c37e4e93ee 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -155,7 +155,7 @@ WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 2
-RenderFSAASamples 1 4
+RenderFSAASamples 1 2
//
// Ultra graphics (REALLY PURTY!)
@@ -185,7 +185,7 @@ WLSkyDetail 1 128
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 2
-RenderFSAASamples 1 8
+RenderFSAASamples 1 2
//
// Class Unknown Hardware (unknown)
diff --git a/indra/newview/featuretable_xp.txt b/indra/newview/featuretable_xp.txt
index e855b2c569..fffd30c0d8 100644
--- a/indra/newview/featuretable_xp.txt
+++ b/indra/newview/featuretable_xp.txt
@@ -155,7 +155,7 @@ WLSkyDetail 1 48
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 2
-RenderFSAASamples 1 4
+RenderFSAASamples 1 2
//
// Ultra graphics (REALLY PURTY!)
@@ -185,7 +185,7 @@ WLSkyDetail 1 128
RenderDeferred 1 0
RenderDeferredSSAO 1 0
RenderShadowDetail 1 2
-RenderFSAASamples 1 8
+RenderFSAASamples 1 2
//
// Class Unknown Hardware (unknown)
--
cgit v1.2.3
From 210120f9068e8f5696abab55f9fced307e021d22 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Wed, 5 Oct 2011 00:49:03 -0500
Subject: SH-2240 Fix for projectors being double sided when shadows disabled
---
.../newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
index d3984276ef..2196d14895 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl
@@ -149,7 +149,7 @@ void main()
vec4 proj_tc = (proj_mat * vec4(pos.xyz, 1.0));
if (proj_tc.z < 0.0)
{
- //discard;
+ discard;
}
proj_tc.xyz /= proj_tc.w;
@@ -158,7 +158,7 @@ void main()
float dist_atten = min(1.0-(dist2-1.0*(1.0-fa))/fa, 1.0);
if (dist_atten <= 0.0)
{
- //discard;
+ discard;
}
lv = proj_origin-pos.xyz;
--
cgit v1.2.3
From 55cbe344f8aebba2301f127cab2a94c63d5b0978 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Wed, 5 Oct 2011 10:23:46 -0400
Subject: SH-2515 WIP - Preserve user settings
---
.../installers/windows/installer_template.nsi | 94 ++++++++++++++++++++++
1 file changed, 94 insertions(+)
mode change 100644 => 100755 indra/newview/installers/windows/installer_template.nsi
(limited to 'indra/newview')
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
old mode 100644
new mode 100755
index a874ce1245..abd2e7f7c5
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -342,6 +342,97 @@ FunctionEnd
;
;FunctionEnd
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; Save files from cache
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+Function PreserveCacheFiles
+
+Push $0
+Push $1
+Push $2
+
+ RMDir /r "$TEMP\SecondLifeSettingsBackup"
+ CreateDirectory "$TEMP\SecondLifeSettingsBackup"
+ StrCpy $0 0 ; Index number used to iterate via EnumRegKey
+
+ LOOP:
+ EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
+ StrCmp $1 "" DONE ; no more users
+
+ ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
+ StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing
+
+ ; Required since ProfileImagePath is of type REG_EXPAND_SZ
+ ExpandEnvStrings $2 $2
+
+ CreateDirectory "$TEMP\SecondLifeSettingsBackup\$0"
+ CopyFiles "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\$0"
+
+ CONTINUE:
+ IntOp $0 $0 + 1
+ Goto LOOP
+ DONE:
+
+Pop $2
+Pop $1
+Pop $0
+
+; Copy files in Documents and Settings\All Users\SecondLife
+Push $0
+ ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
+ StrCmp $0 "" +2
+ CreateDirectory "$TEMP\SecondLifeSettingsBackup\AllUsers\"
+ CopyFiles "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\AllUsers\"
+Pop $0
+
+FunctionEnd
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; Restore files from cache
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+Function RestoreCacheFiles
+
+Push $0
+Push $1
+Push $2
+
+ StrCpy $0 0 ; Index number used to iterate via EnumRegKey
+
+ LOOP:
+ EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
+ StrCmp $1 "" DONE ; no more users
+
+ ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
+ StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing
+
+ ; Required since ProfileImagePath is of type REG_EXPAND_SZ
+ ExpandEnvStrings $2 $2
+
+ RMDir /r "$2\Application Data\SecondLifeRestore\"
+ CreateDirectory "$2\Application Data\SecondLifeRestore\"
+ CopyFiles "$TEMP\SecondLifeSettingsBackup\$0\*" "$2\Application Data\SecondLifeRestore\"
+
+ CONTINUE:
+ IntOp $0 $0 + 1
+ Goto LOOP
+ DONE:
+
+Pop $2
+Pop $1
+Pop $0
+
+; Copy files in Documents and Settings\All Users\SecondLife
+Push $0
+ ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
+ StrCmp $0 "" +2
+ RMDir /r "$2\Application Data\SecondLifeRestore\"
+ CreateDirectory "$2\Application Data\SecondLifeRestore\"
+ CopyFiles "$TEMP\SecondLifeSettingsBackup\AllUsers\*" "$2\Application Data\SecondLifeRestore\"
+Pop $0
+
+FunctionEnd
+
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Delete the installed shader files
;;; Since shaders are in active development, we'll likely need to shuffle them
@@ -772,6 +863,9 @@ Call CheckNetworkConnection ; ping secondlife.com
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Don't remove cache files during a regular install, removing the inventory cache on upgrades results in lots of damage to the servers.
;Call RemoveCacheFiles ; Installing over removes potentially corrupted
+
+Call PreserveCacheFiles
+Call RestoreCacheFiles
; VFS and cache files.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
--
cgit v1.2.3
From 967479f9039dc358b9419be7f117162f7d90609c Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Wed, 5 Oct 2011 15:12:02 -0500
Subject: SH-2031 Fix for stall in image update -- don't use the CPU to convert
a height map into a normal map -- use the GPU instead via a shader. Also,
WTF glFinish?
---
.../shaders/class1/deferred/normgenF.glsl | 56 +++++++
.../shaders/class1/deferred/normgenV.glsl | 36 +++++
indra/newview/lldrawpoolbump.cpp | 176 +++++++++++++++------
indra/newview/llviewerdisplay.cpp | 35 ++--
indra/newview/llviewershadermgr.cpp | 14 ++
indra/newview/llviewershadermgr.h | 2 +-
indra/newview/llviewertexturelist.cpp | 66 +++++---
7 files changed, 305 insertions(+), 80 deletions(-)
create mode 100644 indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl
create mode 100644 indra/newview/app_settings/shaders/class1/deferred/normgenV.glsl
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl b/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl
new file mode 100644
index 0000000000..879942d8fa
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/normgenF.glsl
@@ -0,0 +1,56 @@
+/**
+ * @file normgenF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#extension GL_ARB_texture_rectangle : enable
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform sampler2D alphaMap;
+
+VARYING vec2 vary_texcoord0;
+
+uniform float stepX;
+uniform float stepY;
+uniform float norm_scale;
+
+void main()
+{
+ float alpha = texture2D(alphaMap, vary_texcoord0).a;
+
+ vec3 right = vec3(norm_scale, 0, (texture2D(alphaMap, vary_texcoord0+vec2(stepX, 0)).a-alpha)*255);
+ vec3 left = vec3(-norm_scale, 0, (texture2D(alphaMap, vary_texcoord0-vec2(stepX, 0)).a-alpha)*255);
+ vec3 up = vec3(0, -norm_scale, (texture2D(alphaMap, vary_texcoord0-vec2(0, stepY)).a-alpha)*255);
+ vec3 down = vec3(0, norm_scale, (texture2D(alphaMap, vary_texcoord0+vec2(0, stepY)).a-alpha)*255);
+
+ vec3 norm = cross(right, down) + cross(down, left) + cross(left,up) + cross(up, right);
+
+ norm = normalize(norm);
+ norm *= 0.5;
+ norm += 0.5;
+
+ gl_FragColor = vec4(norm, alpha);
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/normgenV.glsl b/indra/newview/app_settings/shaders/class1/deferred/normgenV.glsl
new file mode 100644
index 0000000000..9bceae05b7
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/normgenV.glsl
@@ -0,0 +1,36 @@
+/**
+ * @file normgenV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec2 texcoord0;
+
+VARYING vec2 vary_fragcoord;
+VARYING vec2 vary_texcoord0;
+
+void main()
+{
+ gl_Position = vec4(position.x*2.0-1.0, position.y*2.0-1.0, -1.0, 1.0);
+ vary_texcoord0 = texcoord0;
+}
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 501bd88970..be12eb800f 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -1088,6 +1088,8 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText
}
+static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_STANDARD_LOADED("Bump Standard Callback");
+
// static
void LLBumpImageList::onSourceBrightnessLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata )
{
@@ -1110,14 +1112,24 @@ void LLBumpImageList::onSourceDarknessLoaded( BOOL success, LLViewerFetchedTextu
}
}
+static LLFastTimer::DeclareTimer FTM_BUMP_GEN_NORMAL("Generate Normal Map");
+static LLFastTimer::DeclareTimer FTM_BUMP_CREATE_TEXTURE("Create GL Normal Map");
+
void LLBumpImageList::onSourceStandardLoaded( BOOL success, LLViewerFetchedTexture* src_vi, LLImageRaw* src, LLImageRaw* aux_src, S32 discard_level, BOOL final, void* userdata)
{
if (success && LLPipeline::sRenderDeferred)
{
+ LLFastTimer t(FTM_BUMP_SOURCE_STANDARD_LOADED);
LLPointer nrm_image = new LLImageRaw(src->getWidth(), src->getHeight(), 4);
- generateNormalMapFromAlpha(src, nrm_image);
+ {
+ LLFastTimer t(FTM_BUMP_GEN_NORMAL);
+ generateNormalMapFromAlpha(src, nrm_image);
+ }
src_vi->setExplicitFormat(GL_RGBA, GL_RGBA);
- src_vi->createGLTexture(src_vi->getDiscardLevel(), nrm_image);
+ {
+ LLFastTimer t(FTM_BUMP_CREATE_TEXTURE);
+ src_vi->createGLTexture(src_vi->getDiscardLevel(), nrm_image);
+ }
}
}
@@ -1176,24 +1188,39 @@ void LLBumpImageList::generateNormalMapFromAlpha(LLImageRaw* src, LLImageRaw* nr
}
}
+
+static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_LOADED("Bump Source Loaded");
+static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_ENTRIES_UPDATE("Entries Update");
+static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_MIN_MAX("Min/Max");
+static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_RGB2LUM("RGB to Luminance");
+static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_RESCALE("Rescale");
+static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_GEN_NORMAL("Generate Normal");
+static LLFastTimer::DeclareTimer FTM_BUMP_SOURCE_CREATE("Create");
+
// static
void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLImageRaw* src, LLUUID& source_asset_id, EBumpEffect bump_code )
{
if( success )
{
+ LLFastTimer t(FTM_BUMP_SOURCE_LOADED);
+
+
bump_image_map_t& entries_list(bump_code == BE_BRIGHTNESS ? gBumpImageList.mBrightnessEntries : gBumpImageList.mDarknessEntries );
bump_image_map_t::iterator iter = entries_list.find(source_asset_id);
- if (iter == entries_list.end() ||
- iter->second.isNull() ||
- iter->second->getWidth() != src->getWidth() ||
- iter->second->getHeight() != src->getHeight()) // bump not cached yet or has changed resolution
- { //make sure an entry exists for this image
- LLPointer raw = new LLImageRaw(1,1,1);
- raw->clear(0x77, 0x77, 0xFF, 0xFF);
-
- entries_list[src_vi->getID()] = LLViewerTextureManager::getLocalTexture( raw.get(), TRUE);
- iter = entries_list.find(src_vi->getID());
+ {
+ LLFastTimer t(FTM_BUMP_SOURCE_ENTRIES_UPDATE);
+ if (iter == entries_list.end() ||
+ iter->second.isNull() ||
+ iter->second->getWidth() != src->getWidth() ||
+ iter->second->getHeight() != src->getHeight()) // bump not cached yet or has changed resolution
+ { //make sure an entry exists for this image
+ LLPointer raw = new LLImageRaw(1,1,1);
+ raw->clear(0x77, 0x77, 0xFF, 0xFF);
+
+ entries_list[src_vi->getID()] = LLViewerTextureManager::getLocalTexture( raw.get(), TRUE);
+ iter = entries_list.find(src_vi->getID());
+ }
}
//if (iter->second->getWidth() != src->getWidth() ||
@@ -1224,50 +1251,56 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
{
case 1:
case 2:
- if( src_data_size == dst_data_size * src_components )
{
- for( S32 i = 0, j=0; i < dst_data_size; i++, j+= src_components )
+ LLFastTimer t(FTM_BUMP_SOURCE_MIN_MAX);
+ if( src_data_size == dst_data_size * src_components )
{
- dst_data[i] = src_data[j];
- if( dst_data[i] < minimum )
+ for( S32 i = 0, j=0; i < dst_data_size; i++, j+= src_components )
{
- minimum = dst_data[i];
- }
- if( dst_data[i] > maximum )
- {
- maximum = dst_data[i];
+ dst_data[i] = src_data[j];
+ if( dst_data[i] < minimum )
+ {
+ minimum = dst_data[i];
+ }
+ if( dst_data[i] > maximum )
+ {
+ maximum = dst_data[i];
+ }
}
}
- }
- else
- {
- llassert(0);
- dst_image->clear();
+ else
+ {
+ llassert(0);
+ dst_image->clear();
+ }
}
break;
case 3:
case 4:
- if( src_data_size == dst_data_size * src_components )
{
- for( S32 i = 0, j=0; i < dst_data_size; i++, j+= src_components )
+ LLFastTimer t(FTM_BUMP_SOURCE_RGB2LUM);
+ if( src_data_size == dst_data_size * src_components )
{
- // RGB to luminance
- dst_data[i] = (R_WEIGHT * src_data[j] + G_WEIGHT * src_data[j+1] + B_WEIGHT * src_data[j+2]) >> FIXED_PT;
- //llassert( dst_data[i] <= 255 );true because it's 8bit
- if( dst_data[i] < minimum )
- {
- minimum = dst_data[i];
- }
- if( dst_data[i] > maximum )
+ for( S32 i = 0, j=0; i < dst_data_size; i++, j+= src_components )
{
- maximum = dst_data[i];
+ // RGB to luminance
+ dst_data[i] = (R_WEIGHT * src_data[j] + G_WEIGHT * src_data[j+1] + B_WEIGHT * src_data[j+2]) >> FIXED_PT;
+ //llassert( dst_data[i] <= 255 );true because it's 8bit
+ if( dst_data[i] < minimum )
+ {
+ minimum = dst_data[i];
+ }
+ if( dst_data[i] > maximum )
+ {
+ maximum = dst_data[i];
+ }
}
}
- }
- else
- {
- llassert(0);
- dst_image->clear();
+ else
+ {
+ llassert(0);
+ dst_image->clear();
+ }
}
break;
default:
@@ -1278,6 +1311,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
if( maximum > minimum )
{
+ LLFastTimer t(FTM_BUMP_SOURCE_RESCALE);
U8 bias_and_scale_lut[256];
F32 twice_one_over_range = 2.f / (maximum - minimum);
S32 i;
@@ -1311,17 +1345,63 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
// accidentally releases it.
LLPointer bump = LLViewerTextureManager::getLocalTexture( TRUE );
+
if (!LLPipeline::sRenderDeferred)
{
+ LLFastTimer t(FTM_BUMP_SOURCE_CREATE);
bump->setExplicitFormat(GL_ALPHA8, GL_ALPHA);
bump->createGLTexture(0, dst_image);
}
- else
- {
- LLPointer nrm_image = new LLImageRaw(dst_image->getWidth(), dst_image->getHeight(), 4);
- generateNormalMapFromAlpha(dst_image, nrm_image);
- bump->setExplicitFormat(GL_RGBA, GL_RGBA);
- bump->createGLTexture(0, nrm_image);
+ else
+ { //convert to normal map
+ {
+ LLFastTimer t(FTM_BUMP_SOURCE_CREATE);
+ bump->setExplicitFormat(GL_RGBA8, GL_ALPHA);
+ bump->createGLTexture(0, dst_image);
+ }
+
+ {
+ LLFastTimer t(FTM_BUMP_SOURCE_GEN_NORMAL);
+ gPipeline.mScreen.bindTarget();
+ LLGLDepthTest depth(GL_FALSE);
+ LLGLDisable cull(GL_CULL_FACE);
+ LLGLDisable blend(GL_BLEND);
+ gGL.setColorMask(TRUE, TRUE);
+ gNormalMapGenProgram.bind();
+ gNormalMapGenProgram.uniform1f("norm_scale", gSavedSettings.getF32("RenderNormalMapScale"));
+ gNormalMapGenProgram.uniform1f("stepX", 1.f/bump->getWidth());
+ gNormalMapGenProgram.uniform1f("stepY", 1.f/bump->getHeight());
+
+ LLVector2 v((F32) bump->getWidth()/gPipeline.mScreen.getWidth(),
+ (F32) bump->getHeight()/gPipeline.mScreen.getHeight());
+
+ gGL.getTexUnit(0)->bind(bump);
+
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+
+ gGL.texCoord2f(0, 0);
+ gGL.vertex2f(0, 0);
+ gGL.texCoord2f(0, 1);
+ gGL.vertex2f(0, v.mV[1]);
+ gGL.texCoord2f(1, 0);
+ gGL.vertex2f(v.mV[0], 0);
+ gGL.texCoord2f(1, 1);
+ gGL.vertex2f(v.mV[0], v.mV[1]);
+
+ gGL.end();
+
+ gGL.flush();
+
+ glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, bump->getWidth(), bump->getHeight());
+
+ glGenerateMipmap(GL_TEXTURE_2D);
+
+ gPipeline.mScreen.flush();
+
+ gNormalMapGenProgram.unbind();
+
+ //generateNormalMapFromAlpha(dst_image, nrm_image);
+ }
}
iter->second = bump; // derefs (and deletes) old image
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 20c9071052..85ef12b32b 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -213,6 +213,10 @@ static LLFastTimer::DeclareTimer FTM_RENDER("Render", true);
static LLFastTimer::DeclareTimer FTM_UPDATE_SKY("Update Sky");
static LLFastTimer::DeclareTimer FTM_UPDATE_TEXTURES("Update Textures");
static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE("Update Images");
+static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_CLASS("Class");
+static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_BUMP("Bump");
+static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_LIST("List");
+static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_DELETE("Delete");
// Paint the display!
void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
@@ -743,18 +747,31 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLMemType mt_iu(LLMemType::MTYPE_DISPLAY_IMAGE_UPDATE);
LLFastTimer t(FTM_IMAGE_UPDATE);
- LLViewerTexture::updateClass(LLViewerCamera::getInstance()->getVelocityStat()->getMean(),
- LLViewerCamera::getInstance()->getAngularVelocityStat()->getMean());
+ {
+ LLFastTimer t(FTM_IMAGE_UPDATE_CLASS);
+ LLViewerTexture::updateClass(LLViewerCamera::getInstance()->getVelocityStat()->getMean(),
+ LLViewerCamera::getInstance()->getAngularVelocityStat()->getMean());
+ }
- gBumpImageList.updateImages(); // must be called before gTextureList version so that it's textures are thrown out first.
+
+ {
+ LLFastTimer t(FTM_IMAGE_UPDATE_BUMP);
+ gBumpImageList.updateImages(); // must be called before gTextureList version so that it's textures are thrown out first.
+ }
- F32 max_image_decode_time = 0.050f*gFrameIntervalSeconds; // 50 ms/second decode time
- max_image_decode_time = llclamp(max_image_decode_time, 0.002f, 0.005f ); // min 2ms/frame, max 5ms/frame)
- gTextureList.updateImages(max_image_decode_time);
+ {
+ LLFastTimer t(FTM_IMAGE_UPDATE_LIST);
+ F32 max_image_decode_time = 0.050f*gFrameIntervalSeconds; // 50 ms/second decode time
+ max_image_decode_time = llclamp(max_image_decode_time, 0.002f, 0.005f ); // min 2ms/frame, max 5ms/frame)
+ gTextureList.updateImages(max_image_decode_time);
+ }
- //remove dead textures from GL
- LLImageGL::deleteDeadTextures();
- stop_glerror();
+ {
+ LLFastTimer t(FTM_IMAGE_UPDATE_DELETE);
+ //remove dead textures from GL
+ LLImageGL::deleteDeadTextures();
+ stop_glerror();
+ }
}
LLGLState::checkStates();
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 764c247f01..ac489e0caf 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -188,6 +188,7 @@ LLGLSLShader gDeferredPostNoDoFProgram;
LLGLSLShader gDeferredWLSkyProgram;
LLGLSLShader gDeferredWLCloudProgram;
LLGLSLShader gDeferredStarProgram;
+LLGLSLShader gNormalMapGenProgram;
LLViewerShaderMgr::LLViewerShaderMgr() :
mVertexShaderLevel(SHADER_COUNT, 0),
@@ -275,6 +276,7 @@ LLViewerShaderMgr::LLViewerShaderMgr() :
mShaderList.push_back(&gDeferredWLSkyProgram);
mShaderList.push_back(&gDeferredWLCloudProgram);
mShaderList.push_back(&gDeferredStarProgram);
+ mShaderList.push_back(&gNormalMapGenProgram);
}
LLViewerShaderMgr::~LLViewerShaderMgr()
@@ -1082,6 +1084,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredWLSkyProgram.unload();
gDeferredWLCloudProgram.unload();
gDeferredStarProgram.unload();
+ gNormalMapGenProgram.unload();
return TRUE;
}
@@ -1532,6 +1535,17 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
success = gDeferredStarProgram.createShader(NULL, &mWLUniforms);
}
+ if (success)
+ {
+ gNormalMapGenProgram.mName = "Normal Map Generation Program";
+ gNormalMapGenProgram.mShaderFiles.clear();
+ gNormalMapGenProgram.mShaderFiles.push_back(make_pair("deferred/normgenV.glsl", GL_VERTEX_SHADER_ARB));
+ gNormalMapGenProgram.mShaderFiles.push_back(make_pair("deferred/normgenF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gNormalMapGenProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
+ gNormalMapGenProgram.mShaderGroup = LLGLSLShader::SG_SKY;
+ success = gNormalMapGenProgram.createShader(NULL, NULL);
+ }
+
return success;
}
diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h
index 74708c94a7..5bcdf11be5 100644
--- a/indra/newview/llviewershadermgr.h
+++ b/indra/newview/llviewershadermgr.h
@@ -384,6 +384,6 @@ extern LLGLSLShader gDeferredAvatarAlphaProgram;
extern LLGLSLShader gDeferredWLSkyProgram;
extern LLGLSLShader gDeferredWLCloudProgram;
extern LLGLSLShader gDeferredStarProgram;
-
+extern LLGLSLShader gNormalMapGenProgram;
#endif
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 30ef8b8a29..487cdafd8f 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -586,6 +586,11 @@ void LLViewerTextureList::dirtyImage(LLViewerFetchedTexture *image)
////////////////////////////////////////////////////////////////////////////
static LLFastTimer::DeclareTimer FTM_IMAGE_MARK_DIRTY("Dirty Images");
+static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE_PRIORITIES("Prioritize");
+static LLFastTimer::DeclareTimer FTM_IMAGE_CALLBACKS("Callbacks");
+static LLFastTimer::DeclareTimer FTM_IMAGE_FETCH("Fetch");
+static LLFastTimer::DeclareTimer FTM_IMAGE_CREATE("Create");
+static LLFastTimer::DeclareTimer FTM_IMAGE_STATS("Stats");
void LLViewerTextureList::updateImages(F32 max_time)
{
@@ -597,14 +602,25 @@ void LLViewerTextureList::updateImages(F32 max_time)
LLViewerStats::getInstance()->mGLBoundMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageGL::sBoundTextureMemoryInBytes));
LLViewerStats::getInstance()->mRawMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageRaw::sGlobalRawMemory));
LLViewerStats::getInstance()->mFormattedMemStat.addValue((F32)BYTES_TO_MEGA_BYTES(LLImageFormatted::sGlobalFormattedMemory));
-
- updateImagesDecodePriorities();
+
+
+ {
+ LLFastTimer t(FTM_IMAGE_UPDATE_PRIORITIES);
+ updateImagesDecodePriorities();
+ }
F32 total_max_time = max_time;
- max_time -= updateImagesFetchTextures(max_time);
+
+ {
+ LLFastTimer t(FTM_IMAGE_FETCH);
+ max_time -= updateImagesFetchTextures(max_time);
+ }
- max_time = llmax(max_time, total_max_time*.50f); // at least 50% of max_time
- max_time -= updateImagesCreateTextures(max_time);
+ {
+ LLFastTimer t(FTM_IMAGE_CREATE);
+ max_time = llmax(max_time, total_max_time*.50f); // at least 50% of max_time
+ max_time -= updateImagesCreateTextures(max_time);
+ }
if (!mDirtyTextureList.empty())
{
@@ -612,24 +628,32 @@ void LLViewerTextureList::updateImages(F32 max_time)
gPipeline.dirtyPoolObjectTextures(mDirtyTextureList);
mDirtyTextureList.clear();
}
- bool didone = false;
- for (image_list_t::iterator iter = mCallbackList.begin();
- iter != mCallbackList.end(); )
+
{
- //trigger loaded callbacks on local textures immediately
- LLViewerFetchedTexture* image = *iter++;
- if (!image->getUrl().empty())
+ LLFastTimer t(FTM_IMAGE_CALLBACKS);
+ bool didone = false;
+ for (image_list_t::iterator iter = mCallbackList.begin();
+ iter != mCallbackList.end(); )
{
- // Do stuff to handle callbacks, update priorities, etc.
- didone = image->doLoadedCallbacks();
- }
- else if (!didone)
- {
- // Do stuff to handle callbacks, update priorities, etc.
- didone = image->doLoadedCallbacks();
+ //trigger loaded callbacks on local textures immediately
+ LLViewerFetchedTexture* image = *iter++;
+ if (!image->getUrl().empty())
+ {
+ // Do stuff to handle callbacks, update priorities, etc.
+ didone = image->doLoadedCallbacks();
+ }
+ else if (!didone)
+ {
+ // Do stuff to handle callbacks, update priorities, etc.
+ didone = image->doLoadedCallbacks();
+ }
}
}
- updateImagesUpdateStats();
+
+ {
+ LLFastTimer t(FTM_IMAGE_STATS);
+ updateImagesUpdateStats();
+ }
}
void LLViewerTextureList::updateImagesDecodePriorities()
@@ -747,7 +771,6 @@ void LLViewerTextureList::updateImagesDecodePriorities()
return type_from_host;
}
*/
-static LLFastTimer::DeclareTimer FTM_IMAGE_CREATE("Create Images");
F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time)
{
@@ -757,8 +780,7 @@ F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time)
// Create GL textures for all textures that need them (images which have been
// decoded, but haven't been pushed into GL).
//
- LLFastTimer t(FTM_IMAGE_CREATE);
-
+
LLTimer create_timer;
image_list_t::iterator enditer = mCreateTextureList.begin();
for (image_list_t::iterator iter = mCreateTextureList.begin();
--
cgit v1.2.3
From 2b51a7a60942b1efc99cee43489ef2f92fa7a188 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Wed, 5 Oct 2011 17:57:13 -0500
Subject: SH-2454 Fix for head attachments not casting shadows when in
mouselook mode.
---
indra/newview/llspatialpartition.cpp | 4 ++++
indra/newview/pipeline.cpp | 22 ++++++++++++++++++++++
2 files changed, 26 insertions(+)
(limited to 'indra/newview')
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 8e22a9be2c..65a78d9048 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -1613,6 +1613,8 @@ void LLSpatialGroup::checkOcclusion()
static LLFastTimer::DeclareTimer FTM_PUSH_OCCLUSION_VERTS("Push Occlusion");
static LLFastTimer::DeclareTimer FTM_SET_OCCLUSION_STATE("Occlusion State");
static LLFastTimer::DeclareTimer FTM_OCCLUSION_EARLY_FAIL("Occlusion Early Fail");
+static LLFastTimer::DeclareTimer FTM_OCCLUSION_ALLOCATE("Allocate");
+static LLFastTimer::DeclareTimer FTM_OCCLUSION_BUILD("Build");
void LLSpatialGroup::doOcclusion(LLCamera* camera)
{
@@ -1636,11 +1638,13 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera)
if (!mOcclusionQuery[LLViewerCamera::sCurCameraID])
{
+ LLFastTimer t(FTM_OCCLUSION_ALLOCATE);
mOcclusionQuery[LLViewerCamera::sCurCameraID] = sQueryPool.allocate();
}
if (mOcclusionVerts.isNull() || isState(LLSpatialGroup::OCCLUSION_DIRTY))
{
+ LLFastTimer t(FTM_OCCLUSION_BUILD);
buildOcclusion();
}
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index e672f7c4f1..83f9863224 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -8300,6 +8300,17 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
return;
}
+ BOOL skip_avatar_update = FALSE;
+ if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK)
+ {
+ skip_avatar_update = TRUE;
+ }
+
+ if (!skip_avatar_update)
+ {
+ gAgentAvatarp->updateAttachmentVisibility(CAMERA_MODE_THIRD_PERSON);
+ }
+
F64 last_modelview[16];
F64 last_projection[16];
for (U32 i = 0; i < 16; i++)
@@ -8413,6 +8424,12 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
mShadowFrustPoints[3].clear();
}
popRenderTypeMask();
+
+ if (!skip_avatar_update)
+ {
+ gAgentAvatarp->updateAttachmentVisibility(gAgentCamera.getCameraMode());
+ }
+
return;
}
@@ -9001,6 +9018,11 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
}
popRenderTypeMask();
+
+ if (!skip_avatar_update)
+ {
+ gAgentAvatarp->updateAttachmentVisibility(gAgentCamera.getCameraMode());
+ }
}
void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL texture)
--
cgit v1.2.3
From d66a999d1de3fbc77eb31aeb07ddc1e20d19647a Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Thu, 6 Oct 2011 13:10:01 -0400
Subject: SH-2515 WIP - uninstall viewer 2 when installing viewer 3+
---
.../installers/windows/installer_template.nsi | 42 +++++++++++++++++-----
1 file changed, 33 insertions(+), 9 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index abd2e7f7c5..1b07961e1c 100755
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -408,9 +408,9 @@ Push $2
; Required since ProfileImagePath is of type REG_EXPAND_SZ
ExpandEnvStrings $2 $2
- RMDir /r "$2\Application Data\SecondLifeRestore\"
- CreateDirectory "$2\Application Data\SecondLifeRestore\"
- CopyFiles "$TEMP\SecondLifeSettingsBackup\$0\*" "$2\Application Data\SecondLifeRestore\"
+ RMDir /r "$2\Application Data\SecondLife\"
+ CreateDirectory "$2\Application Data\SecondLife\"
+ CopyFiles "$TEMP\SecondLifeSettingsBackup\$0\*" "$2\Application Data\SecondLife\"
CONTINUE:
IntOp $0 $0 + 1
@@ -425,9 +425,9 @@ Pop $0
Push $0
ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
StrCmp $0 "" +2
- RMDir /r "$2\Application Data\SecondLifeRestore\"
- CreateDirectory "$2\Application Data\SecondLifeRestore\"
- CopyFiles "$TEMP\SecondLifeSettingsBackup\AllUsers\*" "$2\Application Data\SecondLifeRestore\"
+ RMDir /r "$2\Application Data\SecondLife\"
+ CreateDirectory "$2\Application Data\SecondLife\"
+ CopyFiles "$TEMP\SecondLifeSettingsBackup\AllUsers\*" "$2\Application Data\SecondLife\"
Pop $0
FunctionEnd
@@ -863,10 +863,8 @@ Call CheckNetworkConnection ; ping secondlife.com
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Don't remove cache files during a regular install, removing the inventory cache on upgrades results in lots of damage to the servers.
;Call RemoveCacheFiles ; Installing over removes potentially corrupted
-
-Call PreserveCacheFiles
-Call RestoreCacheFiles
; VFS and cache files.
+Call PreserveCacheFiles
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Need to clean out shader files from previous installs to fix DEV-5663
@@ -948,6 +946,32 @@ WriteRegExpandStr HKEY_CLASSES_ROOT "x-grid-location-info\shell\open\command" ""
; write out uninstaller
WriteUninstaller "$INSTDIR\uninst.exe"
+; Remove existing "Second Life Viewer 2" install if any.
+StrCmp $INSTDIR "$PROGRAMFILES\SecondLifeViewer2" SLV2_DONE
+IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" SLV2_FOUND SLV2_DONE
+
+SLV2_FOUND:
+ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" /S'
+
+; cheesy spin wait for uninstall to finish - uninstaller is supposed
+; to take _? argument which combined with ExecWait would avoid need
+; for this, but have not been able to get it to work.
+SPIN_LOOP:
+Sleep 500
+IntOp $0 $0 + 500
+IntCmp $0 10000 SLV2_TIMEOUT CONT SLV2_TIMEOUT
+SLV2_TIMEOUT:
+MsgBox MB_OK "Error in uninstall"
+Goto SLV2_DONE
+
+CONT:
+; Do we know this is the last file removed?
+IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" SPIN_LOOP SLV2_DONE
+
+SLV2_DONE:
+MessageBox MB_OK "Restoring Cache Files"
+Call RestoreCacheFiles
+
; end of default section
SectionEnd
--
cgit v1.2.3
From e76eaa8b2a1f49e45d009379aaf36f8e62b6273a Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 6 Oct 2011 13:48:10 -0500
Subject: Fix for busted settings.xml (thanks TankMaster Finesmith)
---
indra/newview/app_settings/settings.xml | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 110e3e3d04..e7ff584b38 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -9075,9 +9075,7 @@
1
Type
Boolean
- Va
-
- lue
+ Value
1
RenderPreferStreamDraw
--
cgit v1.2.3
From 40fe25632c62ab6a8bbb817149c159295b365d59 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 6 Oct 2011 15:00:14 -0500
Subject: SH-2553 Fix for glitches when rendering HUD attachments.
---
indra/newview/llviewerdisplay.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 835f16d086..7220f2a20f 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -1359,7 +1359,12 @@ void render_ui_3d()
}
stop_glerror();
-
+
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.bind();
+ }
+
gViewerWindow->renderSelections(FALSE, FALSE, TRUE); // Non HUD call in render_hud_elements
stop_glerror();
}
--
cgit v1.2.3
From a90ea46804d1fdb60d44178140b12e341c715178 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 6 Oct 2011 15:34:28 -0500
Subject: SH-2240 Fix for beacons not rendering (or crashing when rendered)
---
indra/newview/llglsandbox.cpp | 5 +++++
1 file changed, 5 insertions(+)
(limited to 'indra/newview')
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index 8c872283bd..844d7ba41c 100644
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -777,6 +777,11 @@ void LLViewerObjectList::renderObjectBeacons()
LLGLSUIDefault gls_ui;
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.bind();
+ }
+
{
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
--
cgit v1.2.3
From fba8afd7b27ebc362af7b26b1f1fb2917deae920 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 6 Oct 2011 16:43:19 -0500
Subject: SH-2454 Fix for attachments casting shadows/showing up in water when
"show me in mouselook" is disabled
---
indra/newview/pipeline.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 83f9863224..d28bb1f64e 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -7612,11 +7612,11 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
if (LLPipeline::sWaterReflections && assertInitialized() && LLDrawPoolWater::sNeedsReflectionUpdate)
{
BOOL skip_avatar_update = FALSE;
- if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK)
+ if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson)
{
skip_avatar_update = TRUE;
}
-
+
if (!skip_avatar_update)
{
gAgentAvatarp->updateAttachmentVisibility(CAMERA_MODE_THIRD_PERSON);
@@ -8301,7 +8301,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
}
BOOL skip_avatar_update = FALSE;
- if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK)
+ if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson)
{
skip_avatar_update = TRUE;
}
--
cgit v1.2.3
From f2fc69c65650bf5db4f0ea098be7bd5fe37f224d Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 6 Oct 2011 17:31:59 -0500
Subject: SH-2240 Fix for crash when rendering beacons and Debug GL enabled --
flush every 128 beacons to keep from hitting the end of the immediate mode
wrapper buffer.
---
indra/newview/llglsandbox.cpp | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
(limited to 'indra/newview')
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index 844d7ba41c..3f773effcb 100644
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -789,6 +789,8 @@ void LLViewerObjectList::renderObjectBeacons()
// gGL.begin(LLRender::LINES); // Always happens in (line_width != last_line_width)
BOOL flush = FALSE;
+ S32 flush_me = 128;
+
for (std::vector::iterator iter = mDebugBeacons.begin(); iter != mDebugBeacons.end(); ++iter)
{
const LLDebugBeacon &debug_beacon = *iter;
@@ -818,6 +820,14 @@ void LLViewerObjectList::renderObjectBeacons()
gGL.vertex3f(thisline.mV[VX],thisline.mV[VY] + 2.f,thisline.mV[VZ]);
draw_line_cube(0.10f, thisline);
+
+ if (--flush_me <= 0)
+ {
+ flush_me = 128;
+ gGL.end();
+ gGL.flush();
+ gGL.begin(LLRender::LINES);
+ }
}
gGL.end();
}
@@ -830,6 +840,8 @@ void LLViewerObjectList::renderObjectBeacons()
// gGL.begin(LLRender::LINES); // Always happens in (line_width != last_line_width)
BOOL flush = FALSE;
+ S32 flush_me = 128;
+
for (std::vector::iterator iter = mDebugBeacons.begin(); iter != mDebugBeacons.end(); ++iter)
{
const LLDebugBeacon &debug_beacon = *iter;
@@ -858,6 +870,14 @@ void LLViewerObjectList::renderObjectBeacons()
gGL.vertex3f(thisline.mV[VX],thisline.mV[VY] + 0.5f,thisline.mV[VZ]);
draw_line_cube(0.10f, thisline);
+
+ if (--flush_me <= 0)
+ {
+ flush_me = 128;
+ gGL.end();
+ gGL.flush();
+ gGL.begin(LLRender::LINES);
+ }
}
gGL.end();
--
cgit v1.2.3
From 0fcef13ab8ee947c1cb472407cbfe891a55043ad Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Thu, 6 Oct 2011 18:50:31 -0400
Subject: SH-2515 WIP
---
indra/newview/installers/windows/installer_template.nsi | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index 1b07961e1c..fcc187dc6f 100755
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -505,6 +505,7 @@ Push $2
; If uninstalling a normal install remove everything
; Otherwise (preview/dmz etc) just remove cache
+ MessageBox MB_OK 'RM_ALL points at "$2\Application Data\SecondLife"'
StrCmp $INSTFLAGS "" RM_ALL RM_CACHE
RM_ALL:
RMDir /r "$2\Application Data\SecondLife"
@@ -957,16 +958,16 @@ ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" /S'
; to take _? argument which combined with ExecWait would avoid need
; for this, but have not been able to get it to work.
SPIN_LOOP:
-Sleep 500
-IntOp $0 $0 + 500
-IntCmp $0 10000 SLV2_TIMEOUT CONT SLV2_TIMEOUT
+ Sleep 500
+ IntOp $0 $0 + 500
+ IntCmp $0 10000 SLV2_TIMEOUT CONT SLV2_TIMEOUT
SLV2_TIMEOUT:
-MsgBox MB_OK "Error in uninstall"
-Goto SLV2_DONE
+;; MessageBox /SD IDOK MB_OK "Error in uninstall of Second Life Viewer 2"
+ Goto SLV2_DONE
CONT:
-; Do we know this is the last file removed?
-IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" SPIN_LOOP SLV2_DONE
+ ; Do we know this is the last file removed?
+ IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" SPIN_LOOP SLV2_DONE
SLV2_DONE:
MessageBox MB_OK "Restoring Cache Files"
--
cgit v1.2.3
From c834bdd05a134d6b3442a31f351a94f21965d4e9 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 6 Oct 2011 17:54:06 -0500
Subject: SH-2240 Better fix for beacon rendering -- let LLRender take care of
optimization around joining chunks of line segments together into one draw
call
---
indra/newview/llglsandbox.cpp | 41 ++++++-----------------------------------
1 file changed, 6 insertions(+), 35 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index 3f773effcb..ac87da2d71 100644
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -788,9 +788,6 @@ void LLViewerObjectList::renderObjectBeacons()
S32 last_line_width = -1;
// gGL.begin(LLRender::LINES); // Always happens in (line_width != last_line_width)
- BOOL flush = FALSE;
- S32 flush_me = 128;
-
for (std::vector::iterator iter = mDebugBeacons.begin(); iter != mDebugBeacons.end(); ++iter)
{
const LLDebugBeacon &debug_beacon = *iter;
@@ -799,18 +796,14 @@ void LLViewerObjectList::renderObjectBeacons()
S32 line_width = debug_beacon.mLineWidth;
if (line_width != last_line_width)
{
- if (flush)
- {
- gGL.end();
- }
- flush = TRUE;
gGL.flush();
glLineWidth( (F32)line_width );
last_line_width = line_width;
- gGL.begin(LLRender::LINES);
}
const LLVector3 &thisline = debug_beacon.mPositionAgent;
+
+ gGL.begin(LLRender::LINES);
gGL.color4fv(color.mV);
gGL.vertex3f(thisline.mV[VX],thisline.mV[VY],thisline.mV[VZ] - 50.f);
gGL.vertex3f(thisline.mV[VX],thisline.mV[VY],thisline.mV[VZ] + 50.f);
@@ -820,16 +813,9 @@ void LLViewerObjectList::renderObjectBeacons()
gGL.vertex3f(thisline.mV[VX],thisline.mV[VY] + 2.f,thisline.mV[VZ]);
draw_line_cube(0.10f, thisline);
-
- if (--flush_me <= 0)
- {
- flush_me = 128;
- gGL.end();
- gGL.flush();
- gGL.begin(LLRender::LINES);
- }
+
+ gGL.end();
}
- gGL.end();
}
{
@@ -839,9 +825,6 @@ void LLViewerObjectList::renderObjectBeacons()
S32 last_line_width = -1;
// gGL.begin(LLRender::LINES); // Always happens in (line_width != last_line_width)
- BOOL flush = FALSE;
- S32 flush_me = 128;
-
for (std::vector::iterator iter = mDebugBeacons.begin(); iter != mDebugBeacons.end(); ++iter)
{
const LLDebugBeacon &debug_beacon = *iter;
@@ -849,18 +832,13 @@ void LLViewerObjectList::renderObjectBeacons()
S32 line_width = debug_beacon.mLineWidth;
if (line_width != last_line_width)
{
- if (flush)
- {
- gGL.end();
- }
- flush = TRUE;
gGL.flush();
glLineWidth( (F32)line_width );
last_line_width = line_width;
- gGL.begin(LLRender::LINES);
}
const LLVector3 &thisline = debug_beacon.mPositionAgent;
+ gGL.begin(LLRender::LINES);
gGL.color4fv(debug_beacon.mColor.mV);
gGL.vertex3f(thisline.mV[VX],thisline.mV[VY],thisline.mV[VZ] - 0.5f);
gGL.vertex3f(thisline.mV[VX],thisline.mV[VY],thisline.mV[VZ] + 0.5f);
@@ -871,16 +849,9 @@ void LLViewerObjectList::renderObjectBeacons()
draw_line_cube(0.10f, thisline);
- if (--flush_me <= 0)
- {
- flush_me = 128;
- gGL.end();
- gGL.flush();
- gGL.begin(LLRender::LINES);
- }
+ gGL.end();
}
- gGL.end();
gGL.flush();
glLineWidth(1.f);
--
cgit v1.2.3
From 63fdeb14ef74bed9c96092296015e69b6557f3ea Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Thu, 6 Oct 2011 23:00:33 -0400
Subject: SH-2515 WIP, STORM-280 WIP - ported over Oz fix for cache
overdeletion during uninstall
---
.../installers/windows/installer_template.nsi | 134 +++++++++++++++++++--
1 file changed, 121 insertions(+), 13 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index fcc187dc6f..03280328f3 100755
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -1,6 +1,22 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; secondlife setup.nsi
-;; Copyright 2004-2010, Linden Research, Inc.
+;; Copyright 2004-2011, Linden Research, Inc.
+;;
+;; This library is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU Lesser General Public
+;; License as published by the Free Software Foundation;
+;; version 2.1 of the License only.
+;;
+;; This library is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; Lesser General Public License for more details.
+;;
+;; You should have received a copy of the GNU Lesser General Public
+;; License along with this library; if not, write to the Free Software
+;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+;;
+;; Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
;;
;; NSIS Unicode 2.38.1 or higher required
;; http://www.scratchpaper.com/
@@ -293,6 +309,97 @@ Function CheckNetworkConnection
Return
FunctionEnd
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; Save files from cache
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+Function PreserveCacheFiles
+
+Push $0
+Push $1
+Push $2
+
+ RMDir /r "$TEMP\SecondLifeSettingsBackup"
+ CreateDirectory "$TEMP\SecondLifeSettingsBackup"
+ StrCpy $0 0 ; Index number used to iterate via EnumRegKey
+
+ LOOP:
+ EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
+ StrCmp $1 "" DONE ; no more users
+
+ ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
+ StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing
+
+ ; Required since ProfileImagePath is of type REG_EXPAND_SZ
+ ExpandEnvStrings $2 $2
+
+ CreateDirectory "$TEMP\SecondLifeSettingsBackup\$0"
+ CopyFiles "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\$0"
+
+ CONTINUE:
+ IntOp $0 $0 + 1
+ Goto LOOP
+ DONE:
+
+Pop $2
+Pop $1
+Pop $0
+
+; Copy files in Documents and Settings\All Users\SecondLife
+Push $0
+ ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
+ StrCmp $0 "" +2
+ CreateDirectory "$TEMP\SecondLifeSettingsBackup\AllUsers\"
+ CopyFiles "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\AllUsers\"
+Pop $0
+
+FunctionEnd
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; Restore files from cache
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+Function RestoreCacheFiles
+
+Push $0
+Push $1
+Push $2
+
+ StrCpy $0 0 ; Index number used to iterate via EnumRegKey
+
+ LOOP:
+ EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
+ StrCmp $1 "" DONE ; no more users
+
+ ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
+ StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing
+
+ ; Required since ProfileImagePath is of type REG_EXPAND_SZ
+ ExpandEnvStrings $2 $2
+
+ RMDir /r "$2\Application Data\SecondLifeRestore\"
+ CreateDirectory "$2\Application Data\SecondLifeRestore\"
+ CopyFiles "$TEMP\SecondLifeSettingsBackup\$0\*" "$2\Application Data\SecondLifeRestore\"
+
+ CONTINUE:
+ IntOp $0 $0 + 1
+ Goto LOOP
+ DONE:
+
+Pop $2
+Pop $1
+Pop $0
+
+; Copy files in Documents and Settings\All Users\SecondLife
+Push $0
+ ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
+ StrCmp $0 "" +2
+ RMDir /r "$2\Application Data\SecondLifeRestore\"
+ CreateDirectory "$2\Application Data\SecondLifeRestore\"
+ CopyFiles "$TEMP\SecondLifeSettingsBackup\AllUsers\*" "$2\Application Data\SecondLifeRestore\"
+Pop $0
+
+FunctionEnd
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Delete files in Documents and Settings\\SecondLife\cache
; Delete files in Documents and Settings\All Users\SecondLife\cache
@@ -503,18 +610,15 @@ Push $2
; Required since ProfileImagePath is of type REG_EXPAND_SZ
ExpandEnvStrings $2 $2
- ; If uninstalling a normal install remove everything
- ; Otherwise (preview/dmz etc) just remove cache
- MessageBox MB_OK 'RM_ALL points at "$2\Application Data\SecondLife"'
- StrCmp $INSTFLAGS "" RM_ALL RM_CACHE
- RM_ALL:
- RMDir /r "$2\Application Data\SecondLife"
- RM_CACHE:
- # Local Settings directory is the cache, there is no "cache" subdir
- RMDir /r "$2\Local Settings\Application Data\SecondLife"
- # Vista version of the same
- RMDir /r "$2\AppData\Local\SecondLife"
- Delete "$2\Application Data\SecondLife\user_settings\settings_windlight.xml"
+ ; Remove all cache and settings files but leave any other .txt files to preserve the chat logs
+ RMDir /r "$2\Application Data\SecondLife\logs"
+ RMDir /r "$2\Application Data\SecondLife\browser_profile"
+ RMDir /r "$2\Application Data\SecondLife\user_settings"
+ Delete "$2\Application Data\SecondLife\*.xml"
+ Delete "$2\Application Data\SecondLife\*.bmp"
+ Delete "$2\Application Data\SecondLife\search_history.txt"
+ Delete "$2\Application Data\SecondLife\plugin_cookies.txt"
+ Delete "$2\Application Data\SecondLife\typed_locations.txt"
CONTINUE:
IntOp $0 $0 + 1
@@ -862,6 +966,10 @@ Call CloseSecondLife ; Make sure we're not running
Call CheckNetworkConnection ; ping secondlife.com
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+Call PreserveCacheFiles
+
+Call RestoreCacheFiles
+
;;; Don't remove cache files during a regular install, removing the inventory cache on upgrades results in lots of damage to the servers.
;Call RemoveCacheFiles ; Installing over removes potentially corrupted
; VFS and cache files.
--
cgit v1.2.3
From 79912f9d3f0807529183521f69f989f947c1cff1 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Fri, 7 Oct 2011 03:12:11 -0500
Subject: SH-2031 Profile guided optimization of matrix ops - don't use F64
except where needed (should really factor out calls to gluProject) - get rid
of sorting by texture in favor of sorting by matrix (no sort needed, geometry
is already matrix sorted as a result of frustum cull tree traversal order) -
unroll matrix sync inner loop and cache MVP and normal matrices
---
indra/newview/llhudrender.cpp | 12 ++++++++-
indra/newview/llselectmgr.cpp | 2 +-
indra/newview/llviewercamera.cpp | 58 +++++++++++++++++++++++++++++-----------
indra/newview/pipeline.cpp | 28 +++++--------------
indra/newview/pipeline.h | 2 +-
5 files changed, 61 insertions(+), 41 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp
index 607f7f7f4b..122711a86d 100644
--- a/indra/newview/llhudrender.cpp
+++ b/indra/newview/llhudrender.cpp
@@ -107,8 +107,18 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent,
viewport[1] = world_view_rect.mBottom;
viewport[2] = world_view_rect.getWidth();
viewport[3] = world_view_rect.getHeight();
+
+ F64 mdlv[16];
+ F64 proj[16];
+
+ for (U32 i = 0; i < 16; i++)
+ {
+ mdlv[i] = (F64) gGLModelView[i];
+ proj[i] = (F64) gGLProjection[i];
+ }
+
gluProject(render_pos.mV[0], render_pos.mV[1], render_pos.mV[2],
- gGLModelView, gGLProjection, (GLint*) viewport,
+ mdlv, proj, (GLint*) viewport,
&winX, &winY, &winZ);
//fonts all render orthographically, set up projection``
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 3a50eeb1c9..2971ee710a 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -4838,7 +4838,7 @@ void LLSelectMgr::processForceObjectSelect(LLMessageSystem* msg, void**)
LLSelectMgr::getInstance()->highlightObjectAndFamily(objects);
}
-extern LLGLdouble gGLModelView[16];
+extern F32 gGLModelView[16];
void LLSelectMgr::updateSilhouettes()
{
diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp
index c0ef4da1ff..a437a8b3b5 100644
--- a/indra/newview/llviewercamera.cpp
+++ b/indra/newview/llviewercamera.cpp
@@ -218,8 +218,15 @@ void LLViewerCamera::calcProjection(const F32 far_distance) const
void LLViewerCamera::updateFrustumPlanes(LLCamera& camera, BOOL ortho, BOOL zflip, BOOL no_hacks)
{
GLint* viewport = (GLint*) gGLViewport;
- GLdouble* model = gGLModelView;
- GLdouble* proj = gGLProjection;
+ F64 model[16];
+ F64 proj[16];
+
+ for (U32 i = 0; i < 16; i++)
+ {
+ model[i] = (F64) gGLModelView[i];
+ proj[i] = (F64) gGLProjection[i];
+ }
+
GLdouble objX,objY,objZ;
LLVector3 frust[8];
@@ -420,7 +427,6 @@ void LLViewerCamera::setPerspective(BOOL for_selection,
if (!for_selection && mZoomFactor == 1.f)
{
// Save GL matrices for access elsewhere in code, especially project_world_to_screen
- //glGetDoublev(GL_MODELVIEW_MATRIX, gGLModelView);
for (U32 i = 0; i < 16; i++)
{
gGLModelView[i] = modelview.m[i];
@@ -428,14 +434,6 @@ void LLViewerCamera::setPerspective(BOOL for_selection,
}
updateFrustumPlanes(*this);
-
- /*if (gSavedSettings.getBOOL("CameraOffset"))
- {
- gGL.matrixMode(LLRender::MM_PROJECTION);
- gGL.translatef(0,0,-50);
- gGL.rotatef(20.0,1,0,0);
- gGL.matrixMode(LLRender::MM_MODELVIEW);
- }*/
}
@@ -443,11 +441,20 @@ void LLViewerCamera::setPerspective(BOOL for_selection,
// screen coordinates to the agent's region.
void LLViewerCamera::projectScreenToPosAgent(const S32 screen_x, const S32 screen_y, LLVector3* pos_agent) const
{
-
GLdouble x, y, z;
+
+ F64 mdlv[16];
+ F64 proj[16];
+
+ for (U32 i = 0; i < 16; i++)
+ {
+ mdlv[i] = (F64) gGLModelView[i];
+ proj[i] = (F64) gGLProjection[i];
+ }
+
gluUnProject(
GLdouble(screen_x), GLdouble(screen_y), 0.0,
- gGLModelView, gGLProjection, (GLint*)gGLViewport,
+ mdlv, proj, (GLint*)gGLViewport,
&x,
&y,
&z );
@@ -484,8 +491,17 @@ BOOL LLViewerCamera::projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoord
viewport[2] = world_view_rect.getWidth();
viewport[3] = world_view_rect.getHeight();
+ F64 mdlv[16];
+ F64 proj[16];
+
+ for (U32 i = 0; i < 16; i++)
+ {
+ mdlv[i] = (F64) gGLModelView[i];
+ proj[i] = (F64) gGLProjection[i];
+ }
+
if (GL_TRUE == gluProject(pos_agent.mV[VX], pos_agent.mV[VY], pos_agent.mV[VZ],
- gGLModelView, gGLProjection, (GLint*)viewport,
+ mdlv, proj, (GLint*)viewport,
&x, &y, &z))
{
// convert screen coordinates to virtual UI coordinates
@@ -587,9 +603,19 @@ BOOL LLViewerCamera::projectPosAgentToScreenEdge(const LLVector3 &pos_agent,
viewport[2] = world_view_rect.getWidth();
viewport[3] = world_view_rect.getHeight();
GLdouble x, y, z; // object's window coords, GL-style
+
+ F64 mdlv[16];
+ F64 proj[16];
+
+ for (U32 i = 0; i < 16; i++)
+ {
+ mdlv[i] = (F64) gGLModelView[i];
+ proj[i] = (F64) gGLProjection[i];
+ }
+
if (GL_TRUE == gluProject(pos_agent.mV[VX], pos_agent.mV[VY],
- pos_agent.mV[VZ], gGLModelView,
- gGLProjection, (GLint*)viewport,
+ pos_agent.mV[VZ], mdlv,
+ proj, (GLint*)viewport,
&x, &y, &z))
{
x /= gViewerWindow->getDisplayScale().mV[VX];
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index d28bb1f64e..42873dbca8 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -201,13 +201,10 @@ U32 nhpo2(U32 v)
return r;
}
-glh::matrix4f glh_copy_matrix(GLdouble* src)
+glh::matrix4f glh_copy_matrix(F32* src)
{
glh::matrix4f ret;
- for (U32 i = 0; i < 16; i++)
- {
- ret.m[i] = (F32) src[i];
- }
+ ret.set_value(src);
return ret;
}
@@ -231,7 +228,7 @@ glh::matrix4f glh_get_last_projection()
return glh_copy_matrix(gGLLastProjection);
}
-void glh_copy_matrix(const glh::matrix4f& src, GLdouble* dst)
+void glh_copy_matrix(const glh::matrix4f& src, F32* dst)
{
for (U32 i = 0; i < 16; i++)
{
@@ -3171,19 +3168,6 @@ void LLPipeline::postSort(LLCamera& camera)
if (!sShadowRender)
{
- //sort by texture or bump map
- for (U32 i = 0; i < LLRenderPass::NUM_RENDER_TYPES; ++i)
- {
- if (i == LLRenderPass::PASS_BUMP)
- {
- std::sort(sCull->beginRenderMap(i), sCull->endRenderMap(i), LLDrawInfo::CompareBump());
- }
- else
- {
- std::sort(sCull->beginRenderMap(i), sCull->endRenderMap(i), LLDrawInfo::CompareTexturePtrMatrix());
- }
- }
-
std::sort(sCull->beginAlphaGroups(), sCull->endAlphaGroups(), LLSpatialGroup::CompareDepthGreater());
}
llpushcallstacks ;
@@ -3503,8 +3487,8 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
assertInitialized();
- F64 saved_modelview[16];
- F64 saved_projection[16];
+ F32 saved_modelview[16];
+ F32 saved_projection[16];
//HACK: preserve/restore matrices around HUD render
if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_HUD))
@@ -6768,7 +6752,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n
{
cube_map->enable(channel);
cube_map->bind();
- F64* m = gGLModelView;
+ F32* m = gGLModelView;
F32 mat[] = { m[0], m[1], m[2],
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index d24bab747b..86579261ca 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -72,7 +72,7 @@ BOOL compute_min_max(LLMatrix4& box, LLVector2& min, LLVector2& max); // Shouldn
bool LLRayAABB(const LLVector3 ¢er, const LLVector3 &size, const LLVector3& origin, const LLVector3& dir, LLVector3 &coord, F32 epsilon = 0);
BOOL setup_hud_matrices(); // use whole screen to render hud
BOOL setup_hud_matrices(const LLRect& screen_region); // specify portion of screen (in pixels) to render hud attachments from (for picking)
-glh::matrix4f glh_copy_matrix(GLdouble* src);
+glh::matrix4f glh_copy_matrix(F32* src);
glh::matrix4f glh_get_current_modelview();
void glh_set_current_modelview(const glh::matrix4f& mat);
glh::matrix4f glh_get_current_projection();
--
cgit v1.2.3
From 9cf4a4322b75a4d8fdc618c8f1edbf945c2f25b3 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Fri, 7 Oct 2011 16:45:21 -0500
Subject: SH-2240 No more assertions when rendering debug displays.
---
indra/newview/llspatialpartition.cpp | 100 ++++++++++++++++++-----------------
indra/newview/llviewerjoint.cpp | 2 +-
2 files changed, 52 insertions(+), 50 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 65a78d9048..ffb0ce4056 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -48,6 +48,7 @@
#include "llvolumemgr.h"
#include "lltextureatlas.h"
#include "llglslshader.h"
+#include "llviewershadermgr.h"
static LLFastTimer::DeclareTimer FTM_FRUSTUM_CULL("Frustum Culling");
static LLFastTimer::DeclareTimer FTM_CULL_REBOUND("Cull Rebound");
@@ -2543,7 +2544,7 @@ void renderOctree(LLSpatialGroup* group)
LLGLDepthTest gl_depth(FALSE, FALSE);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
- gGL.color4f(1,0,0,group->mBuilt);
+ gGL.diffuseColor4f(1,0,0,group->mBuilt);
gGL.flush();
glLineWidth(5.f);
drawBoxOutline(group->mObjectBounds[0], group->mObjectBounds[1]);
@@ -2591,7 +2592,7 @@ void renderOctree(LLSpatialGroup* group)
}
}
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
- gGL.color4f(1,1,1,1);
+ gGL.diffuseColor4f(1,1,1,1);
}
}
else*/
@@ -2607,7 +2608,7 @@ void renderOctree(LLSpatialGroup* group)
}
}
- gGL.color4fv(col.mV);
+ gGL.diffuseColor4fv(col.mV);
LLVector4a fudge;
fudge.splat(0.001f);
LLVector4a size = group->mObjectBounds[1];
@@ -2624,16 +2625,16 @@ void renderOctree(LLSpatialGroup* group)
//if (group->mBuilt <= 0.f)
{
//draw opaque outline
- //gGL.color4f(col.mV[0], col.mV[1], col.mV[2], 1.f);
+ //gGL.diffuseColor4f(col.mV[0], col.mV[1], col.mV[2], 1.f);
//drawBoxOutline(group->mObjectBounds[0], group->mObjectBounds[1]);
- gGL.color4f(0,1,1,1);
+ gGL.diffuseColor4f(0,1,1,1);
drawBoxOutline(group->mBounds[0],group->mBounds[1]);
//draw bounding box for draw info
/*if (group->mSpatialPartition->mRenderByGroup)
{
- gGL.color4f(1.0f, 0.75f, 0.25f, 0.6f);
+ gGL.diffuseColor4f(1.0f, 0.75f, 0.25f, 0.6f);
for (LLSpatialGroup::draw_map_t::iterator i = group->mDrawMap.begin(); i != group->mDrawMap.end(); ++i)
{
for (LLSpatialGroup::drawmap_elem_t::iterator j = i->second.begin(); j != i->second.end(); ++j)
@@ -2652,7 +2653,7 @@ void renderOctree(LLSpatialGroup* group)
}
// LLSpatialGroup::OctreeNode* node = group->mOctreeNode;
-// gGL.color4f(0,1,0,1);
+// gGL.diffuseColor4f(0,1,0,1);
// drawBoxOutline(LLVector3(node->getCenter()), LLVector3(node->getSize()));
}
@@ -2665,11 +2666,12 @@ void renderVisibility(LLSpatialGroup* group, LLCamera* camera)
BOOL render_objects = (!LLPipeline::sUseOcclusion || !group->isOcclusionState(LLSpatialGroup::OCCLUDED)) && group->isVisible() &&
!group->getData().empty();
+
if (render_objects)
{
LLGLDepthTest depth_under(GL_TRUE, GL_FALSE, GL_GREATER);
gGL.diffuseColor4f(0, 0.5f, 0, 0.5f);
- gGL.color4f(0, 0.5f, 0, 0.5f);
+ gGL.diffuseColor4f(0, 0.5f, 0, 0.5f);
pushBufferVerts(group, LLVertexBuffer::MAP_VERTEX);
}
@@ -2679,7 +2681,7 @@ void renderVisibility(LLSpatialGroup* group, LLCamera* camera)
if (render_objects)
{
gGL.diffuseColor4f(0.f, 0.5f, 0.f,1.f);
- gGL.color4f(0.f, 0.5f, 0.f, 1.f);
+ gGL.diffuseColor4f(0.f, 0.5f, 0.f, 1.f);
pushBufferVerts(group, LLVertexBuffer::MAP_VERTEX);
}
@@ -2688,7 +2690,7 @@ void renderVisibility(LLSpatialGroup* group, LLCamera* camera)
if (render_objects)
{
gGL.diffuseColor4f(0.f, 0.75f, 0.f,0.5f);
- gGL.color4f(0.f, 0.75f, 0.f, 0.5f);
+ gGL.diffuseColor4f(0.f, 0.75f, 0.f, 0.5f);
pushBufferVerts(group, LLVertexBuffer::MAP_VERTEX);
}
/*else if (camera && group->mOcclusionVerts.notNull())
@@ -2709,7 +2711,7 @@ void renderVisibility(LLSpatialGroup* group, LLCamera* camera)
void renderCrossHairs(LLVector3 position, F32 size, LLColor4 color)
{
- gGL.color4fv(color.mV);
+ gGL.diffuseColor4fv(color.mV);
gGL.begin(LLRender::LINES);
{
gGL.vertex3fv((position - LLVector3(size, 0.f, 0.f)).mV);
@@ -2881,17 +2883,17 @@ void renderBoundingBox(LLDrawable* drawable, BOOL set_color = TRUE)
{
if (drawable->isSpatialBridge())
{
- gGL.color4f(1,0.5f,0,1);
+ gGL.diffuseColor4f(1,0.5f,0,1);
}
else if (drawable->getVOVolume())
{
if (drawable->isRoot())
{
- gGL.color4f(1,1,0,1);
+ gGL.diffuseColor4f(1,1,0,1);
}
else
{
- gGL.color4f(0,1,0,1);
+ gGL.diffuseColor4f(0,1,0,1);
}
}
else if (drawable->getVObj())
@@ -2899,30 +2901,30 @@ void renderBoundingBox(LLDrawable* drawable, BOOL set_color = TRUE)
switch (drawable->getVObj()->getPCode())
{
case LLViewerObject::LL_VO_SURFACE_PATCH:
- gGL.color4f(0,1,1,1);
+ gGL.diffuseColor4f(0,1,1,1);
break;
case LLViewerObject::LL_VO_CLOUDS:
// no longer used
break;
case LLViewerObject::LL_VO_PART_GROUP:
case LLViewerObject::LL_VO_HUD_PART_GROUP:
- gGL.color4f(0,0,1,1);
+ gGL.diffuseColor4f(0,0,1,1);
break;
case LLViewerObject::LL_VO_VOID_WATER:
case LLViewerObject::LL_VO_WATER:
- gGL.color4f(0,0.5f,1,1);
+ gGL.diffuseColor4f(0,0.5f,1,1);
break;
case LL_PCODE_LEGACY_TREE:
- gGL.color4f(0,0.5f,0,1);
+ gGL.diffuseColor4f(0,0.5f,0,1);
break;
default:
- gGL.color4f(1,0,1,1);
+ gGL.diffuseColor4f(1,0,1,1);
break;
}
}
else
{
- gGL.color4f(1,0,0,1);
+ gGL.diffuseColor4f(1,0,0,1);
}
}
@@ -2996,7 +2998,7 @@ void renderNormals(LLDrawable* drawablep)
n.setMul(face.mNormals[j], scale);
p.setAdd(face.mPositions[j], n);
- gGL.color4f(1,1,1,1);
+ gGL.diffuseColor4f(1,1,1,1);
gGL.vertex3fv(face.mPositions[j].getF32ptr());
gGL.vertex3fv(p.getF32ptr());
@@ -3005,7 +3007,7 @@ void renderNormals(LLDrawable* drawablep)
n.setMul(face.mBinormals[j], scale);
p.setAdd(face.mPositions[j], n);
- gGL.color4f(0,1,1,1);
+ gGL.diffuseColor4f(0,1,1,1);
gGL.vertex3fv(face.mPositions[j].getF32ptr());
gGL.vertex3fv(p.getF32ptr());
}
@@ -3063,7 +3065,7 @@ void renderMeshBaseHull(LLVOVolume* volume, U32 data_mask, LLColor4& color, LLCo
}
else
{
- gGL.color3f(1,0,1);
+ gGL.diffuseColor3f(1,0,1);
drawBoxOutline(center, size);
}
}
@@ -3179,7 +3181,7 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
}
else
{
- gGL.color3f(1,1,0);
+ gGL.diffuseColor3f(1,1,0);
drawBoxOutline(center, size);
}
}
@@ -3315,7 +3317,7 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
LLVector3 vscale = volume->getScale()*2.f;
scale.set(scale[0]/vscale[0], scale[1]/vscale[1], scale[2]/vscale[2]);
- gGL.color4fv(color.mV);
+ gGL.diffuseColor4fv(color.mV);
drawBox(center, scale);
}
else if (type == LLPhysicsShapeBuilderUtil::PhysicsShapeSpecification::SPHERE)
@@ -3385,7 +3387,7 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)
}
else
{
- gGL.color3f(1,0,1);
+ gGL.diffuseColor3f(1,0,1);
drawBoxOutline(center, size);
gMeshRepo.buildHull(volume_params, detail);
}
@@ -3481,11 +3483,11 @@ void renderTexturePriority(LLDrawable* drawable)
F32 t = vsize/sLastMaxTexPriority;
LLVector4 col = lerp(cold, hot, t);
- gGL.color4fv(col.mV);
+ gGL.diffuseColor4fv(col.mV);
}
//else
//{
- // gGL.color4f(1,0,1,1);
+ // gGL.diffuseColor4f(1,0,1,1);
//}
LLVector4a center;
@@ -3504,7 +3506,7 @@ void renderTexturePriority(LLDrawable* drawable)
LLVector4 col = lerp(boost_cold, boost_hot, t);
LLGLEnable blend_on(GL_BLEND);
gGL.blendFunc(GL_SRC_ALPHA, GL_ONE);
- gGL.color4fv(col.mV);
+ gGL.diffuseColor4fv(col.mV);
drawBox(center, size);
gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}*/
@@ -3517,7 +3519,7 @@ void renderPoints(LLDrawable* drawablep)
if (drawablep->getNumFaces())
{
gGL.begin(LLRender::POINTS);
- gGL.color3f(1,1,1);
+ gGL.diffuseColor3f(1,1,1);
for (S32 i = 0; i < drawablep->getNumFaces(); i++)
{
gGL.vertex3fv(drawablep->getFace(i)->mCenterLocal.mV);
@@ -3542,7 +3544,7 @@ void renderBatchSize(LLDrawInfo* params)
{
LLGLEnable offset(GL_POLYGON_OFFSET_FILL);
glPolygonOffset(-1.f, 1.f);
- glColor3ubv((GLubyte*) &(params->mDebugColor));
+ gGL.diffuseColor4ubv((GLubyte*) &(params->mDebugColor));
pushVerts(params, LLVertexBuffer::MAP_VERTEX);
}
@@ -3611,11 +3613,11 @@ void renderLights(LLDrawable* drawablep)
{
LLGLDepthTest depth(GL_FALSE, GL_TRUE);
- gGL.color4f(1,1,1,1);
+ gGL.diffuseColor4f(1,1,1,1);
drawBoxOutline(pos, size);
}
- gGL.color4f(1,1,0,1);
+ gGL.diffuseColor4f(1,1,0,1);
F32 rad = drawablep->getVOVolume()->getLightRadius();
drawBoxOutline(pos, LLVector4a(rad));
}
@@ -3640,13 +3642,13 @@ public:
if (branch->getData().empty())
{
- gGL.color3f(1.f,0.2f,0.f);
+ gGL.diffuseColor3f(1.f,0.2f,0.f);
center.set(branch->getCenter().getF32ptr());
size.set(branch->getSize().getF32ptr());
}
else
{
- gGL.color3f(0.75f, 1.f, 0.f);
+ gGL.diffuseColor3f(0.75f, 1.f, 0.f);
center.set(vl->mBounds[0].getF32ptr());
size.set(vl->mBounds[1].getF32ptr());
}
@@ -3659,11 +3661,11 @@ public:
if (i == 1)
{
- gGL.color4f(0,1,1,0.5f);
+ gGL.diffuseColor4f(0,1,1,0.5f);
}
else
{
- gGL.color4f(0,0.5f,0.5f, 0.25f);
+ gGL.diffuseColor4f(0,0.5f,0.5f, 0.25f);
drawBoxOutline(center, size);
}
@@ -3700,7 +3702,7 @@ void renderRaycast(LLDrawable* drawablep)
if (drawablep->getNumFaces())
{
LLGLEnable blend(GL_BLEND);
- gGL.color4f(0,1,1,0.5f);
+ gGL.diffuseColor4f(0,1,1,0.5f);
if (drawablep->getVOVolume())
{
@@ -3796,11 +3798,11 @@ void renderRaycast(LLDrawable* drawablep)
orient.getRotMatrixToParent(rotation);
gGL.multMatrix((float*)rotation.mMatrix);
- gGL.color4f(1,0,0,0.5f);
+ gGL.diffuseColor4f(1,0,0,0.5f);
drawBox(LLVector3(0, 0, 0), LLVector3(0.1f, 0.022f, 0.022f));
- gGL.color4f(0,1,0,0.5f);
+ gGL.diffuseColor4f(0,1,0,0.5f);
drawBox(LLVector3(0, 0, 0), LLVector3(0.021f, 0.1f, 0.021f));
- gGL.color4f(0,0,1,0.5f);
+ gGL.diffuseColor4f(0,0,1,0.5f);
drawBox(LLVector3(0, 0, 0), LLVector3(0.02f, 0.02f, 0.1f));
gGL.popMatrix();
@@ -3815,7 +3817,7 @@ void renderRaycast(LLDrawable* drawablep)
size.mul(0.5f);
LLGLDepthTest depth(GL_FALSE, GL_TRUE);
- gGL.color4f(0,0.5f,0.5f,1);
+ gGL.diffuseColor4f(0,0.5f,0.5f,1);
drawBoxOutline(pos, size);
}
}
@@ -3884,7 +3886,7 @@ public:
stop_glerror();
gGLLastMatrix = NULL;
gGL.popMatrix();
- gGL.color4f(1,1,1,1);
+ gGL.diffuseColor4f(1,1,1,1);
}
}
}
@@ -3908,7 +3910,7 @@ public:
{
if (!group->getData().empty())
{
- gGL.color3f(0,0,1);
+ gGL.diffuseColor3f(0,0,1);
drawBoxOutline(group->mObjectBounds[0],
group->mObjectBounds[1]);
}
@@ -3917,7 +3919,7 @@ public:
for (LLSpatialGroup::OctreeNode::const_element_iter i = branch->getData().begin(); i != branch->getData().end(); ++i)
{
LLDrawable* drawable = *i;
-
+
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_BBOXES))
{
renderBoundingBox(drawable);
@@ -3932,7 +3934,7 @@ public:
{
if (drawable->isState(LLDrawable::IN_REBUILD_Q2))
{
- gGL.color4f(0.6f, 0.6f, 0.1f, 1.f);
+ gGL.diffuseColor4f(0.6f, 0.6f, 0.1f, 1.f);
const LLVector4a* ext = drawable->getSpatialExtents();
LLVector4a center;
center.setAdd(ext[0], ext[1]);
@@ -4227,7 +4229,7 @@ void LLSpatialPartition::renderDebug()
if (LLGLSLShader::sNoFixedFunction)
{
- gUIProgram.bind();
+ gDebugProgram.bind();
}
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_PRIORITY))
@@ -4261,13 +4263,13 @@ void LLSpatialPartition::renderDebug()
if (LLGLSLShader::sNoFixedFunction)
{
- gUIProgram.unbind();
+ gDebugProgram.unbind();
}
}
void LLSpatialGroup::drawObjectBox(LLColor4 col)
{
- gGL.color4fv(col.mV);
+ gGL.diffuseColor4fv(col.mV);
LLVector4a size;
size = mObjectBounds[1];
size.mul(1.01f);
diff --git a/indra/newview/llviewerjoint.cpp b/indra/newview/llviewerjoint.cpp
index f2e49ff270..a907f102f8 100644
--- a/indra/newview/llviewerjoint.cpp
+++ b/indra/newview/llviewerjoint.cpp
@@ -543,7 +543,7 @@ void LLViewerJointCollisionVolume::renderCollision()
gGL.pushMatrix();
gGL.multMatrix( &mXform.getWorldMatrix().mMatrix[0][0] );
- gGL.color3f( 0.f, 0.f, 1.f );
+ gGL.diffuseColor3f( 0.f, 0.f, 1.f );
gGL.begin(LLRender::LINES);
--
cgit v1.2.3
From cffcb414f57bcdc7de862d791f8f9c1fea91a7fb Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Fri, 7 Oct 2011 17:44:57 -0500
Subject: SH-2488 Fix for shiny and alpha not interacting well on rigged
attachments (and fix for assertion when rendering model import preview)
---
indra/newview/lldrawpoolavatar.cpp | 13 +++++++++++--
indra/newview/llfloatermodelpreview.cpp | 9 +++++++++
2 files changed, 20 insertions(+), 2 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index d9b0b195f5..a710bdcdbd 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -1275,10 +1275,9 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
U32 data_mask = face->getRiggedVertexBufferDataMask();
- S32 num_verts = (vol_face.mNumVertices + 0xF) & ~0xF;
if (buffer.isNull() ||
buffer->getTypeMask() != data_mask ||
- buffer->getRequestedVerts() != num_verts ||
+ buffer->getRequestedVerts() != vol_face.mNumVertices ||
buffer->getRequestedIndices() != vol_face.mNumIndices ||
(drawable && drawable->isState(LLDrawable::REBUILD_ALL)))
{
@@ -1318,6 +1317,16 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
LLMatrix3 mat_normal(mat3);
+ //let getGeometryVolume know if alpha should override shiny
+ if (face->getFaceColor().mV[3] < 1.f)
+ {
+ face->setPoolType(LLDrawPool::POOL_ALPHA);
+ }
+ else
+ {
+ face->setPoolType(LLDrawPool::POOL_AVATAR);
+ }
+
face->getGeometryVolume(*volume, face->getTEOffset(), mat_vert, mat_normal, offset, true);
buffer->flush();
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 2a834ea11f..d9ce72a2c2 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -5409,7 +5409,16 @@ BOOL LLModelPreview::render()
if (joint_positions)
{
+ LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
+ if (shader)
+ {
+ gDebugProgram.bind();
+ }
getPreviewAvatar()->renderCollisionVolumes();
+ if (shader)
+ {
+ shader->bind();
+ }
}
for (LLModelLoader::scene::iterator iter = mScene[mPreviewLOD].begin(); iter != mScene[mPreviewLOD].end(); ++iter)
--
cgit v1.2.3
From c686e8b46d5624f384456c7b099b1d97f003079d Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Sat, 8 Oct 2011 17:26:54 -0400
Subject: Preserve logs and user_settings on uninstall
---
indra/newview/installers/windows/installer_template.nsi | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index 03280328f3..a4f7ab7c51 100755
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -611,9 +611,9 @@ Push $2
ExpandEnvStrings $2 $2
; Remove all cache and settings files but leave any other .txt files to preserve the chat logs
- RMDir /r "$2\Application Data\SecondLife\logs"
+; RMDir /r "$2\Application Data\SecondLife\logs"
RMDir /r "$2\Application Data\SecondLife\browser_profile"
- RMDir /r "$2\Application Data\SecondLife\user_settings"
+; RMDir /r "$2\Application Data\SecondLife\user_settings"
Delete "$2\Application Data\SecondLife\*.xml"
Delete "$2\Application Data\SecondLife\*.bmp"
Delete "$2\Application Data\SecondLife\search_history.txt"
@@ -636,7 +636,7 @@ Push $0
RMDir /r "$0\SecondLife"
Pop $0
-; Delete filse in C:\Windows\Application Data\SecondLife
+; Delete files in C:\Windows\Application Data\SecondLife
; If the user is running on a pre-NT system, Application Data lives here instead of
; in Documents and Settings.
RMDir /r "$WINDIR\Application Data\SecondLife"
--
cgit v1.2.3
From 6180d571376ee6719bcc01804d0277d51359609e Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Sat, 8 Oct 2011 17:28:44 -0400
Subject: CHOP-280 FIX - remove settings on uninstall
---
indra/newview/installers/windows/installer_template.nsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index a4f7ab7c51..32ae2a8a15 100755
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -613,7 +613,7 @@ Push $2
; Remove all cache and settings files but leave any other .txt files to preserve the chat logs
; RMDir /r "$2\Application Data\SecondLife\logs"
RMDir /r "$2\Application Data\SecondLife\browser_profile"
-; RMDir /r "$2\Application Data\SecondLife\user_settings"
+ RMDir /r "$2\Application Data\SecondLife\user_settings"
Delete "$2\Application Data\SecondLife\*.xml"
Delete "$2\Application Data\SecondLife\*.bmp"
Delete "$2\Application Data\SecondLife\search_history.txt"
--
cgit v1.2.3
From 44e5c8fdeac52ba4c9ba5414700ba54dcb363cd2 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Mon, 10 Oct 2011 08:30:18 -0400
Subject: SH-2515 WIP
---
.../installers/windows/installer_template.nsi | 29 +++++++++++-----------
1 file changed, 15 insertions(+), 14 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index 32ae2a8a15..bbfd1881dc 100755
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -1060,22 +1060,23 @@ StrCmp $INSTDIR "$PROGRAMFILES\SecondLifeViewer2" SLV2_DONE
IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" SLV2_FOUND SLV2_DONE
SLV2_FOUND:
-ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" /S'
-
-; cheesy spin wait for uninstall to finish - uninstaller is supposed
-; to take _? argument which combined with ExecWait would avoid need
-; for this, but have not been able to get it to work.
-SPIN_LOOP:
- Sleep 500
- IntOp $0 $0 + 500
- IntCmp $0 10000 SLV2_TIMEOUT CONT SLV2_TIMEOUT
-SLV2_TIMEOUT:
+ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" _?=$PROGRAMFILES\SecondLifeViewer2'
+Sleep 1000
+Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe"
+
+;; cheesy spin wait for uninstall to finish - uninstaller is supposed
+;; to take _? argument which combined with ExecWait would avoid need
+;; for this, but have not been able to get it to work.
+;SPIN_LOOP:
+; IntOp $0 $0 + 500
+; IntCmp $0 10000 SLV2_TIMEOUT CONT SLV2_TIMEOUT
+;SLV2_TIMEOUT:
;; MessageBox /SD IDOK MB_OK "Error in uninstall of Second Life Viewer 2"
- Goto SLV2_DONE
+; Goto SLV2_DONE
-CONT:
- ; Do we know this is the last file removed?
- IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" SPIN_LOOP SLV2_DONE
+;CONT:
+; ; Do we know this is the last file removed?
+; IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" SPIN_LOOP SLV2_DONE
SLV2_DONE:
MessageBox MB_OK "Restoring Cache Files"
--
cgit v1.2.3
From 74a05b51fd8c217ef7520b3dd01323bc4e4618c7 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Mon, 10 Oct 2011 11:03:55 -0400
Subject: SH-2515 FIX - uninstall viewer 2 while preserving settings
---
.../installers/windows/installer_template.nsi | 162 +--------------------
1 file changed, 2 insertions(+), 160 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index bbfd1881dc..63e4b6be86 100755
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -376,146 +376,6 @@ Push $2
; Required since ProfileImagePath is of type REG_EXPAND_SZ
ExpandEnvStrings $2 $2
- RMDir /r "$2\Application Data\SecondLifeRestore\"
- CreateDirectory "$2\Application Data\SecondLifeRestore\"
- CopyFiles "$TEMP\SecondLifeSettingsBackup\$0\*" "$2\Application Data\SecondLifeRestore\"
-
- CONTINUE:
- IntOp $0 $0 + 1
- Goto LOOP
- DONE:
-
-Pop $2
-Pop $1
-Pop $0
-
-; Copy files in Documents and Settings\All Users\SecondLife
-Push $0
- ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
- StrCmp $0 "" +2
- RMDir /r "$2\Application Data\SecondLifeRestore\"
- CreateDirectory "$2\Application Data\SecondLifeRestore\"
- CopyFiles "$TEMP\SecondLifeSettingsBackup\AllUsers\*" "$2\Application Data\SecondLifeRestore\"
-Pop $0
-
-FunctionEnd
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Delete files in Documents and Settings\\SecondLife\cache
-; Delete files in Documents and Settings\All Users\SecondLife\cache
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;Function RemoveCacheFiles
-;
-;; Delete files in Documents and Settings\\SecondLife
-;Push $0
-;Push $1
-;Push $2
-; DetailPrint $(RemoveCacheFilesDP)
-;
-; StrCpy $0 0 ; Index number used to iterate via EnumRegKey
-;
-; LOOP:
-; EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
-; StrCmp $1 "" DONE ; no more users
-;
-; ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
-; StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing
-;
-; ; Required since ProfileImagePath is of type REG_EXPAND_SZ
-; ExpandEnvStrings $2 $2
-;
-; ; When explicitly uninstalling, everything goes away
-; RMDir /r "$2\Application Data\SecondLife\cache"
-;
-; CONTINUE:
-; IntOp $0 $0 + 1
-; Goto LOOP
-; DONE:
-;Pop $2
-;Pop $1
-;Pop $0
-;
-;; Delete files in Documents and Settings\All Users\SecondLife
-;Push $0
-; ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
-; StrCmp $0 "" +2
-; RMDir /r "$0\SecondLife\cache"
-;Pop $0
-;
-;; Delete filse in C:\Windows\Application Data\SecondLife
-;; If the user is running on a pre-NT system, Application Data lives here instead of
-;; in Documents and Settings.
-;RMDir /r "$WINDIR\Application Data\SecondLife\cache"
-;
-;FunctionEnd
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Save files from cache
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function PreserveCacheFiles
-
-Push $0
-Push $1
-Push $2
-
- RMDir /r "$TEMP\SecondLifeSettingsBackup"
- CreateDirectory "$TEMP\SecondLifeSettingsBackup"
- StrCpy $0 0 ; Index number used to iterate via EnumRegKey
-
- LOOP:
- EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
- StrCmp $1 "" DONE ; no more users
-
- ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
- StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing
-
- ; Required since ProfileImagePath is of type REG_EXPAND_SZ
- ExpandEnvStrings $2 $2
-
- CreateDirectory "$TEMP\SecondLifeSettingsBackup\$0"
- CopyFiles "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\$0"
-
- CONTINUE:
- IntOp $0 $0 + 1
- Goto LOOP
- DONE:
-
-Pop $2
-Pop $1
-Pop $0
-
-; Copy files in Documents and Settings\All Users\SecondLife
-Push $0
- ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
- StrCmp $0 "" +2
- CreateDirectory "$TEMP\SecondLifeSettingsBackup\AllUsers\"
- CopyFiles "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\AllUsers\"
-Pop $0
-
-FunctionEnd
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Restore files from cache
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function RestoreCacheFiles
-
-Push $0
-Push $1
-Push $2
-
- StrCpy $0 0 ; Index number used to iterate via EnumRegKey
-
- LOOP:
- EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
- StrCmp $1 "" DONE ; no more users
-
- ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
- StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing
-
- ; Required since ProfileImagePath is of type REG_EXPAND_SZ
- ExpandEnvStrings $2 $2
-
- RMDir /r "$2\Application Data\SecondLife\"
CreateDirectory "$2\Application Data\SecondLife\"
CopyFiles "$TEMP\SecondLifeSettingsBackup\$0\*" "$2\Application Data\SecondLife\"
@@ -532,14 +392,12 @@ Pop $0
Push $0
ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
StrCmp $0 "" +2
- RMDir /r "$2\Application Data\SecondLife\"
CreateDirectory "$2\Application Data\SecondLife\"
CopyFiles "$TEMP\SecondLifeSettingsBackup\AllUsers\*" "$2\Application Data\SecondLife\"
Pop $0
FunctionEnd
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Delete the installed shader files
;;; Since shaders are in active development, we'll likely need to shuffle them
@@ -1056,30 +914,14 @@ WriteRegExpandStr HKEY_CLASSES_ROOT "x-grid-location-info\shell\open\command" ""
WriteUninstaller "$INSTDIR\uninst.exe"
; Remove existing "Second Life Viewer 2" install if any.
-StrCmp $INSTDIR "$PROGRAMFILES\SecondLifeViewer2" SLV2_DONE
+StrCmp $INSTDIR "$PROGRAMFILES\SecondLifeViewer2" SLV2_DONE ; unless that's the install directory
IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" SLV2_FOUND SLV2_DONE
SLV2_FOUND:
-ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" _?=$PROGRAMFILES\SecondLifeViewer2'
-Sleep 1000
+ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" /S _?=$PROGRAMFILES\SecondLifeViewer2'
Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe"
-;; cheesy spin wait for uninstall to finish - uninstaller is supposed
-;; to take _? argument which combined with ExecWait would avoid need
-;; for this, but have not been able to get it to work.
-;SPIN_LOOP:
-; IntOp $0 $0 + 500
-; IntCmp $0 10000 SLV2_TIMEOUT CONT SLV2_TIMEOUT
-;SLV2_TIMEOUT:
-;; MessageBox /SD IDOK MB_OK "Error in uninstall of Second Life Viewer 2"
-; Goto SLV2_DONE
-
-;CONT:
-; ; Do we know this is the last file removed?
-; IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" SPIN_LOOP SLV2_DONE
-
SLV2_DONE:
-MessageBox MB_OK "Restoring Cache Files"
Call RestoreCacheFiles
; end of default section
--
cgit v1.2.3
From cf7bc443b1a2229ea24cb1b2aa61c20f1ad65951 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Mon, 10 Oct 2011 11:54:27 -0400
Subject: SH-2515 FIX - some cleanup and test stuff
---
.../installers/windows/installer_template.nsi | 58 ++++++++++++++++++----
1 file changed, 48 insertions(+), 10 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index 63e4b6be86..bd1d06c31f 100755
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -311,9 +311,9 @@ FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Save files from cache
+; Save user files to temp location
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function PreserveCacheFiles
+Function PreserveUserFiles
Push $0
Push $1
@@ -356,9 +356,9 @@ Pop $0
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Restore files from cache
+; Restore user files from temp location
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function RestoreCacheFiles
+Function RestoreUserFiles
Push $0
Push $1
@@ -398,6 +398,48 @@ Pop $0
FunctionEnd
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; Clobber user files - TEST ONLY
+; This is here for testing, generally not desirable to call it.
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;Function ClobberUserFilesTESTONLY
+
+;Push $0
+;Push $1
+;Push $2
+;
+; StrCpy $0 0 ; Index number used to iterate via EnumRegKey
+;
+; LOOP:
+; EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
+; StrCmp $1 "" DONE ; no more users
+;
+; ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
+; StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing
+;
+; ; Required since ProfileImagePath is of type REG_EXPAND_SZ
+; ExpandEnvStrings $2 $2
+;
+; RMDir /r "$2\Application Data\SecondLife\"
+;
+; CONTINUE:
+; IntOp $0 $0 + 1
+; Goto LOOP
+; DONE:
+;
+;Pop $2
+;Pop $1
+;Pop $0
+;
+;; Copy files in Documents and Settings\All Users\SecondLife
+;Push $0
+; ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData"
+; StrCmp $0 "" +2
+; RMDir /r "$2\Application Data\SecondLife\"
+;Pop $0
+;
+;FunctionEnd
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Delete the installed shader files
;;; Since shaders are in active development, we'll likely need to shuffle them
@@ -824,15 +866,11 @@ Call CloseSecondLife ; Make sure we're not running
Call CheckNetworkConnection ; ping secondlife.com
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Call PreserveCacheFiles
-
-Call RestoreCacheFiles
+Call PreserveUserFiles
;;; Don't remove cache files during a regular install, removing the inventory cache on upgrades results in lots of damage to the servers.
;Call RemoveCacheFiles ; Installing over removes potentially corrupted
; VFS and cache files.
-Call PreserveCacheFiles
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Need to clean out shader files from previous installs to fix DEV-5663
Call RemoveOldShaders
@@ -922,7 +960,7 @@ ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" /S _?=$PROGRAMFILES\Secon
Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe"
SLV2_DONE:
-Call RestoreCacheFiles
+Call RestoreUserFiles
; end of default section
SectionEnd
--
cgit v1.2.3
From 3fe27c61b85545d22188baf5050207f13f4985b2 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Mon, 10 Oct 2011 13:45:30 -0400
Subject: SH-2515 FIX - small tweaks to cleanup
---
indra/newview/installers/windows/installer_template.nsi | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index bd1d06c31f..98cc8fa702 100755
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -957,7 +957,8 @@ IfFileExists "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" SLV2_FOUND SLV2_DONE
SLV2_FOUND:
ExecWait '"$PROGRAMFILES\SecondLifeViewer2\uninst.exe" /S _?=$PROGRAMFILES\SecondLifeViewer2'
-Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe"
+Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" ; with _? option above, uninst.exe will be left behind.
+RMDir "$PROGRAMFILES\SecondLifeViewer2" ; will remove only if empty.
SLV2_DONE:
Call RestoreUserFiles
--
cgit v1.2.3
From 3211c6e3089b03d73f2e260be4037304660f834d Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 11 Oct 2011 00:26:03 -0500
Subject: SH-2240 WIP on removing lots of string comparisons that were added to
deal with exploding amounts of non-built-in GL state
---
indra/newview/llviewercontrol.cpp | 1 +
indra/newview/llviewerdisplay.cpp | 1 +
indra/newview/llviewershadermgr.cpp | 77 +-----
indra/newview/llviewershadermgr.h | 45 ---
indra/newview/llwlparamset.cpp | 4 +
indra/newview/pipeline.cpp | 538 +++++++++++++++++++++++-------------
indra/newview/pipeline.h | 74 +++++
7 files changed, 428 insertions(+), 312 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 5b178f82d8..3692da64fc 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -388,6 +388,7 @@ static bool handleRenderDeferredChanged(const LLSD& newvalue)
LLRenderTarget::sUseFBO = newvalue.asBoolean();
if (gPipeline.isInit())
{
+ LLPipeline::refreshCachedSettings();
gPipeline.updateRenderDeferred();
gPipeline.releaseGLBuffers();
gPipeline.createGLBuffers();
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 7220f2a20f..1832416a4b 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -862,6 +862,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
// gGL.popMatrix();
//}
+ LLPipeline::refreshCachedSettings();
LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? TRUE : FALSE;
LLPipeline::refreshRenderDeferred();
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index ac489e0caf..8bc573135c 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -195,6 +195,7 @@ LLViewerShaderMgr::LLViewerShaderMgr() :
mMaxAvatarShaderLevel(0)
{
/// Make sure WL Sky is the first program
+ //ONLY shaders that need WL Param management should be added here
mShaderList.push_back(&gWLSkyProgram);
mShaderList.push_back(&gWLCloudProgram);
mShaderList.push_back(&gAvatarProgram);
@@ -209,16 +210,6 @@ LLViewerShaderMgr::LLViewerShaderMgr() :
mShaderList.push_back(&gObjectFullbrightNoColorWaterProgram);
mShaderList.push_back(&gObjectSimpleAlphaMaskProgram);
mShaderList.push_back(&gObjectBumpProgram);
- mShaderList.push_back(&gUIProgram);
- mShaderList.push_back(&gCustomAlphaProgram);
- mShaderList.push_back(&gGlowCombineProgram);
- mShaderList.push_back(&gGlowCombineFXAAProgram);
- mShaderList.push_back(&gTwoTextureAddProgram);
- mShaderList.push_back(&gOneTextureNoColorProgram);
- mShaderList.push_back(&gSolidColorProgram);
- mShaderList.push_back(&gOcclusionProgram);
- mShaderList.push_back(&gDebugProgram);
- mShaderList.push_back(&gAlphaMaskProgram);
mShaderList.push_back(&gObjectEmissiveProgram);
mShaderList.push_back(&gObjectEmissiveWaterProgram);
mShaderList.push_back(&gObjectFullbrightProgram);
@@ -260,23 +251,16 @@ LLViewerShaderMgr::LLViewerShaderMgr() :
mShaderList.push_back(&gObjectShinyNonIndexedWaterProgram);
mShaderList.push_back(&gUnderWaterProgram);
mShaderList.push_back(&gDeferredSunProgram);
- mShaderList.push_back(&gDeferredBlurLightProgram);
mShaderList.push_back(&gDeferredSoftenProgram);
- mShaderList.push_back(&gDeferredLightProgram);
- mShaderList.push_back(&gDeferredMultiLightProgram);
mShaderList.push_back(&gDeferredAlphaProgram);
mShaderList.push_back(&gDeferredSkinnedAlphaProgram);
mShaderList.push_back(&gDeferredFullbrightProgram);
mShaderList.push_back(&gDeferredEmissiveProgram);
mShaderList.push_back(&gDeferredAvatarEyesProgram);
- mShaderList.push_back(&gDeferredPostProgram);
- mShaderList.push_back(&gFXAAProgram);
mShaderList.push_back(&gDeferredWaterProgram);
mShaderList.push_back(&gDeferredAvatarAlphaProgram);
mShaderList.push_back(&gDeferredWLSkyProgram);
mShaderList.push_back(&gDeferredWLCloudProgram);
- mShaderList.push_back(&gDeferredStarProgram);
- mShaderList.push_back(&gNormalMapGenProgram);
}
LLViewerShaderMgr::~LLViewerShaderMgr()
@@ -300,70 +284,13 @@ void LLViewerShaderMgr::initAttribsAndUniforms(void)
{
if (mReservedAttribs.empty())
{
- //MUST match order of enum in LLVertexBuffer.h
- mReservedAttribs.push_back("position");
- mReservedAttribs.push_back("normal");
- mReservedAttribs.push_back("texcoord0");
- mReservedAttribs.push_back("texcoord1");
- mReservedAttribs.push_back("texcoord2");
- mReservedAttribs.push_back("texcoord3");
- mReservedAttribs.push_back("diffuse_color");
- mReservedAttribs.push_back("emissive");
- mReservedAttribs.push_back("binormal");
- mReservedAttribs.push_back("weight");
- mReservedAttribs.push_back("weight4");
- mReservedAttribs.push_back("clothing");
- mReservedAttribs.push_back("texture_index");
+ LLShaderMgr::initAttribsAndUniforms();
mAvatarUniforms.push_back("matrixPalette");
mAvatarUniforms.push_back("gWindDir");
mAvatarUniforms.push_back("gSinWaveParams");
mAvatarUniforms.push_back("gGravity");
- mReservedUniforms.reserve(24);
- mReservedUniforms.push_back("diffuseMap");
- mReservedUniforms.push_back("specularMap");
- mReservedUniforms.push_back("bumpMap");
- mReservedUniforms.push_back("environmentMap");
- mReservedUniforms.push_back("cloude_noise_texture");
- mReservedUniforms.push_back("fullbright");
- mReservedUniforms.push_back("lightnorm");
- mReservedUniforms.push_back("sunlight_color");
- mReservedUniforms.push_back("ambient");
- mReservedUniforms.push_back("blue_horizon");
- mReservedUniforms.push_back("blue_density");
- mReservedUniforms.push_back("haze_horizon");
- mReservedUniforms.push_back("haze_density");
- mReservedUniforms.push_back("cloud_shadow");
- mReservedUniforms.push_back("density_multiplier");
- mReservedUniforms.push_back("distance_multiplier");
- mReservedUniforms.push_back("max_y");
- mReservedUniforms.push_back("glow");
- mReservedUniforms.push_back("cloud_color");
- mReservedUniforms.push_back("cloud_pos_density1");
- mReservedUniforms.push_back("cloud_pos_density2");
- mReservedUniforms.push_back("cloud_scale");
- mReservedUniforms.push_back("gamma");
- mReservedUniforms.push_back("scene_light_strength");
-
- mReservedUniforms.push_back("depthMap");
- mReservedUniforms.push_back("shadowMap0");
- mReservedUniforms.push_back("shadowMap1");
- mReservedUniforms.push_back("shadowMap2");
- mReservedUniforms.push_back("shadowMap3");
- mReservedUniforms.push_back("shadowMap4");
- mReservedUniforms.push_back("shadowMap5");
-
- mReservedUniforms.push_back("normalMap");
- mReservedUniforms.push_back("positionMap");
- mReservedUniforms.push_back("diffuseRect");
- mReservedUniforms.push_back("specularRect");
- mReservedUniforms.push_back("noiseMap");
- mReservedUniforms.push_back("lightFunc");
- mReservedUniforms.push_back("lightMap");
- mReservedUniforms.push_back("bloomMap");
- mReservedUniforms.push_back("projectionMap");
-
mWLUniforms.push_back("camPosLocal");
mTerrainUniforms.reserve(5);
diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h
index 5bcdf11be5..01f8c3987c 100644
--- a/indra/newview/llviewershadermgr.h
+++ b/indra/newview/llviewershadermgr.h
@@ -71,51 +71,6 @@ public:
SHADER_COUNT
};
- typedef enum
- {
- DIFFUSE_MAP = 0,
- SPECULAR_MAP,
- BUMP_MAP,
- ENVIRONMENT_MAP,
- CLOUD_NOISE_MAP,
- FULLBRIGHT,
- LIGHTNORM,
- SUNLIGHT_COLOR,
- AMBIENT,
- BLUE_HORIZON,
- BLUE_DENSITY,
- HAZE_HORIZON,
- HAZE_DENSITY,
- CLOUD_SHADOW,
- DENSITY_MULTIPLIER,
- DISTANCE_MULTIPLIER,
- MAX_Y,
- GLOW,
- CLOUD_COLOR,
- CLOUD_POS_DENSITY1,
- CLOUD_POS_DENSITY2,
- CLOUD_SCALE,
- GAMMA,
- SCENE_LIGHT_STRENGTH,
- DEFERRED_DEPTH,
- DEFERRED_SHADOW0,
- DEFERRED_SHADOW1,
- DEFERRED_SHADOW2,
- DEFERRED_SHADOW3,
- DEFERRED_SHADOW4,
- DEFERRED_SHADOW5,
- DEFERRED_NORMAL,
- DEFERRED_POSITION,
- DEFERRED_DIFFUSE,
- DEFERRED_SPECULAR,
- DEFERRED_NOISE,
- DEFERRED_LIGHTFUNC,
- DEFERRED_LIGHT,
- DEFERRED_BLOOM,
- DEFERRED_PROJECTION,
- END_RESERVED_UNIFORMS
- } eGLSLReservedUniforms;
-
typedef enum
{
SHINY_ORIGIN = END_RESERVED_UNIFORMS
diff --git a/indra/newview/llwlparamset.cpp b/indra/newview/llwlparamset.cpp
index 22fba90f65..4a1db3d26c 100644
--- a/indra/newview/llwlparamset.cpp
+++ b/indra/newview/llwlparamset.cpp
@@ -69,12 +69,16 @@ LLWLParamSet::LLWLParamSet(void) :
*/
}
+static LLFastTimer::DeclareTimer FTM_WL_PARAM_UPDATE("WL Param Update");
+
void LLWLParamSet::update(LLGLSLShader * shader) const
{
for(LLSD::map_const_iterator i = mParamValues.beginMap();
i != mParamValues.endMap();
++i)
{
+ LLFastTimer t(FTM_WL_PARAM_UPDATE);
+
const std::string& param = i->first;
if( param == "star_brightness" || param == "preset_num" || param == "sun_angle" ||
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 42873dbca8..e4125c8dc8 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -113,6 +113,79 @@
//#define DEBUG_INDICES
#endif
+//cached settings
+BOOL LLPipeline::RenderAvatarVP;
+BOOL LLPipeline::VertexShaderEnable;
+BOOL LLPipeline::WindLightUseAtmosShaders;
+BOOL LLPipeline::RenderDeferred;
+F32 LLPipeline::RenderDeferredSunWash;
+U32 LLPipeline::RenderFSAASamples;
+U32 LLPipeline::RenderResolutionDivisor;
+BOOL LLPipeline::RenderUIBuffer;
+S32 LLPipeline::RenderShadowDetail;
+BOOL LLPipeline::RenderDeferredSSAO;
+F32 LLPipeline::RenderShadowResolutionScale;
+BOOL LLPipeline::RenderLocalLights;
+BOOL LLPipeline::RenderDelayCreation;
+BOOL LLPipeline::RenderAnimateRes;
+BOOL LLPipeline::FreezeTime;
+S32 LLPipeline::DebugBeaconLineWidth;
+F32 LLPipeline::RenderHighlightBrightness;
+LLColor4 LLPipeline::RenderHighlightColor;
+F32 LLPipeline::RenderHighlightThickness;
+BOOL LLPipeline::RenderSpotLightsInNondeferred;
+LLColor4 LLPipeline::PreviewAmbientColor;
+LLColor4 LLPipeline::PreviewDiffuse0;
+LLColor4 LLPipeline::PreviewSpecular0;
+LLColor4 LLPipeline::PreviewDiffuse1;
+LLColor4 LLPipeline::PreviewSpecular1;
+LLColor4 LLPipeline::PreviewDiffuse2;
+LLColor4 LLPipeline::PreviewSpecular2;
+LLVector3 LLPipeline::PreviewDirection0;
+LLVector3 LLPipeline::PreviewDirection1;
+LLVector3 LLPipeline::PreviewDirection2;
+F32 LLPipeline::RenderGlowMinLuminance;
+F32 LLPipeline::RenderGlowMaxExtractAlpha;
+F32 LLPipeline::RenderGlowWarmthAmount;
+LLVector3 LLPipeline::RenderGlowLumWeights;
+LLVector3 LLPipeline::RenderGlowWarmthWeights;
+S32 LLPipeline::RenderGlowResolutionPow;
+S32 LLPipeline::RenderGlowIterations;
+F32 LLPipeline::RenderGlowWidth;
+F32 LLPipeline::RenderGlowStrength;
+BOOL LLPipeline::RenderDepthOfField;
+F32 LLPipeline::CameraFocusTransitionTime;
+F32 LLPipeline::CameraFNumber;
+F32 LLPipeline::CameraFocalLength;
+F32 LLPipeline::CameraFieldOfView;
+F32 LLPipeline::RenderShadowNoise;
+F32 LLPipeline::RenderShadowBlurSize;
+F32 LLPipeline::RenderSSAOScale;
+U32 LLPipeline::RenderSSAOMaxScale;
+F32 LLPipeline::RenderSSAOFactor;
+LLVector3 LLPipeline::RenderSSAOEffect;
+F32 LLPipeline::RenderShadowOffsetError;
+F32 LLPipeline::RenderShadowBiasError;
+F32 LLPipeline::RenderShadowOffset;
+F32 LLPipeline::RenderShadowBias;
+F32 LLPipeline::RenderSpotShadowOffset;
+F32 LLPipeline::RenderSpotShadowBias;
+F32 LLPipeline::RenderEdgeDepthCutoff;
+F32 LLPipeline::RenderEdgeNormCutoff;
+LLVector3 LLPipeline::RenderShadowGaussian;
+F32 LLPipeline::RenderShadowBlurDistFactor;
+BOOL LLPipeline::RenderDeferredAtmospheric;
+S32 LLPipeline::RenderReflectionDetail;
+F32 LLPipeline::RenderHighlightFadeTime;
+LLVector3 LLPipeline::RenderShadowClipPlanes;
+LLVector3 LLPipeline::RenderShadowOrthoClipPlanes;
+LLVector3 LLPipeline::RenderShadowNearDist;
+F32 LLPipeline::RenderFarClip;
+LLVector3 LLPipeline::RenderShadowSplitExponent;
+F32 LLPipeline::RenderShadowErrorCutoff;
+F32 LLPipeline::RenderShadowFOVCutoff;
+BOOL LLPipeline::CameraOffset;
+
const F32 BACKLIGHT_DAY_MAGNITUDE_AVATAR = 0.2f;
const F32 BACKLIGHT_NIGHT_MAGNITUDE_AVATAR = 0.1f;
const F32 BACKLIGHT_DAY_MAGNITUDE_OBJECT = 0.1f;
@@ -371,6 +444,8 @@ void LLPipeline::init()
{
LLMemType mt(LLMemType::MTYPE_PIPELINE_INIT);
+ refreshCachedSettings();
+
gOctreeMaxCapacity = gSavedSettings.getU32("OctreeMaxNodeCapacity");
sDynamicLOD = gSavedSettings.getBOOL("RenderDynamicLOD");
sRenderBump = gSavedSettings.getBOOL("RenderObjectBump");
@@ -588,7 +663,7 @@ void LLPipeline::allocatePhysicsBuffer()
void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
{
- U32 samples = gGLManager.getNumFBOFSAASamples(gSavedSettings.getU32("RenderFSAASamples"));
+ U32 samples = gGLManager.getNumFBOFSAASamples(RenderFSAASamples);
//try to allocate screen buffers at requested resolution and samples
// - on failure, shrink number of samples and try again
@@ -638,7 +713,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
mScreenWidth = resX;
mScreenHeight = resY;
- U32 res_mod = gSavedSettings.getU32("RenderResolutionDivisor");
+ U32 res_mod = RenderResolutionDivisor;
if (res_mod > 1 && res_mod < resX && res_mod < resY)
{
@@ -646,7 +721,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
resY /= res_mod;
}
- if (gSavedSettings.getBOOL("RenderUIBuffer"))
+ if (RenderUIBuffer)
{
if (!mUIScreen.allocate(resX,resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE))
{
@@ -656,8 +731,8 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
if (LLPipeline::sRenderDeferred)
{
- S32 shadow_detail = gSavedSettings.getS32("RenderShadowDetail");
- BOOL ssao = gSavedSettings.getBOOL("RenderDeferredSSAO");
+ S32 shadow_detail = RenderShadowDetail;
+ BOOL ssao = RenderDeferredSSAO;
//allocate deferred rendering color buffers
if (!mDeferredScreen.allocate(resX, resY, GL_RGBA, TRUE, TRUE, LLTexUnit::TT_RECT_TEXTURE, FALSE, samples)) return false;
@@ -683,7 +758,7 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
mDeferredLight.release();
}
- F32 scale = gSavedSettings.getF32("RenderShadowResolutionScale");
+ F32 scale = RenderShadowResolutionScale;
if (shadow_detail > 0)
{ //allocate 4 sun shadow maps
@@ -749,12 +824,12 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
//static
void LLPipeline::updateRenderDeferred()
{
- BOOL deferred = ((gSavedSettings.getBOOL("RenderDeferred") &&
+ BOOL deferred = ((RenderDeferred &&
LLRenderTarget::sUseFBO &&
- LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
- gSavedSettings.getBOOL("VertexShaderEnable") &&
- gSavedSettings.getBOOL("RenderAvatarVP") &&
- gSavedSettings.getBOOL("WindLightUseAtmosShaders")) ? TRUE : FALSE) &&
+ LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
+ VertexShaderEnable &&
+ RenderAvatarVP &&
+ WindLightUseAtmosShaders) ? TRUE : FALSE) &&
!gUseWireframe;
sRenderDeferred = deferred;
@@ -770,6 +845,82 @@ void LLPipeline::refreshRenderDeferred()
updateRenderDeferred();
}
+//static
+void LLPipeline::refreshCachedSettings()
+{
+ VertexShaderEnable = gSavedSettings.getBOOL("VertexShaderEnable");
+ RenderAvatarVP = gSavedSettings.getBOOL("RenderAvatarVP");
+ WindLightUseAtmosShaders = gSavedSettings.getBOOL("WindLightUseAtmosShaders");
+ RenderDeferred = gSavedSettings.getBOOL("RenderDeferred");
+ RenderDeferredSunWash = gSavedSettings.getF32("RenderDeferredSunWash");
+ RenderFSAASamples = gSavedSettings.getU32("RenderFSAASamples");
+ RenderResolutionDivisor = gSavedSettings.getU32("RenderResolutionDivisor");
+ RenderUIBuffer = gSavedSettings.getBOOL("RenderUIBuffer");
+ RenderShadowDetail = gSavedSettings.getS32("RenderShadowDetail");
+ RenderDeferredSSAO = gSavedSettings.getBOOL("RenderDeferredSSAO");
+ RenderShadowResolutionScale = gSavedSettings.getF32("RenderShadowResolutionScale");
+ RenderLocalLights = gSavedSettings.getBOOL("RenderLocalLights");
+ RenderDelayCreation = gSavedSettings.getBOOL("RenderDelayCreation");
+ RenderAnimateRes = gSavedSettings.getBOOL("RenderAnimateRes");
+ FreezeTime = gSavedSettings.getBOOL("FreezeTime");
+ DebugBeaconLineWidth = gSavedSettings.getS32("DebugBeaconLineWidth");
+ RenderHighlightBrightness = gSavedSettings.getF32("RenderHighlightBrightness");
+ RenderHighlightColor = gSavedSettings.getColor4("RenderHighlightColor");
+ RenderHighlightThickness = gSavedSettings.getF32("RenderHighlightThickness");
+ RenderSpotLightsInNondeferred = gSavedSettings.getBOOL("RenderSpotLightsInNondeferred");
+ PreviewAmbientColor = gSavedSettings.getColor4("PreviewAmbientColor");
+ PreviewDiffuse0 = gSavedSettings.getColor4("PreviewDiffuse0");
+ PreviewSpecular0 = gSavedSettings.getColor4("PreviewSpecular0");
+ PreviewDiffuse1 = gSavedSettings.getColor4("PreviewDiffuse1");
+ PreviewSpecular1 = gSavedSettings.getColor4("PreviewSpecular1");
+ PreviewDiffuse2 = gSavedSettings.getColor4("PreviewDiffuse2");
+ PreviewSpecular2 = gSavedSettings.getColor4("PreviewSpecular2");
+ PreviewDirection0 = gSavedSettings.getVector3("PreviewDirection0");
+ PreviewDirection1 = gSavedSettings.getVector3("PreviewDirection1");
+ PreviewDirection2 = gSavedSettings.getVector3("PreviewDirection2");
+ RenderGlowMinLuminance = gSavedSettings.getF32("RenderGlowMinLuminance");
+ RenderGlowMaxExtractAlpha = gSavedSettings.getF32("RenderGlowMaxExtractAlpha");
+ RenderGlowWarmthAmount = gSavedSettings.getF32("RenderGlowWarmthAmount");
+ RenderGlowLumWeights = gSavedSettings.getVector3("RenderGlowLumWeights");
+ RenderGlowWarmthWeights = gSavedSettings.getVector3("RenderGlowWarmthWeights");
+ RenderGlowResolutionPow = gSavedSettings.getS32("RenderGlowResolutionPow");
+ RenderGlowIterations = gSavedSettings.getS32("RenderGlowIterations");
+ RenderGlowWidth = gSavedSettings.getF32("RenderGlowWidth");
+ RenderGlowStrength = gSavedSettings.getF32("RenderGlowStrength");
+ RenderDepthOfField = gSavedSettings.getBOOL("RenderDepthOfField");
+ CameraFocusTransitionTime = gSavedSettings.getF32("CameraFocusTransitionTime");
+ CameraFNumber = gSavedSettings.getF32("CameraFNumber");
+ CameraFocalLength = gSavedSettings.getF32("CameraFocalLength");
+ CameraFieldOfView = gSavedSettings.getF32("CameraFieldOfView");
+ RenderShadowNoise = gSavedSettings.getF32("RenderShadowNoise");
+ RenderShadowBlurSize = gSavedSettings.getF32("RenderShadowBlurSize");
+ RenderSSAOScale = gSavedSettings.getF32("RenderSSAOScale");
+ RenderSSAOMaxScale = gSavedSettings.getU32("RenderSSAOMaxScale");
+ RenderSSAOFactor = gSavedSettings.getF32("RenderSSAOFactor");
+ RenderSSAOEffect = gSavedSettings.getVector3("RenderSSAOEffect");
+ RenderShadowOffsetError = gSavedSettings.getF32("RenderShadowOffsetError");
+ RenderShadowBiasError = gSavedSettings.getF32("RenderShadowBiasError");
+ RenderShadowOffset = gSavedSettings.getF32("RenderShadowOffset");
+ RenderShadowBias = gSavedSettings.getF32("RenderShadowBias");
+ RenderSpotShadowOffset = gSavedSettings.getF32("RenderSpotShadowOffset");
+ RenderSpotShadowBias = gSavedSettings.getF32("RenderSpotShadowBias");
+ RenderEdgeDepthCutoff = gSavedSettings.getF32("RenderEdgeDepthCutoff");
+ RenderEdgeNormCutoff = gSavedSettings.getF32("RenderEdgeNormCutoff");
+ RenderShadowGaussian = gSavedSettings.getVector3("RenderShadowGaussian");
+ RenderShadowBlurDistFactor = gSavedSettings.getF32("RenderShadowBlurDistFactor");
+ RenderDeferredAtmospheric = gSavedSettings.getBOOL("RenderDeferredAtmospheric");
+ RenderReflectionDetail = gSavedSettings.getS32("RenderReflectionDetail");
+ RenderHighlightFadeTime = gSavedSettings.getF32("RenderHighlightFadeTime");
+ RenderShadowClipPlanes = gSavedSettings.getVector3("RenderShadowClipPlanes");
+ RenderShadowOrthoClipPlanes = gSavedSettings.getVector3("RenderShadowOrthoClipPlanes");
+ RenderShadowNearDist = gSavedSettings.getVector3("RenderShadowNearDist");
+ RenderFarClip = gSavedSettings.getF32("RenderFarClip");
+ RenderShadowSplitExponent = gSavedSettings.getVector3("RenderShadowSplitExponent");
+ RenderShadowErrorCutoff = gSavedSettings.getF32("RenderShadowErrorCutoff");
+ RenderShadowFOVCutoff = gSavedSettings.getF32("RenderShadowFOVCutoff");
+ CameraOffset = gSavedSettings.getBOOL("CameraOffset");
+}
+
void LLPipeline::releaseGLBuffers()
{
assertInitialized();
@@ -1041,7 +1192,7 @@ S32 LLPipeline::setLightingDetail(S32 level)
if (level < 0)
{
- if (gSavedSettings.getBOOL("RenderLocalLights"))
+ if (RenderLocalLights)
{
level = 1;
}
@@ -1362,7 +1513,7 @@ U32 LLPipeline::addObject(LLViewerObject *vobj)
{
LLMemType mt_ao(LLMemType::MTYPE_PIPELINE_ADD_OBJECT);
- if (gSavedSettings.getBOOL("RenderDelayCreation"))
+ if (RenderDelayCreation)
{
mCreateQ.push_back(vobj);
}
@@ -1425,7 +1576,7 @@ void LLPipeline::createObject(LLViewerObject* vobj)
markRebuild(drawablep, LLDrawable::REBUILD_ALL, TRUE);
- if (drawablep->getVOVolume() && gSavedSettings.getBOOL("RenderAnimateRes"))
+ if (drawablep->getVOVolume() && RenderAnimateRes)
{
// fun animated res
drawablep->updateXform(TRUE);
@@ -1464,7 +1615,7 @@ void LLPipeline::resetFrameStats()
//external functions for asynchronous updating
void LLPipeline::updateMoveDampedAsync(LLDrawable* drawablep)
{
- if (gSavedSettings.getBOOL("FreezeTime"))
+ if (FreezeTime)
{
return;
}
@@ -1494,7 +1645,7 @@ void LLPipeline::updateMoveDampedAsync(LLDrawable* drawablep)
void LLPipeline::updateMoveNormalAsync(LLDrawable* drawablep)
{
- if (gSavedSettings.getBOOL("FreezeTime"))
+ if (FreezeTime)
{
return;
}
@@ -1551,7 +1702,7 @@ void LLPipeline::updateMove()
LLFastTimer t(FTM_UPDATE_MOVE);
LLMemType mt_um(LLMemType::MTYPE_PIPELINE_UPDATE_MOVE);
- if (gSavedSettings.getBOOL("FreezeTime"))
+ if (FreezeTime)
{
return;
}
@@ -2911,7 +3062,7 @@ void renderScriptedBeacons(LLDrawable* drawablep)
{
if (gPipeline.sRenderBeacons)
{
- gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 0.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
+ gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 0.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), LLPipeline::DebugBeaconLineWidth);
}
if (gPipeline.sRenderHighlight)
@@ -2937,7 +3088,7 @@ void renderScriptedTouchBeacons(LLDrawable* drawablep)
{
if (gPipeline.sRenderBeacons)
{
- gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 0.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
+ gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 0.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), LLPipeline::DebugBeaconLineWidth);
}
if (gPipeline.sRenderHighlight)
@@ -2962,7 +3113,7 @@ void renderPhysicalBeacons(LLDrawable* drawablep)
{
if (gPipeline.sRenderBeacons)
{
- gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(0.f, 1.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
+ gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(0.f, 1.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), LLPipeline::DebugBeaconLineWidth);
}
if (gPipeline.sRenderHighlight)
@@ -2998,7 +3149,7 @@ void renderMOAPBeacons(LLDrawable* drawablep)
{
if (gPipeline.sRenderBeacons)
{
- gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 1.f, 1.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
+ gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(1.f, 1.f, 1.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), LLPipeline::DebugBeaconLineWidth);
}
if (gPipeline.sRenderHighlight)
@@ -3023,7 +3174,7 @@ void renderParticleBeacons(LLDrawable* drawablep)
if (gPipeline.sRenderBeacons)
{
LLColor4 light_blue(0.5f, 0.5f, 1.f, 0.5f);
- gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", light_blue, LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
+ gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", light_blue, LLColor4(1.f, 1.f, 1.f, 0.5f), LLPipeline::DebugBeaconLineWidth);
}
if (gPipeline.sRenderHighlight)
@@ -3216,7 +3367,7 @@ void LLPipeline::postSort(LLCamera& camera)
if (gPipeline.sRenderBeacons)
{
//pos += LLVector3(0.f, 0.f, 0.2f);
- gObjectList.addDebugBeacon(pos, "", LLColor4(1.f, 1.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth"));
+ gObjectList.addDebugBeacon(pos, "", LLColor4(1.f, 1.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), DebugBeaconLineWidth);
}
}
// now deal with highlights for all those seeable sound sources
@@ -3281,7 +3432,7 @@ void render_hud_elements()
if (!LLPipeline::sReflectionRender && gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
{
- LLGLEnable multisample(gSavedSettings.getU32("RenderFSAASamples") > 0 ? GL_MULTISAMPLE_ARB : 0);
+ LLGLEnable multisample(LLPipeline::RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
gViewerWindow->renderSelections(FALSE, FALSE, FALSE); // For HUD version in render_ui_3d()
// Draw the tracking overlays
@@ -3368,9 +3519,9 @@ void LLPipeline::renderHighlights()
gGL.begin(LLRender::TRIANGLES);
- F32 scale = gSavedSettings.getF32("RenderHighlightBrightness");
- LLColor4 color = gSavedSettings.getColor4("RenderHighlightColor");
- F32 thickness = gSavedSettings.getF32("RenderHighlightThickness");
+ F32 scale = RenderHighlightBrightness;
+ LLColor4 color = RenderHighlightColor;
+ F32 thickness = RenderHighlightThickness;
for (S32 pass = 0; pass < 2; ++pass)
{
@@ -3425,7 +3576,7 @@ void LLPipeline::renderHighlights()
if ((LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0))
{
gHighlightProgram.bind();
- gHighlightProgram.uniform4f("highlight_color",1,1,1,0.5f);
+ gHighlightProgram.uniform4f(LLShaderMgr::HIGHLIGHT_COLOR,1,1,1,0.5f);
}
if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED))
@@ -3457,7 +3608,7 @@ void LLPipeline::renderHighlights()
color.setVec(1.f, 0.f, 0.f, 0.5f);
if ((LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0))
{
- gHighlightProgram.uniform4f("highlight_color",1,0,0,0.5f);
+ gHighlightProgram.uniform4f(LLShaderMgr::HIGHLIGHT_COLOR,1,0,0,0.5f);
}
int count = mHighlightFaces.size();
for (S32 i = 0; i < count; i++)
@@ -3530,7 +3681,7 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
gGL.matrixMode(LLRender::MM_MODELVIEW);
LLGLSPipeline gls_pipeline;
- LLGLEnable multisample(gSavedSettings.getU32("RenderFSAASamples") > 0 ? GL_MULTISAMPLE_ARB : 0);
+ LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
LLGLState gls_color_material(GL_COLOR_MATERIAL, mLightingDetail < 2);
@@ -3755,7 +3906,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
}
}
- LLGLEnable multisample(gSavedSettings.getU32("RenderFSAASamples") > 0 ? GL_MULTISAMPLE_ARB : 0);
+ LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
LLVertexBuffer::unbind();
@@ -3836,7 +3987,7 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
LLGLEnable cull(GL_CULL_FACE);
- LLGLEnable multisample(gSavedSettings.getU32("RenderFSAASamples") > 0 ? GL_MULTISAMPLE_ARB : 0);
+ LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
calcNearbyLights(camera);
setupHWLights(NULL);
@@ -5051,8 +5202,9 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
light_state->setQuadraticAttenuation(0.f);
}
+
if (light->isLightSpotlight() // directional (spot-)light
- && (LLPipeline::sRenderDeferred || gSavedSettings.getBOOL("RenderSpotLightsInNondeferred"))) // these are only rendered as GL spotlights if we're in deferred rendering mode *or* the setting forces them on
+ && (LLPipeline::sRenderDeferred || RenderSpotLightsInNondeferred)) // these are only rendered as GL spotlights if we're in deferred rendering mode *or* the setting forces them on
{
LLVector3 spotparams = light->getSpotLightParams();
LLQuaternion quat = light->getRenderRotation();
@@ -5233,19 +5385,19 @@ void LLPipeline::enableLightsPreview()
glEnable(GL_LIGHTING);
}
- LLColor4 ambient = gSavedSettings.getColor4("PreviewAmbientColor");
+ LLColor4 ambient = PreviewAmbientColor;
gGL.setAmbientLightColor(ambient);
- LLColor4 diffuse0 = gSavedSettings.getColor4("PreviewDiffuse0");
- LLColor4 specular0 = gSavedSettings.getColor4("PreviewSpecular0");
- LLColor4 diffuse1 = gSavedSettings.getColor4("PreviewDiffuse1");
- LLColor4 specular1 = gSavedSettings.getColor4("PreviewSpecular1");
- LLColor4 diffuse2 = gSavedSettings.getColor4("PreviewDiffuse2");
- LLColor4 specular2 = gSavedSettings.getColor4("PreviewSpecular2");
+ LLColor4 diffuse0 = PreviewDiffuse0;
+ LLColor4 specular0 = PreviewSpecular0;
+ LLColor4 diffuse1 = PreviewDiffuse1;
+ LLColor4 specular1 = PreviewSpecular1;
+ LLColor4 diffuse2 = PreviewDiffuse2;
+ LLColor4 specular2 = PreviewSpecular2;
- LLVector3 dir0 = gSavedSettings.getVector3("PreviewDirection0");
- LLVector3 dir1 = gSavedSettings.getVector3("PreviewDirection1");
- LLVector3 dir2 = gSavedSettings.getVector3("PreviewDirection2");
+ LLVector3 dir0 = PreviewDirection0;
+ LLVector3 dir1 = PreviewDirection1;
+ LLVector3 dir2 = PreviewDirection2;
dir0.normVec();
dir1.normVec();
@@ -6085,7 +6237,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
}
- U32 res_mod = gSavedSettings.getU32("RenderResolutionDivisor");
+ U32 res_mod = RenderResolutionDivisor;
LLVector2 tc1(0,0);
LLVector2 tc2((F32) gViewerWindow->getWorldViewWidthRaw()*2,
@@ -6124,16 +6276,18 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
}
gGlowExtractProgram.bind();
- F32 minLum = llmax(gSavedSettings.getF32("RenderGlowMinLuminance"), 0.0f);
- F32 maxAlpha = gSavedSettings.getF32("RenderGlowMaxExtractAlpha");
- F32 warmthAmount = gSavedSettings.getF32("RenderGlowWarmthAmount");
- LLVector3 lumWeights = gSavedSettings.getVector3("RenderGlowLumWeights");
- LLVector3 warmthWeights = gSavedSettings.getVector3("RenderGlowWarmthWeights");
- gGlowExtractProgram.uniform1f("minLuminance", minLum);
- gGlowExtractProgram.uniform1f("maxExtractAlpha", maxAlpha);
- gGlowExtractProgram.uniform3f("lumWeights", lumWeights.mV[0], lumWeights.mV[1], lumWeights.mV[2]);
- gGlowExtractProgram.uniform3f("warmthWeights", warmthWeights.mV[0], warmthWeights.mV[1], warmthWeights.mV[2]);
- gGlowExtractProgram.uniform1f("warmthAmount", warmthAmount);
+ F32 minLum = llmax((F32) RenderGlowMinLuminance, 0.0f);
+ F32 maxAlpha = RenderGlowMaxExtractAlpha;
+ F32 warmthAmount = RenderGlowWarmthAmount;
+ LLVector3 lumWeights = RenderGlowLumWeights;
+ LLVector3 warmthWeights = RenderGlowWarmthWeights;
+
+
+ gGlowExtractProgram.uniform1f(LLShaderMgr::GLOW_MIN_LUMINANCE, minLum);
+ gGlowExtractProgram.uniform1f(LLShaderMgr::GLOW_MAX_EXTRACT_ALPHA, maxAlpha);
+ gGlowExtractProgram.uniform3f(LLShaderMgr::GLOW_LUM_WEIGHTS, lumWeights.mV[0], lumWeights.mV[1], lumWeights.mV[2]);
+ gGlowExtractProgram.uniform3f(LLShaderMgr::GLOW_WARMTH_WEIGHTS, warmthWeights.mV[0], warmthWeights.mV[1], warmthWeights.mV[2]);
+ gGlowExtractProgram.uniform1f(LLShaderMgr::GLOW_WARMTH_AMOUNT, warmthAmount);
LLGLEnable blend_on(GL_BLEND);
LLGLEnable test(GL_ALPHA_TEST);
@@ -6164,22 +6318,22 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
tc2.setVec(2,2);
// power of two between 1 and 1024
- U32 glowResPow = gSavedSettings.getS32("RenderGlowResolutionPow");
+ U32 glowResPow = RenderGlowResolutionPow;
const U32 glow_res = llmax(1,
llmin(1024, 1 << glowResPow));
- S32 kernel = gSavedSettings.getS32("RenderGlowIterations")*2;
- F32 delta = gSavedSettings.getF32("RenderGlowWidth") / glow_res;
+ S32 kernel = RenderGlowIterations*2;
+ F32 delta = RenderGlowWidth / glow_res;
// Use half the glow width if we have the res set to less than 9 so that it looks
// almost the same in either case.
if (glowResPow < 9)
{
delta *= 0.5f;
}
- F32 strength = gSavedSettings.getF32("RenderGlowStrength");
+ F32 strength = RenderGlowStrength;
gGlowProgram.bind();
- gGlowProgram.uniform1f("glowStrength", strength);
+ gGlowProgram.uniform1f(LLShaderMgr::GLOW_STRENGTH, strength);
for (S32 i = 0; i < kernel; i++)
{
@@ -6200,11 +6354,11 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
if (i%2 == 0)
{
- gGlowProgram.uniform2f("glowDelta", delta, 0);
+ gGlowProgram.uniform2f(LLShaderMgr::GLOW_DELTA, delta, 0);
}
else
{
- gGlowProgram.uniform2f("glowDelta", 0, delta);
+ gGlowProgram.uniform2f(LLShaderMgr::GLOW_DELTA, 0, delta);
}
gGL.begin(LLRender::TRIANGLE_STRIP);
@@ -6245,11 +6399,13 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
if (LLPipeline::sRenderDeferred)
{
+
bool dof_enabled = !LLViewerCamera::getInstance()->cameraUnderWater() &&
!LLToolMgr::getInstance()->inBuildMode() &&
- gSavedSettings.getBOOL("RenderDepthOfField");
+ RenderDepthOfField;
+
- bool multisample = gSavedSettings.getU32("RenderFSAASamples") > 1;
+ bool multisample = RenderFSAASamples > 1;
if (multisample)
{
@@ -6261,7 +6417,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
glViewport(0, 0, width, height);
gGlowCombineFXAAProgram.bind();
- gGlowCombineFXAAProgram.uniform2f("screen_res", width, height);
+ gGlowCombineFXAAProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, width, height);
gGL.getTexUnit(0)->bind(&mGlow[1]);
gGL.getTexUnit(1)->bind(&mScreen);
@@ -6284,7 +6440,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
LLGLSLShader* shader = &gFXAAProgram;
shader->bind();
- S32 channel = shader->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP, mFXAABuffer.getUsage());
+ S32 channel = shader->enableTexture(LLShaderMgr::DIFFUSE_MAP, mFXAABuffer.getUsage());
if (channel > -1)
{
mFXAABuffer.bindTexture(0, channel);
@@ -6294,10 +6450,10 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
F32 scale_x = (F32) width/mFXAABuffer.getWidth();
F32 scale_y = (F32) height/mFXAABuffer.getHeight();
- shader->uniform2f("tc_scale", scale_x, scale_y);
- shader->uniform2f("rcp_screen_res", 1.f/width*scale_x, 1.f/height*scale_y);
- shader->uniform4f("rcp_frame_opt", -0.5f/width*scale_x, -0.5f/height*scale_y, 0.5f/width*scale_x, 0.5f/height*scale_y);
- shader->uniform4f("rcp_frame_opt2", -2.f/width*scale_x, -2.f/height*scale_y, 2.f/width*scale_x, 2.f/height*scale_y);
+ shader->uniform2f(LLShaderMgr::FXAA_TC_SCALE, scale_x, scale_y);
+ shader->uniform2f(LLShaderMgr::FXAA_RCP_SCREEN_RES, 1.f/width*scale_x, 1.f/height*scale_y);
+ shader->uniform4f(LLShaderMgr::FXAA_RCP_FRAME_OPT, -0.5f/width*scale_x, -0.5f/height*scale_y, 0.5f/width*scale_x, 0.5f/height*scale_y);
+ shader->uniform4f(LLShaderMgr::FXAA_RCP_FRAME_OPT2, -2.f/width*scale_x, -2.f/height*scale_y, 2.f/width*scale_x, 2.f/height*scale_y);
gGL.begin(LLRender::TRIANGLE_STRIP);
gGL.vertex2f(-1,-1);
@@ -6391,7 +6547,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
}
else if (transition_time < 1.f)
{ //currently in a transition, continue interpolating
- transition_time += 1.f/gSavedSettings.getF32("CameraFocusTransitionTime")*gFrameIntervalSeconds;
+ transition_time += 1.f/CameraFocusTransitionTime*gFrameIntervalSeconds;
transition_time = llmin(transition_time, 1.f);
F32 t = cosf(transition_time*F_PI+F_PI)*0.5f+0.5f;
@@ -6404,12 +6560,12 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
//convert to mm
F32 subject_distance = current_distance*1000.f;
- F32 fnumber = gSavedSettings.getF32("CameraFNumber");
- F32 default_focal_length = gSavedSettings.getF32("CameraFocalLength");
+ F32 fnumber = CameraFNumber;
+ F32 default_focal_length = CameraFocalLength;
F32 fov = LLViewerCamera::getInstance()->getView();
- const F32 default_fov = gSavedSettings.getF32("CameraFieldOfView") * F_PI/180.f;
+ const F32 default_fov = CameraFieldOfView * F_PI/180.f;
//const F32 default_aspect_ratio = gSavedSettings.getF32("CameraAspectRatio");
//F32 aspect_ratio = (F32) mScreen.getWidth()/(F32)mScreen.getHeight();
@@ -6432,13 +6588,13 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
blur_constant /= 1000.f; //convert to meters for shader
F32 magnification = focal_length/(subject_distance-focal_length);
- shader->uniform1f("focal_distance", -subject_distance/1000.f);
- shader->uniform1f("blur_constant", blur_constant);
- shader->uniform1f("tan_pixel_angle", tanf(1.f/LLDrawable::sCurPixelAngle));
- shader->uniform1f("magnification", magnification);
+ shader->uniform1f(LLShaderMgr::DOF_FOCAL_DISTANCE, -subject_distance/1000.f);
+ shader->uniform1f(LLShaderMgr::DOF_BLUR_CONSTANT, blur_constant);
+ shader->uniform1f(LLShaderMgr::DOF_TAN_PIXEL_ANGLE, tanf(1.f/LLDrawable::sCurPixelAngle));
+ shader->uniform1f(LLShaderMgr::DOF_MAGNIFICATION, magnification);
}
- S32 channel = shader->enableTexture(LLViewerShaderMgr::DEFERRED_DIFFUSE, mScreen.getUsage());
+ S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mScreen.getUsage());
if (channel > -1)
{
mScreen.bindTexture(0, channel);
@@ -6446,7 +6602,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
if (multisample)
{ //bloom has already been added, bind black
- channel = shader->enableTexture(LLViewerShaderMgr::DEFERRED_BLOOM);
+ channel = shader->enableTexture(LLShaderMgr::DEFERRED_BLOOM);
if (channel > -1)
{
gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sBlackImagep);
@@ -6519,7 +6675,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
gGL.getTexUnit(0)->bind(&mGlow[1]);
gGL.getTexUnit(1)->bind(&mScreen);
- LLGLEnable multisample(gSavedSettings.getU32("RenderFSAASamples") > 0 ? GL_MULTISAMPLE_ARB : 0);
+ LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
buff->setBuffer(mask);
buff->drawArrays(LLRender::TRIANGLE_STRIP, 0, 3);
@@ -6611,28 +6767,28 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n
shader.bind();
S32 channel = 0;
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_DIFFUSE, mDeferredScreen.getUsage());
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mDeferredScreen.getUsage());
if (channel > -1)
{
mDeferredScreen.bindTexture(0,channel);
gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_SPECULAR, mDeferredScreen.getUsage());
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_SPECULAR, mDeferredScreen.getUsage());
if (channel > -1)
{
mDeferredScreen.bindTexture(1, channel);
gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_NORMAL, mDeferredScreen.getUsage());
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_NORMAL, mDeferredScreen.getUsage());
if (channel > -1)
{
mDeferredScreen.bindTexture(2, channel);
gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_DEPTH, mDeferredDepth.getUsage());
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_DEPTH, mDeferredDepth.getUsage());
if (channel > -1)
{
gGL.getTexUnit(channel)->bind(&mDeferredDepth, TRUE);
@@ -6646,21 +6802,21 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n
glh::matrix4f projection = glh_get_current_projection();
glh::matrix4f inv_proj = projection.inverse();
- shader.uniformMatrix4fv("inv_proj", 1, FALSE, inv_proj.m);
- shader.uniform4f("viewport", (F32) gGLViewport[0],
+ shader.uniformMatrix4fv(LLShaderMgr::INVERSE_PROJECTION_MATRIX, 1, FALSE, inv_proj.m);
+ shader.uniform4f(LLShaderMgr::VIEWPORT, (F32) gGLViewport[0],
(F32) gGLViewport[1],
(F32) gGLViewport[2],
(F32) gGLViewport[3]);
}
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_NOISE);
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_NOISE);
if (channel > -1)
{
gGL.getTexUnit(channel)->bindManual(LLTexUnit::TT_TEXTURE, noise_map);
gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_LIGHTFUNC);
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_LIGHTFUNC);
if (channel > -1)
{
gGL.getTexUnit(channel)->bindManual(LLTexUnit::TT_TEXTURE, mLightFunc);
@@ -6668,7 +6824,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n
stop_glerror();
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_LIGHT, mDeferredLight.getUsage());
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_LIGHT, mDeferredLight.getUsage());
if (channel > -1)
{
if (light_index > 0)
@@ -6682,7 +6838,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n
gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_BLOOM);
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_BLOOM);
if (channel > -1)
{
mGlow[1].bindTexture(0, channel);
@@ -6692,7 +6848,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n
for (U32 i = 0; i < 4; i++)
{
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_SHADOW0+i, LLTexUnit::TT_RECT_TEXTURE);
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_SHADOW0+i, LLTexUnit::TT_RECT_TEXTURE);
stop_glerror();
if (channel > -1)
{
@@ -6710,7 +6866,7 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n
for (U32 i = 4; i < 6; i++)
{
- channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_SHADOW0+i);
+ channel = shader.enableTexture(LLShaderMgr::DEFERRED_SHADOW0+i);
stop_glerror();
if (channel > -1)
{
@@ -6739,12 +6895,11 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n
mat[i+80] = mSunShadowMatrix[5].m[i];
}
- shader.uniformMatrix4fv("shadow_matrix[0]", 6, FALSE, mat);
- shader.uniformMatrix4fv("shadow_matrix", 6, FALSE, mat);
+ shader.uniformMatrix4fv(LLShaderMgr::DEFERRED_SHADOW_MATRIX, 6, FALSE, mat);
stop_glerror();
- channel = shader.enableTexture(LLViewerShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
+ channel = shader.enableTexture(LLShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
if (channel > -1)
{
LLCubeMap* cube_map = gSky.mVOSkyp ? gSky.mVOSkyp->getCubeMap() : NULL;
@@ -6759,24 +6914,23 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n
m[4], m[5], m[6],
m[8], m[9], m[10] };
- shader.uniform3fv("env_mat[0]", 3, mat);
- shader.uniform3fv("env_mat", 3, mat);
+ shader.uniform3fv(LLShaderMgr::DEFERRED_ENV_MAT, 3, mat);
}
}
- shader.uniform4fv("shadow_clip", 1, mSunClipPlanes.mV);
- shader.uniform1f("sun_wash", gSavedSettings.getF32("RenderDeferredSunWash"));
- shader.uniform1f("shadow_noise", gSavedSettings.getF32("RenderShadowNoise"));
- shader.uniform1f("blur_size", gSavedSettings.getF32("RenderShadowBlurSize"));
+ shader.uniform4fv(LLShaderMgr::DEFERRED_SHADOW_CLIP, 1, mSunClipPlanes.mV);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SUN_WASH, RenderDeferredSunWash);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SHADOW_NOISE, RenderShadowNoise);
+ shader.uniform1f(LLShaderMgr::DEFERRED_BLUR_SIZE, RenderShadowBlurSize);
- shader.uniform1f("ssao_radius", gSavedSettings.getF32("RenderSSAOScale"));
- shader.uniform1f("ssao_max_radius", gSavedSettings.getU32("RenderSSAOMaxScale"));
+ shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_RADIUS, RenderSSAOScale);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_MAX_RADIUS, RenderSSAOMaxScale);
- F32 ssao_factor = gSavedSettings.getF32("RenderSSAOFactor");
- shader.uniform1f("ssao_factor", ssao_factor);
- shader.uniform1f("ssao_factor_inv", 1.0/ssao_factor);
+ F32 ssao_factor = RenderSSAOFactor;
+ shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_FACTOR, ssao_factor);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SSAO_FACTOR_INV, 1.0/ssao_factor);
- LLVector3 ssao_effect = gSavedSettings.getVector3("RenderSSAOEffect");
+ LLVector3 ssao_effect = RenderSSAOEffect;
F32 matrix_diag = (ssao_effect[0] + 2.0*ssao_effect[1])/3.0;
F32 matrix_nondiag = (ssao_effect[0] - ssao_effect[1])/3.0;
// This matrix scales (proj of color onto <1/rt(3),1/rt(3),1/rt(3)>) by
@@ -6784,23 +6938,23 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, U32 n
F32 ssao_effect_mat[] = { matrix_diag, matrix_nondiag, matrix_nondiag,
matrix_nondiag, matrix_diag, matrix_nondiag,
matrix_nondiag, matrix_nondiag, matrix_diag};
- shader.uniformMatrix3fv("ssao_effect_mat", 1, GL_FALSE, ssao_effect_mat);
-
- F32 shadow_offset_error = 1.f + gSavedSettings.getF32("RenderShadowOffsetError") * fabsf(LLViewerCamera::getInstance()->getOrigin().mV[2]);
- F32 shadow_bias_error = 1.f + gSavedSettings.getF32("RenderShadowBiasError") * fabsf(LLViewerCamera::getInstance()->getOrigin().mV[2]);
-
- shader.uniform2f("screen_res", mDeferredScreen.getWidth(), mDeferredScreen.getHeight());
- shader.uniform1f("near_clip", LLViewerCamera::getInstance()->getNear()*2.f);
- shader.uniform1f ("shadow_offset", gSavedSettings.getF32("RenderShadowOffset")*shadow_offset_error);
- shader.uniform1f("shadow_bias", gSavedSettings.getF32("RenderShadowBias")*shadow_bias_error);
- shader.uniform1f ("spot_shadow_offset", gSavedSettings.getF32("RenderSpotShadowOffset"));
- shader.uniform1f("spot_shadow_bias", gSavedSettings.getF32("RenderSpotShadowBias"));
-
- shader.uniform3fv("sun_dir", 1, mTransformedSunDir.mV);
- shader.uniform2f("shadow_res", mShadow[0].getWidth(), mShadow[0].getHeight());
- shader.uniform2f("proj_shadow_res", mShadow[4].getWidth(), mShadow[4].getHeight());
- shader.uniform1f("depth_cutoff", gSavedSettings.getF32("RenderEdgeDepthCutoff"));
- shader.uniform1f("norm_cutoff", gSavedSettings.getF32("RenderEdgeNormCutoff"));
+ shader.uniformMatrix3fv(LLShaderMgr::DEFERRED_SSAO_EFFECT_MAT, 1, GL_FALSE, ssao_effect_mat);
+
+ F32 shadow_offset_error = 1.f + RenderShadowOffsetError * fabsf(LLViewerCamera::getInstance()->getOrigin().mV[2]);
+ F32 shadow_bias_error = 1.f + RenderShadowBiasError * fabsf(LLViewerCamera::getInstance()->getOrigin().mV[2]);
+
+ shader.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, mDeferredScreen.getWidth(), mDeferredScreen.getHeight());
+ shader.uniform1f(LLShaderMgr::DEFERRED_NEAR_CLIP, LLViewerCamera::getInstance()->getNear()*2.f);
+ shader.uniform1f (LLShaderMgr::DEFERRED_SHADOW_OFFSET, RenderShadowOffset*shadow_offset_error);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SHADOW_BIAS, RenderShadowBias*shadow_bias_error);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SPOT_SHADOW_OFFSET, RenderSpotShadowOffset);
+ shader.uniform1f(LLShaderMgr::DEFERRED_SPOT_SHADOW_BIAS, RenderSpotShadowBias);
+
+ shader.uniform3fv(LLShaderMgr::DEFERRED_SUN_DIR, 1, mTransformedSunDir.mV);
+ shader.uniform2f(LLShaderMgr::DEFERRED_SHADOW_RES, mShadow[0].getWidth(), mShadow[0].getHeight());
+ shader.uniform2f(LLShaderMgr::DEFERRED_PROJ_SHADOW_RES, mShadow[4].getWidth(), mShadow[4].getHeight());
+ shader.uniform1f(LLShaderMgr::DEFERRED_DEPTH_CUTOFF, RenderEdgeDepthCutoff);
+ shader.uniform1f(LLShaderMgr::DEFERRED_NORM_CUTOFF, RenderEdgeNormCutoff);
if (shader.getUniformLocation("norm_mat") >= 0)
@@ -6839,7 +6993,7 @@ void LLPipeline::renderDeferredLighting()
0, 0, mDeferredDepth.getWidth(), mDeferredDepth.getHeight(), GL_DEPTH_BUFFER_BIT, GL_NEAREST);
}
- LLGLEnable multisample(gSavedSettings.getU32("RenderFSAASamples") > 0 ? GL_MULTISAMPLE_ARB : 0);
+ LLGLEnable multisample(RenderFSAASamples > 0 ? GL_MULTISAMPLE_ARB : 0);
if (gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_HUD))
{
@@ -6886,7 +7040,7 @@ void LLPipeline::renderDeferredLighting()
gGL.pushMatrix();
gGL.loadIdentity();
- if (gSavedSettings.getBOOL("RenderDeferredSSAO") || gSavedSettings.getS32("RenderShadowDetail") > 0)
+ if (RenderDeferredSSAO || RenderShadowDetail > 0)
{
mDeferredLight.bindTarget();
{ //paint shadow/SSAO light map (direct lighting lightmap)
@@ -6932,7 +7086,7 @@ void LLPipeline::renderDeferredLighting()
mDeferredLight.flush();
}
- if (gSavedSettings.getBOOL("RenderDeferredSSAO"))
+ if (RenderDeferredSSAO)
{ //soften direct lighting lightmap
LLFastTimer ftm(FTM_SOFTEN_SHADOW);
//blur lightmap
@@ -6943,10 +7097,10 @@ void LLPipeline::renderDeferredLighting()
bindDeferredShader(gDeferredBlurLightProgram);
mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
- LLVector3 go = gSavedSettings.getVector3("RenderShadowGaussian");
+ LLVector3 go = RenderShadowGaussian;
const U32 kern_length = 4;
- F32 blur_size = gSavedSettings.getF32("RenderShadowBlurSize");
- F32 dist_factor = gSavedSettings.getF32("RenderShadowBlurDistFactor");
+ F32 blur_size = RenderShadowBlurSize;
+ F32 dist_factor = RenderShadowBlurDistFactor;
// sample symmetrically with the middle sample falling exactly on 0.0
F32 x = 0.f;
@@ -7011,7 +7165,7 @@ void LLPipeline::renderDeferredLighting()
glClearColor(0,0,0,0);
mScreen.clear(GL_COLOR_BUFFER_BIT);
- if (gSavedSettings.getBOOL("RenderDeferredAtmospheric"))
+ if (RenderDeferredAtmospheric)
{ //apply sunlight contribution
LLFastTimer ftm(FTM_ATMOSPHERICS);
bindDeferredShader(gDeferredSoftenProgram);
@@ -7056,7 +7210,7 @@ void LLPipeline::renderDeferredLighting()
gPipeline.popRenderTypeMask();
}
- BOOL render_local = gSavedSettings.getBOOL("RenderLocalLights");
+ BOOL render_local = RenderLocalLights;
if (render_local)
{
@@ -7162,10 +7316,10 @@ void LLPipeline::renderDeferredLighting()
LLFastTimer ftm(FTM_LOCAL_LIGHTS);
//glTexCoord4f(tc.v[0], tc.v[1], tc.v[2], s*s);
- gDeferredLightProgram.uniform3fv("center", 1, tc.v);
- gDeferredLightProgram.uniform1f("size", s*s);
- gDeferredLightProgram.uniform3fv("color", 1, col.mV);
- gDeferredLightProgram.uniform1f("falloff", volume->getLightFalloff()*0.5f);
+ gDeferredLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, tc.v);
+ gDeferredLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s*s);
+ gDeferredLightProgram.uniform3fv(LLShaderMgr::DIFFUSE_COLOR, 1, col.mV);
+ gDeferredLightProgram.uniform1f(LLShaderMgr::LIGHT_FALLOFF, volume->getLightFalloff()*0.5f);
//gGL.diffuseColor4f(col.mV[0], col.mV[1], col.mV[2], volume->getLightFalloff()*0.5f);
gGL.syncMatrices();
mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
@@ -7197,7 +7351,7 @@ void LLPipeline::renderDeferredLighting()
mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
- gDeferredSpotLightProgram.enableTexture(LLViewerShaderMgr::DEFERRED_PROJECTION);
+ gDeferredSpotLightProgram.enableTexture(LLShaderMgr::DEFERRED_PROJECTION);
for (LLDrawable::drawable_list_t::iterator iter = spot_lights.begin(); iter != spot_lights.end(); ++iter)
{
@@ -7236,16 +7390,16 @@ void LLPipeline::renderDeferredLighting()
v[6].set(c[0]+s,c[1]+s,c[2]-s); // 6 - 0110
v[7].set(c[0]+s,c[1]+s,c[2]+s); // 7 - 0111
- gDeferredSpotLightProgram.uniform3fv("center", 1, tc.v);
- gDeferredSpotLightProgram.uniform1f("size", s*s);
- gDeferredSpotLightProgram.uniform3fv("color", 1, col.mV);
- gDeferredSpotLightProgram.uniform1f("falloff", volume->getLightFalloff()*0.5f);
+ gDeferredSpotLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, tc.v);
+ gDeferredSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s*s);
+ gDeferredSpotLightProgram.uniform3fv(LLShaderMgr::DIFFUSE_COLOR, 1, col.mV);
+ gDeferredSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_FALLOFF, volume->getLightFalloff()*0.5f);
gGL.syncMatrices();
mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
glDrawRangeElements(GL_TRIANGLE_FAN, 0, 7, 8,
GL_UNSIGNED_SHORT, get_box_fan_indices_ptr(camera, center));
}
- gDeferredSpotLightProgram.disableTexture(LLViewerShaderMgr::DEFERRED_PROJECTION);
+ gDeferredSpotLightProgram.disableTexture(LLShaderMgr::DEFERRED_PROJECTION);
unbindDeferredShader(gDeferredSpotLightProgram);
}
@@ -7292,12 +7446,12 @@ void LLPipeline::renderDeferredLighting()
count++;
if (count == max_count || fullscreen_lights.empty())
{
- gDeferredMultiLightProgram.uniform1i("light_count", count);
- gDeferredMultiLightProgram.uniform4fv("light", count, (GLfloat*) light);
- gDeferredMultiLightProgram.uniform4fv("light_col", count, (GLfloat*) col);
- gDeferredMultiLightProgram.uniform1f("far_z", far_z);
+ gDeferredMultiLightProgram.uniform1i(LLShaderMgr::MULTI_LIGHT_COUNT, count);
+ gDeferredMultiLightProgram.uniform4fv(LLShaderMgr::MULTI_LIGHT, count, (GLfloat*) light);
+ gDeferredMultiLightProgram.uniform4fv(LLShaderMgr::MULTI_LIGHT_COL, count, (GLfloat*) col);
+ gDeferredMultiLightProgram.uniform1f(LLShaderMgr::MULTI_LIGHT_FAR_Z, far_z);
far_z = 0.f;
- count = 0;
+ count = 0;
mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3);
}
}
@@ -7306,7 +7460,7 @@ void LLPipeline::renderDeferredLighting()
bindDeferredShader(gDeferredMultiSpotLightProgram);
- gDeferredMultiSpotLightProgram.enableTexture(LLViewerShaderMgr::DEFERRED_PROJECTION);
+ gDeferredMultiSpotLightProgram.enableTexture(LLShaderMgr::DEFERRED_PROJECTION);
mDeferredVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
@@ -7331,14 +7485,14 @@ void LLPipeline::renderDeferredLighting()
LLColor3 col = volume->getLightColor();
col *= volume->getLightIntensity();
- gDeferredMultiSpotLightProgram.uniform3fv("center", 1, tc.v);
- gDeferredMultiSpotLightProgram.uniform1f("size", s*s);
- gDeferredMultiSpotLightProgram.uniform3fv("color", 1, col.mV);
- gDeferredMultiSpotLightProgram.uniform1f("falloff", volume->getLightFalloff()*0.5f);
+ gDeferredMultiSpotLightProgram.uniform3fv(LLShaderMgr::LIGHT_CENTER, 1, tc.v);
+ gDeferredMultiSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_SIZE, s*s);
+ gDeferredMultiSpotLightProgram.uniform3fv(LLShaderMgr::DIFFUSE_COLOR, 1, col.mV);
+ gDeferredMultiSpotLightProgram.uniform1f(LLShaderMgr::LIGHT_FALLOFF, volume->getLightFalloff()*0.5f);
mDeferredVB->drawArrays(LLRender::TRIANGLES, 0, 3);
}
- gDeferredMultiSpotLightProgram.disableTexture(LLViewerShaderMgr::DEFERRED_PROJECTION);
+ gDeferredMultiSpotLightProgram.disableTexture(LLShaderMgr::DEFERRED_PROJECTION);
unbindDeferredShader(gDeferredMultiSpotLightProgram);
gGL.popMatrix();
@@ -7463,13 +7617,13 @@ void LLPipeline::setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep)
F32 proj_range = far_clip - near_clip;
glh::matrix4f light_proj = gl_perspective(fovy, aspect, near_clip, far_clip);
screen_to_light = trans * light_proj * screen_to_light;
- shader.uniformMatrix4fv("proj_mat", 1, FALSE, screen_to_light.m);
- shader.uniform1f("proj_near", near_clip);
- shader.uniform3fv("proj_p", 1, p1.v);
- shader.uniform3fv("proj_n", 1, n.v);
- shader.uniform3fv("proj_origin", 1, screen_origin.v);
- shader.uniform1f("proj_range", proj_range);
- shader.uniform1f("proj_ambiance", params.mV[2]);
+ shader.uniformMatrix4fv(LLShaderMgr::PROJECTOR_MATRIX, 1, FALSE, screen_to_light.m);
+ shader.uniform1f(LLShaderMgr::PROJECTOR_NEAR, near_clip);
+ shader.uniform3fv(LLShaderMgr::PROJECTOR_P, 1, p1.v);
+ shader.uniform3fv(LLShaderMgr::PROJECTOR_N, 1, n.v);
+ shader.uniform3fv(LLShaderMgr::PROJECTOR_ORIGIN, 1, screen_origin.v);
+ shader.uniform1f(LLShaderMgr::PROJECTOR_RANGE, proj_range);
+ shader.uniform1f(LLShaderMgr::PROJECTOR_AMBIANCE, params.mV[2]);
S32 s_idx = -1;
for (U32 i = 0; i < 2; i++)
@@ -7480,15 +7634,15 @@ void LLPipeline::setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep)
}
}
- shader.uniform1i("proj_shadow_idx", s_idx);
+ shader.uniform1i(LLShaderMgr::PROJECTOR_SHADOW_INDEX, s_idx);
if (s_idx >= 0)
{
- shader.uniform1f("shadow_fade", 1.f-mSpotLightFade[s_idx]);
+ shader.uniform1f(LLShaderMgr::PROJECTOR_SHADOW_FADE, 1.f-mSpotLightFade[s_idx]);
}
else
{
- shader.uniform1f("shadow_fade", 1.f);
+ shader.uniform1f(LLShaderMgr::PROJECTOR_SHADOW_FADE, 1.f);
}
{
@@ -7522,7 +7676,7 @@ void LLPipeline::setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep)
img = LLViewerFetchedTexture::sWhiteImagep;
}
- S32 channel = shader.enableTexture(LLViewerShaderMgr::DEFERRED_PROJECTION);
+ S32 channel = shader.enableTexture(LLShaderMgr::DEFERRED_PROJECTION);
if (channel > -1)
{
@@ -7532,9 +7686,9 @@ void LLPipeline::setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep)
F32 lod_range = logf(img->getWidth())/logf(2.f);
- shader.uniform1f("proj_focus", focus);
- shader.uniform1f("proj_lod", lod_range);
- shader.uniform1f("proj_ambient_lod", llclamp((proj_range-focus)/proj_range*lod_range, 0.f, 1.f));
+ shader.uniform1f(LLShaderMgr::PROJECTOR_FOCUS, focus);
+ shader.uniform1f(LLShaderMgr::PROJECTOR_LOD, lod_range);
+ shader.uniform1f(LLShaderMgr::PROJECTOR_AMBIENT_LOD, llclamp((proj_range-focus)/proj_range*lod_range, 0.f, 1.f));
}
}
@@ -7543,17 +7697,17 @@ void LLPipeline::setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep)
void LLPipeline::unbindDeferredShader(LLGLSLShader &shader)
{
stop_glerror();
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_NORMAL, mDeferredScreen.getUsage());
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_DIFFUSE, mDeferredScreen.getUsage());
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_SPECULAR, mDeferredScreen.getUsage());
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_DEPTH, mDeferredScreen.getUsage());
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_LIGHT, mDeferredLight.getUsage());
- shader.disableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_BLOOM);
+ shader.disableTexture(LLShaderMgr::DEFERRED_NORMAL, mDeferredScreen.getUsage());
+ shader.disableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mDeferredScreen.getUsage());
+ shader.disableTexture(LLShaderMgr::DEFERRED_SPECULAR, mDeferredScreen.getUsage());
+ shader.disableTexture(LLShaderMgr::DEFERRED_DEPTH, mDeferredScreen.getUsage());
+ shader.disableTexture(LLShaderMgr::DEFERRED_LIGHT, mDeferredLight.getUsage());
+ shader.disableTexture(LLShaderMgr::DIFFUSE_MAP);
+ shader.disableTexture(LLShaderMgr::DEFERRED_BLOOM);
for (U32 i = 0; i < 4; i++)
{
- if (shader.disableTexture(LLViewerShaderMgr::DEFERRED_SHADOW0+i, LLTexUnit::TT_RECT_TEXTURE) > -1)
+ if (shader.disableTexture(LLShaderMgr::DEFERRED_SHADOW0+i, LLTexUnit::TT_RECT_TEXTURE) > -1)
{
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE);
}
@@ -7561,16 +7715,16 @@ void LLPipeline::unbindDeferredShader(LLGLSLShader &shader)
for (U32 i = 4; i < 6; i++)
{
- if (shader.disableTexture(LLViewerShaderMgr::DEFERRED_SHADOW0+i) > -1)
+ if (shader.disableTexture(LLShaderMgr::DEFERRED_SHADOW0+i) > -1)
{
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE);
}
}
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_NOISE);
- shader.disableTexture(LLViewerShaderMgr::DEFERRED_LIGHTFUNC);
+ shader.disableTexture(LLShaderMgr::DEFERRED_NOISE);
+ shader.disableTexture(LLShaderMgr::DEFERRED_LIGHTFUNC);
- S32 channel = shader.disableTexture(LLViewerShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
+ S32 channel = shader.disableTexture(LLShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
if (channel > -1)
{
LLCubeMap* cube_map = gSky.mVOSkyp ? gSky.mVOSkyp->getCubeMap() : NULL;
@@ -7718,7 +7872,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
LLPipeline::RENDER_TYPE_CLOUDS,
LLPipeline::END_RENDER_TYPES);
- S32 detail = gSavedSettings.getS32("RenderReflectionDetail");
+ S32 detail = RenderReflectionDetail;
if (detail > 0)
{ //mask out selected geometry based on reflection detail
if (detail < 4)
@@ -7742,7 +7896,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
if (LLDrawPoolWater::sNeedsDistortionUpdate)
{
- if (gSavedSettings.getS32("RenderReflectionDetail") > 0)
+ if (RenderReflectionDetail > 0)
{
gPipeline.grabReferences(ref_result);
LLGLUserClipPlane clip_plane(plane, mat, projection);
@@ -8233,7 +8387,7 @@ void LLPipeline::generateHighlight(LLCamera& camera)
if (!mHighlightSet.empty())
{
- F32 transition = gFrameIntervalSeconds/gSavedSettings.getF32("RenderHighlightFadeTime");
+ F32 transition = gFrameIntervalSeconds/RenderHighlightFadeTime;
LLGLDisable test(GL_ALPHA_TEST);
LLGLDepthTest depth(GL_FALSE);
@@ -8279,7 +8433,7 @@ void LLPipeline::generateHighlight(LLCamera& camera)
void LLPipeline::generateSunShadow(LLCamera& camera)
{
- if (!sRenderDeferred || gSavedSettings.getS32("RenderShadowDetail") <= 0)
+ if (!sRenderDeferred || RenderShadowDetail <= 0)
{
return;
}
@@ -8337,25 +8491,25 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
glh::matrix4f proj[6];
//clip contains parallel split distances for 3 splits
- LLVector3 clip = gSavedSettings.getVector3("RenderShadowClipPlanes");
+ LLVector3 clip = RenderShadowClipPlanes;
//F32 slope_threshold = gSavedSettings.getF32("RenderShadowSlopeThreshold");
//far clip on last split is minimum of camera view distance and 128
mSunClipPlanes = LLVector4(clip, clip.mV[2] * clip.mV[2]/clip.mV[1]);
- clip = gSavedSettings.getVector3("RenderShadowOrthoClipPlanes");
+ clip = RenderShadowOrthoClipPlanes;
mSunOrthoClipPlanes = LLVector4(clip, clip.mV[2]*clip.mV[2]/clip.mV[1]);
//currently used for amount to extrude frusta corners for constructing shadow frusta
- LLVector3 n = gSavedSettings.getVector3("RenderShadowNearDist");
+ LLVector3 n = RenderShadowNearDist;
//F32 nearDist[] = { n.mV[0], n.mV[1], n.mV[2], n.mV[2] };
//put together a universal "near clip" plane for shadow frusta
LLPlane shadow_near_clip;
{
LLVector3 p = gAgent.getPositionAgent();
- p += mSunDir * gSavedSettings.getF32("RenderFarClip")*2.f;
+ p += mSunDir * RenderFarClip*2.f;
shadow_near_clip.setVec(p, mSunDir);
}
@@ -8442,7 +8596,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
F32 range = far_clip-near_clip;
- LLVector3 split_exp = gSavedSettings.getVector3("RenderShadowSplitExponent");
+ LLVector3 split_exp = RenderShadowSplitExponent;
F32 da = 1.f-llmax( fabsf(lightDir*up), fabsf(lightDir*camera.getLeftAxis()) );
@@ -8653,7 +8807,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
mShadowError.mV[j] /= wpf.size();
mShadowError.mV[j] /= size.mV[0];
- if (mShadowError.mV[j] > gSavedSettings.getF32("RenderShadowErrorCutoff"))
+ if (mShadowError.mV[j] > RenderShadowErrorCutoff)
{ //just use ortho projection
mShadowFOV.mV[j] = -1.f;
origin.clearVec();
@@ -8696,7 +8850,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
fovx = acos(fovx);
fovz = acos(fovz);
- F32 cutoff = llmin(gSavedSettings.getF32("RenderShadowFOVCutoff"), 1.4f);
+ F32 cutoff = llmin((F32) RenderShadowFOVCutoff, 1.4f);
mShadowFOV.mV[j] = fovx;
@@ -8840,7 +8994,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
//hack to disable projector shadows
- bool gen_shadow = gSavedSettings.getS32("RenderShadowDetail") > 1;
+ bool gen_shadow = RenderShadowDetail > 1;
if (gen_shadow)
{
@@ -8979,7 +9133,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
}
- if (!gSavedSettings.getBOOL("CameraOffset"))
+ if (!CameraOffset)
{
glh_set_current_modelview(saved_view);
glh_set_current_projection(saved_proj);
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 86579261ca..584e6e4c23 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -360,6 +360,7 @@ public:
static void updateRenderDeferred();
static void refreshRenderDeferred();
+ static void refreshCachedSettings();
static void throttleNewMemoryAllocation(BOOL disable);
@@ -771,6 +772,79 @@ public:
//debug use
static U32 sCurRenderPoolType ;
+
+ //cached settings
+ static BOOL WindLightUseAtmosShaders;
+ static BOOL VertexShaderEnable;
+ static BOOL RenderAvatarVP;
+ static BOOL RenderDeferred;
+ static F32 RenderDeferredSunWash;
+ static U32 RenderFSAASamples;
+ static U32 RenderResolutionDivisor;
+ static BOOL RenderUIBuffer;
+ static S32 RenderShadowDetail;
+ static BOOL RenderDeferredSSAO;
+ static F32 RenderShadowResolutionScale;
+ static BOOL RenderLocalLights;
+ static BOOL RenderDelayCreation;
+ static BOOL RenderAnimateRes;
+ static BOOL FreezeTime;
+ static S32 DebugBeaconLineWidth;
+ static F32 RenderHighlightBrightness;
+ static LLColor4 RenderHighlightColor;
+ static F32 RenderHighlightThickness;
+ static BOOL RenderSpotLightsInNondeferred;
+ static LLColor4 PreviewAmbientColor;
+ static LLColor4 PreviewDiffuse0;
+ static LLColor4 PreviewSpecular0;
+ static LLColor4 PreviewDiffuse1;
+ static LLColor4 PreviewSpecular1;
+ static LLColor4 PreviewDiffuse2;
+ static LLColor4 PreviewSpecular2;
+ static LLVector3 PreviewDirection0;
+ static LLVector3 PreviewDirection1;
+ static LLVector3 PreviewDirection2;
+ static F32 RenderGlowMinLuminance;
+ static F32 RenderGlowMaxExtractAlpha;
+ static F32 RenderGlowWarmthAmount;
+ static LLVector3 RenderGlowLumWeights;
+ static LLVector3 RenderGlowWarmthWeights;
+ static S32 RenderGlowResolutionPow;
+ static S32 RenderGlowIterations;
+ static F32 RenderGlowWidth;
+ static F32 RenderGlowStrength;
+ static BOOL RenderDepthOfField;
+ static F32 CameraFocusTransitionTime;
+ static F32 CameraFNumber;
+ static F32 CameraFocalLength;
+ static F32 CameraFieldOfView;
+ static F32 RenderShadowNoise;
+ static F32 RenderShadowBlurSize;
+ static F32 RenderSSAOScale;
+ static U32 RenderSSAOMaxScale;
+ static F32 RenderSSAOFactor;
+ static LLVector3 RenderSSAOEffect;
+ static F32 RenderShadowOffsetError;
+ static F32 RenderShadowBiasError;
+ static F32 RenderShadowOffset;
+ static F32 RenderShadowBias;
+ static F32 RenderSpotShadowOffset;
+ static F32 RenderSpotShadowBias;
+ static F32 RenderEdgeDepthCutoff;
+ static F32 RenderEdgeNormCutoff;
+ static LLVector3 RenderShadowGaussian;
+ static F32 RenderShadowBlurDistFactor;
+ static BOOL RenderDeferredAtmospheric;
+ static S32 RenderReflectionDetail;
+ static F32 RenderHighlightFadeTime;
+ static LLVector3 RenderShadowClipPlanes;
+ static LLVector3 RenderShadowOrthoClipPlanes;
+ static LLVector3 RenderShadowNearDist;
+ static F32 RenderFarClip;
+ static LLVector3 RenderShadowSplitExponent;
+ static F32 RenderShadowErrorCutoff;
+ static F32 RenderShadowFOVCutoff;
+ static BOOL CameraOffset;
};
void render_bbox(const LLVector3 &min, const LLVector3 &max);
--
cgit v1.2.3
From d7f123ab526df7dbef153e0de71f325ab1b69571 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Tue, 11 Oct 2011 13:37:46 -0400
Subject: CHOP-397 WIP - removed windows updater.exe, no longer used
---
indra/newview/app_settings/settings.xml | 2 +-
indra/newview/viewer_manifest.py | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
mode change 100644 => 100755 indra/newview/app_settings/settings.xml
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
old mode 100644
new mode 100755
index 8804c40aff..1b539fe0db
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -5655,7 +5655,7 @@
Type
Boolean
Value
- 1
+ 0
MemProfiling
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 6165292457..0931c4ec9b 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -495,8 +495,9 @@ class WindowsManifest(ViewerManifest):
# tag:"crash-logger" here as a cue to the exporter
self.path(src='../win_crash_logger/%s/windows-crash-logger.exe' % self.args['configuration'],
dst="win_crash_logger.exe")
- self.path(src='../win_updater/%s/windows-updater.exe' % self.args['configuration'],
- dst="updater.exe")
+# For CHOP-397, windows updater no longer used.
+# self.path(src='../win_updater/%s/windows-updater.exe' % self.args['configuration'],
+# dst="updater.exe")
if not self.is_packaging_viewer():
self.package_file = "copied_deps"
--
cgit v1.2.3
From 694db7fc9a84ac1cc87e7dd6b0ff60f8c8433366 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Tue, 11 Oct 2011 15:35:33 -0400
Subject: CHOP-397 WIP - Removed accidental settings change
---
indra/newview/app_settings/settings.xml | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 12a8d297e7..8804c40aff 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -5655,18 +5655,7 @@
Type
Boolean
Value
- 0
-
- MemoryPrivatePoolSize
-
- Comment
- Size of the private memory pool in MB (min. value is 256)
- Persist
1
- Type
- U32
- Value
- 512
MemProfiling
@@ -13575,7 +13564,7 @@
Type
Boolean
Value
- 1
+ 0
ShowOfferedInventory
--
cgit v1.2.3
From 2322c57b4dd2b4338eec2ca9db2425eff4bfd6d5 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 11 Oct 2011 14:55:33 -0500
Subject: SH-2545 Fix for transparent water option doing nothing when shaders
are enabled.
---
.../shaders/class1/objects/simpleTexGenV.glsl | 77 ++++++++++++++++++++++
indra/newview/lldrawpoolwater.cpp | 46 +++++++++----
indra/newview/llviewershadermgr.cpp | 43 +++++++++++-
indra/newview/llviewershadermgr.h | 2 +
indra/newview/llwlparamset.cpp | 4 +-
5 files changed, 159 insertions(+), 13 deletions(-)
create mode 100644 indra/newview/app_settings/shaders/class1/objects/simpleTexGenV.glsl
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleTexGenV.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleTexGenV.glsl
new file mode 100644
index 0000000000..d4dee78793
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/objects/simpleTexGenV.glsl
@@ -0,0 +1,77 @@
+/**
+ * @file simpleV.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+uniform mat3 normal_matrix;
+uniform mat4 texture_matrix0;
+uniform mat4 modelview_matrix;
+uniform mat4 modelview_projection_matrix;
+
+ATTRIBUTE vec3 position;
+void passTextureIndex();
+ATTRIBUTE vec2 texcoord0;
+ATTRIBUTE vec3 normal;
+
+uniform vec4 color;
+uniform vec4 object_plane_t;
+uniform vec4 object_plane_s;
+
+vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
+void calcAtmospherics(vec3 inPositionEye);
+
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+
+vec4 texgen_object(vec4 vpos, vec4 tc, mat4 mat, vec4 tp0, vec4 tp1)
+{
+ vec4 tcoord;
+
+ tcoord.x = dot(vpos, tp0);
+ tcoord.y = dot(vpos, tp1);
+ tcoord.z = tc.z;
+ tcoord.w = tc.w;
+
+ tcoord = mat * tcoord;
+
+ return tcoord;
+}
+
+void main()
+{
+ //transform vertex
+ vec4 vert = vec4(position.xyz,1.0);
+ passTextureIndex();
+ vec4 pos = (modelview_matrix * vert);
+ gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
+ vary_texcoord0.xy = texgen_object(vec4(position.xyz, 1.0), vec4(texcoord0,0,1), texture_matrix0, object_plane_s, object_plane_t).xy;
+
+ vec3 norm = normalize(normal_matrix * normal);
+
+ calcAtmospherics(pos.xyz);
+
+ vec4 color = calcLighting(pos.xyz, norm, color, vec4(0.));
+ vertex_color = color;
+
+
+}
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index f6fe96877d..4f6eaa5a5b 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -169,7 +169,7 @@ void LLDrawPoolWater::render(S32 pass)
std::sort(mDrawFace.begin(), mDrawFace.end(), LLFace::CompareDistanceGreater());
// See if we are rendering water as opaque or not
- if (!gSavedSettings.getBOOL("RenderTransparentWater") && !LLGLSLShader::sNoFixedFunction)
+ if (!gSavedSettings.getBOOL("RenderTransparentWater"))
{
// render water for low end hardware
renderOpaqueLegacyWater();
@@ -334,9 +334,19 @@ void LLDrawPoolWater::renderOpaqueLegacyWater()
{
LLVOSky *voskyp = gSky.mVOSkyp;
+ LLGLSLShader* shader = NULL;
if (LLGLSLShader::sNoFixedFunction)
{
- gObjectSimpleProgram.bind();
+ if (LLPipeline::sUnderWaterRender)
+ {
+ shader = &gObjectSimpleNonIndexedTexGenWaterProgram;
+ }
+ else
+ {
+ shader = &gObjectSimpleNonIndexedTexGenProgram;
+ }
+
+ shader->bind();
}
stop_glerror();
@@ -361,10 +371,13 @@ void LLDrawPoolWater::renderOpaqueLegacyWater()
gGL.getTexUnit(0)->bind(mOpaqueWaterImagep);
// Automatically generate texture coords for water texture
- glEnable(GL_TEXTURE_GEN_S); //texture unit 0
- glEnable(GL_TEXTURE_GEN_T); //texture unit 0
- glTexGenf(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
- glTexGenf(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
+ if (!shader)
+ {
+ glEnable(GL_TEXTURE_GEN_S); //texture unit 0
+ glEnable(GL_TEXTURE_GEN_T); //texture unit 0
+ glTexGenf(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
+ glTexGenf(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
+ }
// Use the fact that we know all water faces are the same size
// to save some computation
@@ -387,8 +400,16 @@ void LLDrawPoolWater::renderOpaqueLegacyWater()
F32 tp0[4] = { 16.f / 256.f, 0.0f, 0.0f, offset };
F32 tp1[4] = { 0.0f, 16.f / 256.f, 0.0f, offset };
- glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0);
- glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1);
+ if (!shader)
+ {
+ glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0);
+ glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1);
+ }
+ else
+ {
+ shader->uniform4fv("object_plane_s", 1, tp0);
+ shader->uniform4fv("object_plane_t", 1, tp1);
+ }
gGL.diffuseColor3f(1.f, 1.f, 1.f);
@@ -406,9 +427,12 @@ void LLDrawPoolWater::renderOpaqueLegacyWater()
stop_glerror();
- // Reset the settings back to expected values
- glDisable(GL_TEXTURE_GEN_S); //texture unit 0
- glDisable(GL_TEXTURE_GEN_T); //texture unit 0
+ if (!shader)
+ {
+ // Reset the settings back to expected values
+ glDisable(GL_TEXTURE_GEN_S); //texture unit 0
+ glDisable(GL_TEXTURE_GEN_T); //texture unit 0
+ }
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT);
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 8bc573135c..80727764c1 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -96,6 +96,8 @@ LLGLSLShader gObjectFullbrightNoColorProgram;
LLGLSLShader gObjectFullbrightNoColorWaterProgram;
LLGLSLShader gObjectSimpleNonIndexedProgram;
+LLGLSLShader gObjectSimpleNonIndexedTexGenProgram;
+LLGLSLShader gObjectSimpleNonIndexedTexGenWaterProgram;
LLGLSLShader gObjectSimpleNonIndexedWaterProgram;
LLGLSLShader gObjectAlphaMaskNonIndexedProgram;
LLGLSLShader gObjectAlphaMaskNonIndexedWaterProgram;
@@ -217,6 +219,8 @@ LLViewerShaderMgr::LLViewerShaderMgr() :
mShaderList.push_back(&gObjectFullbrightShinyProgram);
mShaderList.push_back(&gObjectFullbrightShinyWaterProgram);
mShaderList.push_back(&gObjectSimpleNonIndexedProgram);
+ mShaderList.push_back(&gObjectSimpleNonIndexedTexGenProgram);
+ mShaderList.push_back(&gObjectSimpleNonIndexedTexGenWaterProgram);
mShaderList.push_back(&gObjectSimpleNonIndexedWaterProgram);
mShaderList.push_back(&gObjectAlphaMaskNonIndexedProgram);
mShaderList.push_back(&gObjectAlphaMaskNonIndexedWaterProgram);
@@ -625,6 +629,8 @@ void LLViewerShaderMgr::unloadShaders()
gObjectShinyWaterProgram.unload();
gObjectSimpleNonIndexedProgram.unload();
+ gObjectSimpleNonIndexedTexGenProgram.unload();
+ gObjectSimpleNonIndexedTexGenWaterProgram.unload();
gObjectSimpleNonIndexedWaterProgram.unload();
gObjectAlphaMaskNonIndexedProgram.unload();
gObjectAlphaMaskNonIndexedWaterProgram.unload();
@@ -1505,7 +1511,8 @@ BOOL LLViewerShaderMgr::loadShadersObject()
gObjectFullbrightShinyNonIndexedProgram.unload();
gObjectFullbrightShinyNonIndexedWaterProgram.unload();
gObjectShinyNonIndexedWaterProgram.unload();
- gObjectSimpleNonIndexedProgram.unload();
+ gObjectSimpleNonIndexedTexGenProgram.unload();
+ gObjectSimpleNonIndexedTexGenWaterProgram.unload();
gObjectSimpleNonIndexedWaterProgram.unload();
gObjectAlphaMaskNonIndexedProgram.unload();
gObjectAlphaMaskNonIndexedWaterProgram.unload();
@@ -1547,6 +1554,23 @@ BOOL LLViewerShaderMgr::loadShadersObject()
success = gObjectSimpleNonIndexedProgram.createShader(NULL, NULL);
}
+ if (success)
+ {
+ gObjectSimpleNonIndexedTexGenProgram.mName = "Non indexed tex-gen Shader";
+ gObjectSimpleNonIndexedTexGenProgram.mFeatures.calculatesLighting = true;
+ gObjectSimpleNonIndexedTexGenProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectSimpleNonIndexedTexGenProgram.mFeatures.hasGamma = true;
+ gObjectSimpleNonIndexedTexGenProgram.mFeatures.hasAtmospherics = true;
+ gObjectSimpleNonIndexedTexGenProgram.mFeatures.hasLighting = true;
+ gObjectSimpleNonIndexedTexGenProgram.mFeatures.disableTextureIndex = true;
+ gObjectSimpleNonIndexedTexGenProgram.mShaderFiles.clear();
+ gObjectSimpleNonIndexedTexGenProgram.mShaderFiles.push_back(make_pair("objects/simpleTexGenV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectSimpleNonIndexedTexGenProgram.mShaderFiles.push_back(make_pair("objects/simpleF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectSimpleNonIndexedTexGenProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ success = gObjectSimpleNonIndexedTexGenProgram.createShader(NULL, NULL);
+ }
+
+
if (success)
{
gObjectSimpleNonIndexedWaterProgram.mName = "Non indexed Water Shader";
@@ -1564,6 +1588,23 @@ BOOL LLViewerShaderMgr::loadShadersObject()
success = gObjectSimpleNonIndexedWaterProgram.createShader(NULL, NULL);
}
+ if (success)
+ {
+ gObjectSimpleNonIndexedTexGenWaterProgram.mName = "Non indexed tex-gen Water Shader";
+ gObjectSimpleNonIndexedTexGenWaterProgram.mFeatures.calculatesLighting = true;
+ gObjectSimpleNonIndexedTexGenWaterProgram.mFeatures.calculatesAtmospherics = true;
+ gObjectSimpleNonIndexedTexGenWaterProgram.mFeatures.hasWaterFog = true;
+ gObjectSimpleNonIndexedTexGenWaterProgram.mFeatures.hasAtmospherics = true;
+ gObjectSimpleNonIndexedTexGenWaterProgram.mFeatures.hasLighting = true;
+ gObjectSimpleNonIndexedTexGenWaterProgram.mFeatures.disableTextureIndex = true;
+ gObjectSimpleNonIndexedTexGenWaterProgram.mShaderFiles.clear();
+ gObjectSimpleNonIndexedTexGenWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleTexGenV.glsl", GL_VERTEX_SHADER_ARB));
+ gObjectSimpleNonIndexedTexGenWaterProgram.mShaderFiles.push_back(make_pair("objects/simpleWaterF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gObjectSimpleNonIndexedTexGenWaterProgram.mShaderLevel = mVertexShaderLevel[SHADER_OBJECT];
+ gObjectSimpleNonIndexedTexGenWaterProgram.mShaderGroup = LLGLSLShader::SG_WATER;
+ success = gObjectSimpleNonIndexedTexGenWaterProgram.createShader(NULL, NULL);
+ }
+
if (success)
{
gObjectAlphaMaskNonIndexedProgram.mName = "Non indexed alpha mask Shader";
diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h
index 01f8c3987c..26cef8cb3e 100644
--- a/indra/newview/llviewershadermgr.h
+++ b/indra/newview/llviewershadermgr.h
@@ -229,6 +229,8 @@ extern LLGLSLShader gObjectSimpleAlphaMaskProgram;
extern LLGLSLShader gObjectSimpleWaterProgram;
extern LLGLSLShader gObjectSimpleWaterAlphaMaskProgram;
extern LLGLSLShader gObjectSimpleNonIndexedProgram;
+extern LLGLSLShader gObjectSimpleNonIndexedTexGenProgram;
+extern LLGLSLShader gObjectSimpleNonIndexedTexGenWaterProgram;
extern LLGLSLShader gObjectSimpleNonIndexedWaterProgram;
extern LLGLSLShader gObjectAlphaMaskNonIndexedProgram;
extern LLGLSLShader gObjectAlphaMaskNonIndexedWaterProgram;
diff --git a/indra/newview/llwlparamset.cpp b/indra/newview/llwlparamset.cpp
index 4a1db3d26c..5bb7025031 100644
--- a/indra/newview/llwlparamset.cpp
+++ b/indra/newview/llwlparamset.cpp
@@ -73,11 +73,13 @@ static LLFastTimer::DeclareTimer FTM_WL_PARAM_UPDATE("WL Param Update");
void LLWLParamSet::update(LLGLSLShader * shader) const
{
+ LLFastTimer t(FTM_WL_PARAM_UPDATE);
+
for(LLSD::map_const_iterator i = mParamValues.beginMap();
i != mParamValues.endMap();
++i)
{
- LLFastTimer t(FTM_WL_PARAM_UPDATE);
+
const std::string& param = i->first;
--
cgit v1.2.3
From af0be560002d4de4d9d89709b5d3b4cc1aef31fc Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Tue, 11 Oct 2011 15:57:00 -0400
Subject: settings fix
---
indra/newview/app_settings/settings.xml | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 8804c40aff..15f1bbd1b1 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -5657,6 +5657,17 @@
Value
1
+ MemoryPrivatePoolSize
+
+ Comment
+ Size of the private memory pool in MB (min. value is 256)
+ Persist
+ 1
+ Type
+ U32
+ Value
+ 512
+
MemProfiling
Comment
@@ -13564,7 +13575,7 @@
Type
Boolean
Value
- 0
+ 1
ShowOfferedInventory
--
cgit v1.2.3
From 9a0bb3d871d476d43edc6c7a29f6bedff1c45247 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 11 Oct 2011 15:11:52 -0500
Subject: SH-2510 Never use shaders if gl version < 2.0
---
indra/newview/llviewershadermgr.cpp | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 80727764c1..31ed210ae3 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -357,6 +357,7 @@ void LLViewerShaderMgr::setShaders()
LLGLSLShader::sIndexedTextureChannels = llmax(llmin(gGLManager.mNumTextureImageUnits, (S32) gSavedSettings.getU32("RenderMaxTextureIndex")), 1);
+ reentrance = true;
if (LLRender::sGLCoreProfile || gGLManager.mGLVersion >= 2.f)
{ //ALWAYS use shaders where available
@@ -364,19 +365,15 @@ void LLViewerShaderMgr::setShaders()
{ //vertex shaders MUST be enabled to use core profile
gSavedSettings.setBOOL("VertexShaderEnable", TRUE);
}
-
- if (!gSavedSettings.getBOOL("RenderTransparentWater"))
- { //non-transparent water uses fixed function
- gSavedSettings.setBOOL("RenderTransparentWater", TRUE);
- }
}
-
-
+ else if (gGLManager.mGLVersion < 2.f)
+ { //NEVER use shaders on a pre 2.0 context
+ gSavedSettings.setBOOL("VertexShaderEnable", FALSE);
+ }
+
//setup preprocessor definitions
LLShaderMgr::instance()->mDefinitions["NUM_TEX_UNITS"] = llformat("%d", gGLManager.mNumTextureImageUnits);
-
- reentrance = true;
-
+
// Make sure the compiled shader map is cleared before we recompile shaders.
mShaderObjects.clear();
--
cgit v1.2.3
From 6c157557dc50806670dcf7fb5aa14bc5f9678282 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Wed, 12 Oct 2011 10:51:10 -0500
Subject: SH-2510 Potential fix for crash on startup on systems that don't have
GL_ARB_shader_objects
---
indra/newview/featuretable.txt | 1 +
indra/newview/featuretable_xp.txt | 1 +
2 files changed, 2 insertions(+)
(limited to 'indra/newview')
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index 9379d336d0..22d76cb082 100755
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -65,6 +65,7 @@ RenderShadowDetail 1 2
WatchdogDisabled 1 1
RenderUseStreamVBO 1 1
RenderFSAASamples 1 16
+RenderMaxTextureIndex 1 32
//
// Low Graphics Settings
diff --git a/indra/newview/featuretable_xp.txt b/indra/newview/featuretable_xp.txt
index fffd30c0d8..a8e13ce65c 100644
--- a/indra/newview/featuretable_xp.txt
+++ b/indra/newview/featuretable_xp.txt
@@ -65,6 +65,7 @@ RenderShadowDetail 1 0
WatchdogDisabled 1 1
RenderUseStreamVBO 1 1
RenderFSAASamples 1 16
+RenderMaxTextureIndex 1 32
//
// Low Graphics Settings
--
cgit v1.2.3
From 7b6723d1e0158d5dc326266a0332e87f634f9755 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 13 Oct 2011 01:19:45 -0500
Subject: SH-1650 Mitigate memory fragmentation by holding onto and reusing
VBOs
---
indra/newview/lldrawpoolavatar.cpp | 6 +++---
indra/newview/lldrawpooltree.cpp | 4 ++--
indra/newview/llface.cpp | 13 +++++++++----
indra/newview/llfloatermodelpreview.cpp | 2 +-
indra/newview/llspatialpartition.cpp | 10 +++++-----
indra/newview/llviewerdisplay.cpp | 4 ----
indra/newview/llviewerwindow.cpp | 2 +-
indra/newview/llvoavatar.cpp | 4 ++--
indra/newview/llvowlsky.cpp | 4 ++--
indra/newview/pipeline.cpp | 26 +++++---------------------
10 files changed, 30 insertions(+), 45 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index a710bdcdbd..7290a48a1a 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -1277,8 +1277,8 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
if (buffer.isNull() ||
buffer->getTypeMask() != data_mask ||
- buffer->getRequestedVerts() != vol_face.mNumVertices ||
- buffer->getRequestedIndices() != vol_face.mNumIndices ||
+ buffer->getNumVerts() != vol_face.mNumVertices ||
+ buffer->getNumIndices() != vol_face.mNumIndices ||
(drawable && drawable->isState(LLDrawable::REBUILD_ALL)))
{
face->setGeomIndex(0);
@@ -1366,7 +1366,7 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
LLMatrix4a bind_shape_matrix;
bind_shape_matrix.loadu(skin->mBindShapeMatrix);
- for (U32 j = 0; j < buffer->getRequestedVerts(); ++j)
+ for (U32 j = 0; j < buffer->getNumVerts(); ++j)
{
LLMatrix4a final_mat;
final_mat.clear();
diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp
index 3fe5b4d929..cdf6e1ab52 100644
--- a/indra/newview/lldrawpooltree.cpp
+++ b/indra/newview/lldrawpooltree.cpp
@@ -113,8 +113,8 @@ void LLDrawPoolTree::render(S32 pass)
if(buff)
{
buff->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK);
- buff->drawRange(LLRender::TRIANGLES, 0, buff->getRequestedVerts()-1, buff->getRequestedIndices(), 0);
- gPipeline.addTrianglesDrawn(buff->getRequestedIndices());
+ buff->drawRange(LLRender::TRIANGLES, 0, buff->getNumVerts()-1, buff->getNumIndices(), 0);
+ gPipeline.addTrianglesDrawn(buff->getNumIndices());
}
}
}
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 36b88ebbd4..eab3dcfadd 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -362,8 +362,8 @@ void LLFace::setSize(S32 num_vertices, S32 num_indices, bool align)
{
if (align)
{
- //allocate vertices in blocks of 16 for alignment
- num_vertices = (num_vertices + 0xF) & ~0xF;
+ //allocate vertices in blocks of 4 for alignment
+ num_vertices = (num_vertices + 0x3) & ~0x3;
}
if (mGeomCount != num_vertices ||
@@ -1073,6 +1073,11 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
S32 num_vertices = (S32)vf.mNumVertices;
S32 num_indices = (S32) vf.mNumIndices;
+ if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_OCTREE))
+ {
+ updateRebuildFlags();
+ }
+
bool map_range = gGLManager.mHasMapBufferRange || gGLManager.mHasFlushBufferRange;
if (mVertexBuffer.notNull())
@@ -2055,7 +2060,7 @@ BOOL LLFace::verify(const U32* indices_array) const
}
// First, check whether the face data fits within the pool's range.
- if ((mGeomIndex + mGeomCount) > mVertexBuffer->getRequestedVerts())
+ if ((mGeomIndex + mGeomCount) > mVertexBuffer->getNumVerts())
{
ok = FALSE;
llinfos << "Face references invalid vertices!" << llendl;
@@ -2074,7 +2079,7 @@ BOOL LLFace::verify(const U32* indices_array) const
llinfos << "Face has bogus indices count" << llendl;
}
- if (mIndicesIndex + mIndicesCount > mVertexBuffer->getRequestedIndices())
+ if (mIndicesIndex + mIndicesCount > mVertexBuffer->getNumIndices())
{
ok = FALSE;
llinfos << "Face references invalid indices!" << llendl;
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index d9ce72a2c2..8f6013f2d9 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -5457,7 +5457,7 @@ BOOL LLModelPreview::render()
}
}
- for (U32 j = 0; j < buffer->getRequestedVerts(); ++j)
+ for (U32 j = 0; j < buffer->getNumVerts(); ++j)
{
LLMatrix4 final_mat;
final_mat.mMatrix[0][0] = final_mat.mMatrix[1][1] = final_mat.mMatrix[2][2] = final_mat.mMatrix[3][3] = 0.f;
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index ffb0ce4056..2530f1f0d4 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -2454,7 +2454,7 @@ void pushBufferVerts(LLVertexBuffer* buffer, U32 mask)
if (buffer)
{
buffer->setBuffer(mask);
- buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getRequestedVerts()-1, buffer->getRequestedIndices(), 0);
+ buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts()-1, buffer->getNumIndices(), 0);
}
}
@@ -2526,7 +2526,7 @@ void renderOctree(LLSpatialGroup* group)
//coded by buffer usage and activity
gGL.setSceneBlendType(LLRender::BT_ADD_WITH_ALPHA);
LLVector4 col;
- /*if (group->mBuilt > 0.f)
+ if (group->mBuilt > 0.f)
{
group->mBuilt -= 2.f * gFrameIntervalSeconds;
if (group->mBufferUsage == GL_STATIC_DRAW_ARB)
@@ -2595,7 +2595,7 @@ void renderOctree(LLSpatialGroup* group)
gGL.diffuseColor4f(1,1,1,1);
}
}
- else*/
+ else
{
if (group->mBufferUsage == GL_STATIC_DRAW_ARB && !group->getData().empty()
&& group->mSpatialPartition->mRenderByGroup)
@@ -3442,11 +3442,11 @@ void renderPhysicsShapes(LLSpatialGroup* group)
buff->setBuffer(LLVertexBuffer::MAP_VERTEX);
gGL.diffuseColor3f(0.2f, 0.5f, 0.3f);
- buff->draw(LLRender::TRIANGLES, buff->getRequestedIndices(), 0);
+ buff->draw(LLRender::TRIANGLES, buff->getNumIndices(), 0);
gGL.diffuseColor3f(0.2f, 1.f, 0.3f);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
- buff->draw(LLRender::TRIANGLES, buff->getRequestedIndices(), 0);
+ buff->draw(LLRender::TRIANGLES, buff->getNumIndices(), 0);
}
}
}
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 1832416a4b..e0359cc61d 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -661,10 +661,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
{
LLMemType mt_ds(LLMemType::MTYPE_DISPLAY_SWAP);
- {
- LLFastTimer ftm(FTM_CLIENT_COPY);
- LLVertexBuffer::clientCopy(0.016);
- }
if (gResizeScreenTexture)
{
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 2aac43d99e..f3e9bc711a 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -532,7 +532,7 @@ public:
}
- addText(xpos, ypos, llformat("%d MB Vertex Data", LLVertexBuffer::sAllocatedBytes/(1024*1024)));
+ addText(xpos, ypos, llformat("%d MB Vertex Data (%d MB Pooled)", LLVertexBuffer::sAllocatedBytes/(1024*1024), LLVBOPool::sBytesPooled/(1024*1024)));
ypos += y_inc;
addText(xpos, ypos, llformat("%d Vertex Buffers", LLVertexBuffer::sGLCount));
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 5687ba5064..6506938766 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2117,8 +2117,8 @@ void LLVOAvatar::updateMeshData()
}
else
{
- if (buff->getRequestedIndices() == num_indices &&
- buff->getRequestedVerts() == num_vertices)
+ if (buff->getNumIndices() == num_indices &&
+ buff->getNumVerts() == num_vertices)
{
terse_update = true;
}
diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp
index 14fd0a1eb1..f1c5499d84 100644
--- a/indra/newview/llvowlsky.cpp
+++ b/indra/newview/llvowlsky.cpp
@@ -516,9 +516,9 @@ void LLVOWLSky::drawDome(void)
strips_segment->drawRange(
LLRender::TRIANGLE_STRIP,
- 0, strips_segment->getRequestedVerts()-1, strips_segment->getRequestedIndices(),
+ 0, strips_segment->getNumVerts()-1, strips_segment->getNumIndices(),
0);
- gPipeline.addTrianglesDrawn(strips_segment->getRequestedIndices(), LLRender::TRIANGLE_STRIP);
+ gPipeline.addTrianglesDrawn(strips_segment->getNumIndices(), LLRender::TRIANGLE_STRIP);
}
#else
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index e4125c8dc8..5035e0197d 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -264,15 +264,7 @@ std::string gPoolNames[] =
void drawBox(const LLVector3& c, const LLVector3& r);
void drawBoxOutline(const LLVector3& pos, const LLVector3& size);
-
-U32 nhpo2(U32 v)
-{
- U32 r = 1;
- while (r < v) {
- r *= 2;
- }
- return r;
-}
+U32 nhpo2(U32 v);
glh::matrix4f glh_copy_matrix(F32* src)
{
@@ -2902,11 +2894,7 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
}
}
}
- {
- LLFastTimer ftm(FTM_CLIENT_COPY);
- LLVertexBuffer::clientCopy();
- }
-
+
postSort(camera);
}
@@ -6122,13 +6110,7 @@ void LLPipeline::resetVertexBuffers()
llwarns << "VBO wipe failed." << llendl;
}
- if (!LLVertexBuffer::sStreamIBOPool.mNameList.empty() ||
- !LLVertexBuffer::sStreamVBOPool.mNameList.empty() ||
- !LLVertexBuffer::sDynamicIBOPool.mNameList.empty() ||
- !LLVertexBuffer::sDynamicVBOPool.mNameList.empty())
- {
- llwarns << "VBO name pool cleanup failed." << llendl;
- }
+ llassert(LLVertexBuffer::sGLCount == 0);
LLVertexBuffer::unbind();
@@ -6142,6 +6124,8 @@ void LLPipeline::resetVertexBuffers()
sBakeSunlight = gSavedSettings.getBOOL("RenderBakeSunlight");
sNoAlpha = gSavedSettings.getBOOL("RenderNoAlpha");
LLPipeline::sTextureBindTest = gSavedSettings.getBOOL("RenderDebugTextureBind");
+
+ LLVertexBuffer::initClass(LLVertexBuffer::sEnableVBOs, LLVertexBuffer::sDisableVBOMapping);
}
void LLPipeline::renderObjects(U32 type, U32 mask, BOOL texture)
--
cgit v1.2.3
From 06367e6f453b50e768cca377c9829796ac00b771 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Fri, 14 Oct 2011 17:43:31 -0500
Subject: SH-2276 Clean up a shader warning.
---
.../app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl b/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl
index dcd405716c..7059ff31ae 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl
@@ -36,10 +36,8 @@ uniform vec3 light_diffuse[8];
vec4 sumLightsSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor, vec4 baseCol)
{
- vec4 col;
- col.a = color.a;
-
-
+ vec4 col = vec4(0,0,0, color.a);
+
vec3 view = normalize(pos);
/// collect all the specular values from each calcXXXLightSpecular() function
--
cgit v1.2.3
From 9f45495fc31e3f76036d164a43ce167d7cdc9feb Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Fri, 14 Oct 2011 17:56:17 -0500
Subject: Fix for crash when toggling shaders.
---
indra/newview/llviewerdisplay.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index e0359cc61d..3889c895aa 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -628,6 +628,9 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLPipeline::sUseOcclusion = 3;
}*/
+ LLPipeline::refreshCachedSettings();
+ LLPipeline::refreshRenderDeferred();
+
LLPipeline::sAutoMaskAlphaDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaDeferred");
LLPipeline::sAutoMaskAlphaNonDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaNonDeferred");
LLPipeline::sUseFarClip = gSavedSettings.getBOOL("RenderUseFarClip");
@@ -858,9 +861,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
// gGL.popMatrix();
//}
- LLPipeline::refreshCachedSettings();
LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? TRUE : FALSE;
- LLPipeline::refreshRenderDeferred();
LLGLState::checkStates();
LLGLState::checkClientArrays();
--
cgit v1.2.3
From b32e6e094d1a6d2843b938448eee22ad1671052c Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Sun, 16 Oct 2011 00:58:16 -0500
Subject: SH-2276 Fix for TDR's on GTX 460 et al -- don't use texture units
above 16 (workaround for prevalent driver bug)
---
indra/newview/app_settings/settings.xml | 2 +-
indra/newview/featuretable.txt | 3 ++-
indra/newview/featuretable_linux.txt | 1 +
indra/newview/featuretable_mac.txt | 1 +
indra/newview/featuretable_xp.txt | 2 +-
5 files changed, 6 insertions(+), 3 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index e7ff584b38..6567ad5e04 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -7796,7 +7796,7 @@
Type
U32
Value
- 32
+ 16
RenderDebugTextureBind
diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt
index 22d76cb082..51065aacba 100755
--- a/indra/newview/featuretable.txt
+++ b/indra/newview/featuretable.txt
@@ -65,7 +65,8 @@ RenderShadowDetail 1 2
WatchdogDisabled 1 1
RenderUseStreamVBO 1 1
RenderFSAASamples 1 16
-RenderMaxTextureIndex 1 32
+RenderMaxTextureIndex 1 16
+
//
// Low Graphics Settings
diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt
index 18efcf5665..2c29c3003e 100644
--- a/indra/newview/featuretable_linux.txt
+++ b/indra/newview/featuretable_linux.txt
@@ -63,6 +63,7 @@ RenderDeferred 1 1
RenderDeferredSSAO 1 1
RenderShadowDetail 1 2
RenderFSAASamples 1 16
+RenderMaxTextureIndex 1 16
//
// Low Graphics Settings
diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt
index c37e4e93ee..e2c35adaf1 100644
--- a/indra/newview/featuretable_mac.txt
+++ b/indra/newview/featuretable_mac.txt
@@ -65,6 +65,7 @@ RenderShadowDetail 1 2
WatchdogDisabled 1 1
RenderUseStreamVBO 1 0
RenderFSAASamples 1 16
+RenderMaxTextureIndex 1 16
//
// Low Graphics Settings
diff --git a/indra/newview/featuretable_xp.txt b/indra/newview/featuretable_xp.txt
index a8e13ce65c..4b6f86665e 100644
--- a/indra/newview/featuretable_xp.txt
+++ b/indra/newview/featuretable_xp.txt
@@ -65,7 +65,7 @@ RenderShadowDetail 1 0
WatchdogDisabled 1 1
RenderUseStreamVBO 1 1
RenderFSAASamples 1 16
-RenderMaxTextureIndex 1 32
+RenderMaxTextureIndex 1 16
//
// Low Graphics Settings
--
cgit v1.2.3
From a9aca58eaf847bb38f93a268da3aa024b60b38ba Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 18 Oct 2011 16:14:56 -0500
Subject: SH-2508 Fix for edit/rotate ring not showing up on Radeon X1950 pro
---
indra/newview/llcylinder.cpp | 10 +++++-----
indra/newview/llmaniprotate.cpp | 3 +--
2 files changed, 6 insertions(+), 7 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llcylinder.cpp b/indra/newview/llcylinder.cpp
index 2adc071d7a..f353851a25 100644
--- a/indra/newview/llcylinder.cpp
+++ b/indra/newview/llcylinder.cpp
@@ -53,22 +53,22 @@ void LLCone::render(S32 sides)
F32 a = (F32) i/sides * F_PI*2.f;
F32 x = cosf(a)*0.5f;
F32 y = sinf(a)*0.5f;
- gGL.vertex3f(x,y,0.f);
+ gGL.vertex3f(x,y,-.5f);
}
- gGL.vertex3f(cosf(0.f)*0.5f, sinf(0.f)*0.5f, 0.f);
+ gGL.vertex3f(cosf(0.f)*0.5f, sinf(0.f)*0.5f, -0.5f);
gGL.end();
gGL.begin(LLRender::TRIANGLE_FAN);
- gGL.vertex3f(0.f, 0.f, 1.f);
+ gGL.vertex3f(0.f, 0.f, 0.5f);
for (U32 i = 0; i < sides; i++)
{
F32 a = (F32) i/sides * F_PI*2.f;
F32 x = cosf(a)*0.5f;
F32 y = sinf(a)*0.5f;
- gGL.vertex3f(x,y,0.f);
+ gGL.vertex3f(x,y,-0.5f);
}
- gGL.vertex3f(cosf(0.f)*0.5f, sinf(0.f)*0.5f, 0.f);
+ gGL.vertex3f(cosf(0.f)*0.5f, sinf(0.f)*0.5f, -0.5f);
gGL.end();
}
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index 19798ef752..04dd2be583 100644
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -199,8 +199,7 @@ void LLManipRotate::render()
gl_circle_2d( 0, 0, mRadiusMeters, CIRCLE_STEPS, TRUE );
}
- GLdouble plane_eqn[] = { 0, 0, 1, 0 };
- glClipPlane( GL_CLIP_PLANE0, plane_eqn );
+ gGL.flush();
}
gGL.popMatrix();
}
--
cgit v1.2.3
From c7b13d16190fcf1aacf7f1a54d97670cc4be75b6 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 18 Oct 2011 16:28:00 -0500
Subject: SH-2480 Anything GeForce 8 or later and anything Radeon HD or later
should be at least class 2 in order to get all 6 local lights available with
shaders on.
---
indra/newview/gpu_table.txt | 96 ++++++++++++++++++++++-----------------------
1 file changed, 48 insertions(+), 48 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt
index b7d951e018..5b4f52c7e6 100644
--- a/indra/newview/gpu_table.txt
+++ b/indra/newview/gpu_table.txt
@@ -106,18 +106,18 @@ ATI Mobility Radeon 8xxx .*ATI.*Mobility.*Radeon 8.* 0 1
ATI Mobility Radeon 9800 .*ATI.*Mobility.*98.* 1 1
ATI Mobility Radeon 9700 .*ATI.*Mobility.*97.* 1 1
ATI Mobility Radeon 9600 .*ATI.*Mobility.*96.* 0 1
-ATI Mobility Radeon HD 530v .*ATI.*Mobility.*HD *530v.* 1 1
+ATI Mobility Radeon HD 530v .*ATI.*Mobility.*HD *530v.* 2 1
ATI Mobility Radeon HD 540v .*ATI.*Mobility.*HD *540v.* 2 1
ATI Mobility Radeon HD 545v .*ATI.*Mobility.*HD *545v.* 2 1
ATI Mobility Radeon HD 550v .*ATI.*Mobility.*HD *550v.* 2 1
ATI Mobility Radeon HD 560v .*ATI.*Mobility.*HD *560v.* 2 1
ATI Mobility Radeon HD 565v .*ATI.*Mobility.*HD *565v.* 2 1
-ATI Mobility Radeon HD 2300 .*ATI.*Mobility.*HD *23.* 1 1
-ATI Mobility Radeon HD 2400 .*ATI.*Mobility.*HD *24.* 1 1
+ATI Mobility Radeon HD 2300 .*ATI.*Mobility.*HD *23.* 2 1
+ATI Mobility Radeon HD 2400 .*ATI.*Mobility.*HD *24.* 2 1
ATI Mobility Radeon HD 2600 .*ATI.*Mobility.*HD *26.* 3 1
ATI Mobility Radeon HD 2700 .*ATI.*Mobility.*HD *27.* 3 1
-ATI Mobility Radeon HD 3100 .*ATI.*Mobility.*HD *31.* 0 1
-ATI Mobility Radeon HD 3200 .*ATI.*Mobility.*HD *32.* 0 1
+ATI Mobility Radeon HD 3100 .*ATI.*Mobility.*HD *31.* 2 1
+ATI Mobility Radeon HD 3200 .*ATI.*Mobility.*HD *32.* 2 1
ATI Mobility Radeon HD 3400 .*ATI.*Mobility.*HD *34.* 2 1
ATI Mobility Radeon HD 3600 .*ATI.*Mobility.*HD *36.* 3 1
ATI Mobility Radeon HD 3800 .*ATI.*Mobility.*HD *38.* 3 1
@@ -140,23 +140,23 @@ ATI Mobility Radeon HD 6600M .*ATI.*Mobility.*HD *66.* 3 1
ATI Mobility Radeon HD 6700M .*ATI.*Mobility.*HD *67.* 3 1
ATI Mobility Radeon HD 6800M .*ATI.*Mobility.*HD *68.* 3 1
ATI Mobility Radeon HD 6900M .*ATI.*Mobility.*HD *69.* 3 1
-ATI Radeon HD 2300 .*ATI.*Radeon HD *23.. 0 1
-ATI Radeon HD 2400 .*ATI.*Radeon HD *24.. 1 1
+ATI Radeon HD 2300 .*ATI.*Radeon HD *23.. 2 1
+ATI Radeon HD 2400 .*ATI.*Radeon HD *24.. 2 1
ATI Radeon HD 2600 .*ATI.*Radeon HD *26.. 2 1
ATI Radeon HD 2900 .*ATI.*Radeon HD *29.. 3 1
-ATI Radeon HD 3000 .*ATI.*Radeon HD *30.. 0 1
-ATI Radeon HD 3100 .*ATI.*Radeon HD *31.. 1 1
-ATI Radeon HD 3200 .*ATI.*Radeon HD *32.. 1 1
-ATI Radeon HD 3300 .*ATI.*Radeon HD *33.. 1 1
-ATI Radeon HD 3400 .*ATI.*Radeon HD *34.. 1 1
-ATI Radeon HD 3500 .*ATI.*Radeon HD *35.. 1 1
+ATI Radeon HD 3000 .*ATI.*Radeon HD *30.. 2 1
+ATI Radeon HD 3100 .*ATI.*Radeon HD *31.. 2 1
+ATI Radeon HD 3200 .*ATI.*Radeon HD *32.. 2 1
+ATI Radeon HD 3300 .*ATI.*Radeon HD *33.. 2 1
+ATI Radeon HD 3400 .*ATI.*Radeon HD *34.. 2 1
+ATI Radeon HD 3500 .*ATI.*Radeon HD *35.. 2 1
ATI Radeon HD 3600 .*ATI.*Radeon HD *36.. 3 1
ATI Radeon HD 3700 .*ATI.*Radeon HD *37.. 3 1
ATI Radeon HD 3800 .*ATI.*Radeon HD *38.. 3 1
-ATI Radeon HD 4100 .*ATI.*Radeon HD *41.. 1 1
-ATI Radeon HD 4200 .*ATI.*Radeon HD *42.. 1 1
-ATI Radeon HD 4300 .*ATI.*Radeon HD *43.. 1 1
-ATI Radeon HD 4400 .*ATI.*Radeon HD *44.. 1 1
+ATI Radeon HD 4100 .*ATI.*Radeon HD *41.. 2 1
+ATI Radeon HD 4200 .*ATI.*Radeon HD *42.. 2 1
+ATI Radeon HD 4300 .*ATI.*Radeon HD *43.. 2 1
+ATI Radeon HD 4400 .*ATI.*Radeon HD *44.. 2 1
ATI Radeon HD 4500 .*ATI.*Radeon HD *45.. 3 1
ATI Radeon HD 4600 .*ATI.*Radeon HD *46.. 3 1
ATI Radeon HD 4700 .*ATI.*Radeon HD *47.. 3 1
@@ -290,27 +290,27 @@ Matrox .*Matrox.* 0 0
Mesa .*Mesa.* 0 0
NVIDIA 205 .*NVIDIA .*GeForce 205.* 2 1
NVIDIA 210 .*NVIDIA .*GeForce 210.* 2 1
-NVIDIA 310M .*NVIDIA .*GeForce 310M.* 1 1
+NVIDIA 310M .*NVIDIA .*GeForce 310M.* 2 1
NVIDIA 310 .*NVIDIA .*GeForce 310.* 3 1
NVIDIA 315M .*NVIDIA .*GeForce 315M.* 2 1
NVIDIA 315 .*NVIDIA .*GeForce 315.* 3 1
NVIDIA 320M .*NVIDIA .*GeForce 320M.* 2 1
-NVIDIA G100M .*NVIDIA .*100M.* 0 1
-NVIDIA G100 .*NVIDIA .*100.* 0 1
-NVIDIA G102M .*NVIDIA .*102M.* 0 1
-NVIDIA G103M .*NVIDIA .*103M.* 0 1
-NVIDIA G105M .*NVIDIA .*105M.* 0 1
-NVIDIA G 110M .*NVIDIA .*110M.* 0 1
-NVIDIA G 120M .*NVIDIA .*120M.* 1 1
-NVIDIA G 200 .*NVIDIA .*200(M)?.* 0 1
-NVIDIA G 205M .*NVIDIA .*205(M)?.* 0 1
-NVIDIA G 210 .*NVIDIA .*210(M)?.* 1 1
-NVIDIA 305M .*NVIDIA .*305(M)?.* 1 1
+NVIDIA G100M .*NVIDIA .*100M.* 2 1
+NVIDIA G100 .*NVIDIA .*100.* 2 1
+NVIDIA G102M .*NVIDIA .*102M.* 2 1
+NVIDIA G103M .*NVIDIA .*103M.* 2 1
+NVIDIA G105M .*NVIDIA .*105M.* 2 1
+NVIDIA G 110M .*NVIDIA .*110M.* 2 1
+NVIDIA G 120M .*NVIDIA .*120M.* 2 1
+NVIDIA G 200 .*NVIDIA .*200(M)?.* 2 1
+NVIDIA G 205M .*NVIDIA .*205(M)?.* 2 1
+NVIDIA G 210 .*NVIDIA .*210(M)?.* 2 1
+NVIDIA 305M .*NVIDIA .*305(M)?.* 2 1
NVIDIA G 310M .*NVIDIA .*310(M)?.* 2 1
NVIDIA G 315 .*NVIDIA .*315(M)?.* 2 1
NVIDIA G 320M .*NVIDIA .*320(M)?.* 2 1
-NVIDIA G 405 .*NVIDIA .*405(M)?.* 1 1
-NVIDIA G 410M .*NVIDIA .*410(M)?.* 1 1
+NVIDIA G 405 .*NVIDIA .*405(M)?.* 2 1
+NVIDIA G 410M .*NVIDIA .*410(M)?.* 2 1
NVIDIA GT 120M .*NVIDIA .*GT *120(M)?.* 2 1
NVIDIA GT 120 .*NVIDIA .*GT.*120 2 1
NVIDIA GT 130M .*NVIDIA .*GT *130(M)?.* 2 1
@@ -323,9 +323,9 @@ NVIDIA GT 240M .*NVIDIA .*GT *240(M)?.* 2 1
NVIDIA GT 250M .*NVIDIA .*GT *250(M)?.* 2 1
NVIDIA GT 260M .*NVIDIA .*GT *260(M)?.* 2 1
NVIDIA GT 320M .*NVIDIA .*GT *320(M)?.* 2 1
-NVIDIA GT 325M .*NVIDIA .*GT *325(M)?.* 0 1
+NVIDIA GT 325M .*NVIDIA .*GT *325(M)?.* 2 1
NVIDIA GT 330M .*NVIDIA .*GT *330(M)?.* 3 1
-NVIDIA GT 335M .*NVIDIA .*GT *335(M)?.* 1 1
+NVIDIA GT 335M .*NVIDIA .*GT *335(M)?.* 2 1
NVIDIA GT 340M .*NVIDIA .*GT *340(M)?.* 2 1
NVIDIA GT 415M .*NVIDIA .*GT *415(M)?.* 2 1
NVIDIA GT 420M .*NVIDIA .*GT *420(M)?.* 2 1
@@ -398,27 +398,27 @@ NVIDIA GeForce 7500 .*NVIDIA .*GeForce 75.* 1 1
NVIDIA GeForce 7600 .*NVIDIA .*GeForce 76.* 2 1
NVIDIA GeForce 7800 .*NVIDIA .*GeForce 78.* 2 1
NVIDIA GeForce 7900 .*NVIDIA .*GeForce 79.* 2 1
-NVIDIA GeForce 8100 .*NVIDIA .*GeForce 81.* 1 1
-NVIDIA GeForce 8200M .*NVIDIA .*GeForce 8200M.* 1 1
-NVIDIA GeForce 8200 .*NVIDIA .*GeForce 82.* 1 1
-NVIDIA GeForce 8300 .*NVIDIA .*GeForce 83.* 1 1
-NVIDIA GeForce 8400M .*NVIDIA .*GeForce 8400M.* 1 1
-NVIDIA GeForce 8400 .*NVIDIA .*GeForce 84.* 1 1
+NVIDIA GeForce 8100 .*NVIDIA .*GeForce 81.* 2 1
+NVIDIA GeForce 8200M .*NVIDIA .*GeForce 8200M.* 2 1
+NVIDIA GeForce 8200 .*NVIDIA .*GeForce 82.* 2 1
+NVIDIA GeForce 8300 .*NVIDIA .*GeForce 83.* 2 1
+NVIDIA GeForce 8400M .*NVIDIA .*GeForce 8400M.* 2 1
+NVIDIA GeForce 8400 .*NVIDIA .*GeForce 84.* 2 1
NVIDIA GeForce 8500 .*NVIDIA .*GeForce 85.* 3 1
-NVIDIA GeForce 8600M .*NVIDIA .*GeForce 8600M.* 1 1
+NVIDIA GeForce 8600M .*NVIDIA .*GeForce 8600M.* 2 1
NVIDIA GeForce 8600 .*NVIDIA .*GeForce 86.* 3 1
NVIDIA GeForce 8700M .*NVIDIA .*GeForce 8700M.* 3 1
NVIDIA GeForce 8700 .*NVIDIA .*GeForce 87.* 3 1
NVIDIA GeForce 8800M .*NVIDIA .*GeForce 8800M.* 3 1
NVIDIA GeForce 8800 .*NVIDIA .*GeForce 88.* 3 1
-NVIDIA GeForce 9100M .*NVIDIA .*GeForce 9100M.* 0 1
-NVIDIA GeForce 9100 .*NVIDIA .*GeForce 91.* 0 1
-NVIDIA GeForce 9200M .*NVIDIA .*GeForce 9200M.* 1 1
-NVIDIA GeForce 9200 .*NVIDIA .*GeForce 92.* 1 1
-NVIDIA GeForce 9300M .*NVIDIA .*GeForce 9300M.* 1 1
-NVIDIA GeForce 9300 .*NVIDIA .*GeForce 93.* 1 1
-NVIDIA GeForce 9400M .*NVIDIA .*GeForce 9400M.* 1 1
-NVIDIA GeForce 9400 .*NVIDIA .*GeForce 94.* 1 1
+NVIDIA GeForce 9100M .*NVIDIA .*GeForce 9100M.* 2 1
+NVIDIA GeForce 9100 .*NVIDIA .*GeForce 91.* 2 1
+NVIDIA GeForce 9200M .*NVIDIA .*GeForce 9200M.* 2 1
+NVIDIA GeForce 9200 .*NVIDIA .*GeForce 92.* 2 1
+NVIDIA GeForce 9300M .*NVIDIA .*GeForce 9300M.* 2 1
+NVIDIA GeForce 9300 .*NVIDIA .*GeForce 93.* 2 1
+NVIDIA GeForce 9400M .*NVIDIA .*GeForce 9400M.* 2 1
+NVIDIA GeForce 9400 .*NVIDIA .*GeForce 94.* 2 1
NVIDIA GeForce 9500M .*NVIDIA .*GeForce 9500M.* 2 1
NVIDIA GeForce 9500 .*NVIDIA .*GeForce 95.* 2 1
NVIDIA GeForce 9600M .*NVIDIA .*GeForce 9600M.* 3 1
--
cgit v1.2.3
From 2b234bc087bd703ff97ce5630175d5d06198c592 Mon Sep 17 00:00:00 2001
From: Oz Linden
Date: Wed, 19 Oct 2011 10:10:59 -0400
Subject: storm-1622: fix viewer-side wind turbulence simulation
---
indra/newview/llglsandbox.cpp | 4 +-
indra/newview/llviewermenu.cpp | 8 ++
indra/newview/llwind.cpp | 115 +++------------------
indra/newview/llwind.h | 7 +-
indra/newview/pipeline.cpp | 5 +
indra/newview/pipeline.h | 2 +-
indra/newview/skins/default/xui/en/menu_viewer.xml | 10 ++
7 files changed, 40 insertions(+), 111 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index fa3f546157..cc4d9f8692 100644
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -259,8 +259,8 @@ void LLWind::renderVectors()
{
for (i = 0; i < mSize; i++)
{
- x = mCloudVelX[i + j*mSize] * WIND_SCALE_HACK;
- y = mCloudVelY[i + j*mSize] * WIND_SCALE_HACK;
+ x = mVelX[i + j*mSize] * WIND_SCALE_HACK;
+ y = mVelY[i + j*mSize] * WIND_SCALE_HACK;
gGL.pushMatrix();
gGL.translatef((F32)i * region_width_meters/mSize, (F32)j * region_width_meters/mSize, 0.0);
gGL.color3f(0,1,0);
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 2345fbfd6a..0909714951 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -968,6 +968,10 @@ U32 info_display_from_string(std::string info_display)
{
return LLPipeline::RENDER_DEBUG_SCULPTED;
}
+ else if ("wind vectors" == info_display)
+ {
+ return LLPipeline::RENDER_DEBUG_WIND_VECTORS;
+ }
else
{
return 0;
@@ -980,6 +984,8 @@ class LLAdvancedToggleInfoDisplay : public view_listener_t
{
U32 info_display = info_display_from_string( userdata.asString() );
+ LL_INFOS("ViewerMenu") << "toggle " << userdata.asString() << LL_ENDL;
+
if ( info_display != 0 )
{
LLPipeline::toggleRenderDebug( (void*)info_display );
@@ -997,6 +1003,8 @@ class LLAdvancedCheckInfoDisplay : public view_listener_t
U32 info_display = info_display_from_string( userdata.asString() );
bool new_value = false;
+ LL_INFOS("ViewerMenu") << "check " << userdata.asString() << LL_ENDL;
+
if ( info_display != 0 )
{
new_value = LLPipeline::toggleRenderDebugControl( (void*)info_display );
diff --git a/indra/newview/llwind.cpp b/indra/newview/llwind.cpp
index 69d3090442..4c39fb5b74 100644
--- a/indra/newview/llwind.cpp
+++ b/indra/newview/llwind.cpp
@@ -46,16 +46,12 @@
#include "llworld.h"
-const F32 CLOUD_DIVERGENCE_COEF = 0.5f;
-
-
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
LLWind::LLWind()
-: mSize(16),
- mCloudDensityp(NULL)
+: mSize(16)
{
init();
}
@@ -65,8 +61,6 @@ LLWind::~LLWind()
{
delete [] mVelX;
delete [] mVelY;
- delete [] mCloudVelX;
- delete [] mCloudVelY;
}
@@ -77,31 +71,23 @@ LLWind::~LLWind()
void LLWind::init()
{
+ LL_DEBUGS("Wind") << "initializing wind size: "<< mSize << LL_ENDL;
+
// Initialize vector data
mVelX = new F32[mSize*mSize];
mVelY = new F32[mSize*mSize];
- mCloudVelX = new F32[mSize*mSize];
- mCloudVelY = new F32[mSize*mSize];
-
S32 i;
for (i = 0; i < mSize*mSize; i++)
{
mVelX[i] = 0.5f;
mVelY[i] = 0.5f;
- mCloudVelX[i] = 0.0f;
- mCloudVelY[i] = 0.0f;
}
}
void LLWind::decompress(LLBitPack &bitpack, LLGroupHeader *group_headerp)
{
- if (!mCloudDensityp)
- {
- return;
- }
-
LLPatchHeader patch_header;
S32 buffer[16*16];
@@ -122,22 +108,15 @@ void LLWind::decompress(LLBitPack &bitpack, LLGroupHeader *group_headerp)
decode_patch(bitpack, buffer);
decompress_patch(mVelY, buffer, &patch_header);
-
-
S32 i, j, k;
- // HACK -- mCloudVelXY is the same as mVelXY, except we add a divergence
- // that is proportional to the gradient of the cloud density
- // ==> this helps to clump clouds together
- // NOTE ASSUMPTION: cloud density has the same dimensions as the wind field
- // This needs to be fixed... causes discrepency at region boundaries
for (j=1; jgetRegionWidthInMeters();
-
- if (pos_clamped_region.mV[VX] < 0.f)
- {
- pos_clamped_region.mV[VX] = 0.f;
- }
- else if (pos_clamped_region.mV[VX] >= region_width_meters)
- {
- pos_clamped_region.mV[VX] = (F32) fmod(pos_clamped_region.mV[VX], region_width_meters);
- }
-
- if (pos_clamped_region.mV[VY] < 0.f)
- {
- pos_clamped_region.mV[VY] = 0.f;
- }
- else if (pos_clamped_region.mV[VY] >= region_width_meters)
- {
- pos_clamped_region.mV[VY] = (F32) fmod(pos_clamped_region.mV[VY], region_width_meters);
- }
-
-
- S32 i = llfloor(pos_clamped_region.mV[VX] * mSize / region_width_meters);
- S32 j = llfloor(pos_clamped_region.mV[VY] * mSize / region_width_meters);
- k = i + j*mSize;
- dx = ((pos_clamped_region.mV[VX] * mSize / region_width_meters) - (F32) i);
- dy = ((pos_clamped_region.mV[VY] * mSize / region_width_meters) - (F32) j);
-
- if ((i < mSize-1) && (j < mSize-1))
- {
- // Interior points, no edges
- r_val.mV[VX] = mCloudVelX[k]*(1.0f - dx)*(1.0f - dy) +
- mCloudVelX[k + 1]*dx*(1.0f - dy) +
- mCloudVelX[k + mSize]*dy*(1.0f - dx) +
- mCloudVelX[k + mSize + 1]*dx*dy;
- r_val.mV[VY] = mCloudVelY[k]*(1.0f - dx)*(1.0f - dy) +
- mCloudVelY[k + 1]*dx*(1.0f - dy) +
- mCloudVelY[k + mSize]*dy*(1.0f - dx) +
- mCloudVelY[k + mSize + 1]*dx*dy;
- }
- else
- {
- r_val.mV[VX] = mCloudVelX[k];
- r_val.mV[VY] = mCloudVelY[k];
- }
-
- r_val.mV[VZ] = 0.f;
- return r_val * WIND_SCALE_HACK;
-}
-
-
-void LLWind::setCloudDensityPointer(F32 *densityp)
-{
- mCloudDensityp = densityp;
-}
-
void LLWind::setOriginGlobal(const LLVector3d &origin_global)
{
mOriginGlobal = origin_global;
diff --git a/indra/newview/llwind.h b/indra/newview/llwind.h
index 925cb6d642..3b57f07124 100644
--- a/indra/newview/llwind.h
+++ b/indra/newview/llwind.h
@@ -27,7 +27,6 @@
#ifndef LL_LLWIND_H
#define LL_LLWIND_H
-//#include "vmath.h"
#include "llmath.h"
#include "v3math.h"
#include "v3dmath.h"
@@ -44,25 +43,21 @@ public:
~LLWind();
void renderVectors();
LLVector3 getVelocity(const LLVector3 &location); // "location" is region-local
- LLVector3 getCloudVelocity(const LLVector3 &location); // "location" is region-local
LLVector3 getVelocityNoisy(const LLVector3 &location, const F32 dim); // "location" is region-local
void decompress(LLBitPack &bitpack, LLGroupHeader *group_headerp);
LLVector3 getAverage();
- void setCloudDensityPointer(F32 *densityp);
void setOriginGlobal(const LLVector3d &origin_global);
private:
S32 mSize;
F32 * mVelX;
F32 * mVelY;
- F32 * mCloudVelX;
- F32 * mCloudVelY;
- F32 * mCloudDensityp;
LLVector3d mOriginGlobal;
void init();
+ LOG_CLASS(LLWind);
};
#endif
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index a50f66f282..93354e6579 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -4383,6 +4383,11 @@ void LLPipeline::renderDebug()
}
}
+ if (mRenderDebugMask & RENDER_DEBUG_WIND_VECTORS)
+ {
+ gAgent.getRegion()->mWind.renderVectors();
+ }
+
if (mRenderDebugMask & RENDER_DEBUG_COMPOSITION)
{
// Debug composition layers
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 27ee2745b5..0661de8cec 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -438,7 +438,7 @@ public:
RENDER_DEBUG_VERIFY = 0x0000002,
RENDER_DEBUG_BBOXES = 0x0000004,
RENDER_DEBUG_OCTREE = 0x0000008,
- RENDER_DEBUG_PICKING = 0x0000010,
+ RENDER_DEBUG_WIND_VECTORS = 0x0000010,
RENDER_DEBUG_OCCLUSION = 0x0000020,
RENDER_DEBUG_POINTS = 0x0000040,
RENDER_DEBUG_TEXTURE_PRIORITY = 0x0000080,
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 63e50b0b9f..01f9c23afd 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -2437,6 +2437,16 @@
parameter="raycast" />
+
+
+
+
Date: Wed, 19 Oct 2011 13:21:17 -0500
Subject: SH-2276 Force RenderMaxTextureIndex to be <= 16 regardless of
settings
---
indra/newview/llviewershadermgr.cpp | 3 +++
indra/newview/llvovolume.cpp | 2 ++
2 files changed, 5 insertions(+)
(limited to 'indra/newview')
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 31ed210ae3..50910e26e5 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -357,6 +357,9 @@ void LLViewerShaderMgr::setShaders()
LLGLSLShader::sIndexedTextureChannels = llmax(llmin(gGLManager.mNumTextureImageUnits, (S32) gSavedSettings.getU32("RenderMaxTextureIndex")), 1);
+ //NEVER use more than 16 texture channels (work around for prevalent driver bug)
+ LLGLSLShader::sIndexedTextureChannels = llmin(LLGLSLShader::sIndexedTextureChannels, 16);
+
reentrance = true;
if (LLRender::sGLCoreProfile || gGLManager.mGLVersion >= 2.f)
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 2fadc795fd..b75a0a799a 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4666,6 +4666,8 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
texture_index_channels = llmin(texture_index_channels, (S32) gSavedSettings.getU32("RenderMaxTextureIndex"));
+ //NEVER use more than 16 texture index channels (workaround for prevalent driver bug)
+ texture_index_channels = llmin(texture_index_channels, 16);
while (face_iter != faces.end())
{
--
cgit v1.2.3
From 37993bbba1f7e245ba1b10c2c2752cb62faa02ef Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Wed, 19 Oct 2011 13:22:58 -0500
Subject: SH-2480 Redo the previous gpu_table change, being a little more
conservative about which chips get bumped to class 2
---
indra/newview/gpu_table.txt | 62 ++++++++++++++++++++++-----------------------
1 file changed, 31 insertions(+), 31 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt
index 5b4f52c7e6..198e702459 100644
--- a/indra/newview/gpu_table.txt
+++ b/indra/newview/gpu_table.txt
@@ -106,7 +106,7 @@ ATI Mobility Radeon 8xxx .*ATI.*Mobility.*Radeon 8.* 0 1
ATI Mobility Radeon 9800 .*ATI.*Mobility.*98.* 1 1
ATI Mobility Radeon 9700 .*ATI.*Mobility.*97.* 1 1
ATI Mobility Radeon 9600 .*ATI.*Mobility.*96.* 0 1
-ATI Mobility Radeon HD 530v .*ATI.*Mobility.*HD *530v.* 2 1
+ATI Mobility Radeon HD 530v .*ATI.*Mobility.*HD *530v.* 1 1
ATI Mobility Radeon HD 540v .*ATI.*Mobility.*HD *540v.* 2 1
ATI Mobility Radeon HD 545v .*ATI.*Mobility.*HD *545v.* 2 1
ATI Mobility Radeon HD 550v .*ATI.*Mobility.*HD *550v.* 2 1
@@ -116,8 +116,8 @@ ATI Mobility Radeon HD 2300 .*ATI.*Mobility.*HD *23.* 2 1
ATI Mobility Radeon HD 2400 .*ATI.*Mobility.*HD *24.* 2 1
ATI Mobility Radeon HD 2600 .*ATI.*Mobility.*HD *26.* 3 1
ATI Mobility Radeon HD 2700 .*ATI.*Mobility.*HD *27.* 3 1
-ATI Mobility Radeon HD 3100 .*ATI.*Mobility.*HD *31.* 2 1
-ATI Mobility Radeon HD 3200 .*ATI.*Mobility.*HD *32.* 2 1
+ATI Mobility Radeon HD 3100 .*ATI.*Mobility.*HD *31.* 0 1
+ATI Mobility Radeon HD 3200 .*ATI.*Mobility.*HD *32.* 0 1
ATI Mobility Radeon HD 3400 .*ATI.*Mobility.*HD *34.* 2 1
ATI Mobility Radeon HD 3600 .*ATI.*Mobility.*HD *36.* 3 1
ATI Mobility Radeon HD 3800 .*ATI.*Mobility.*HD *38.* 3 1
@@ -144,17 +144,17 @@ ATI Radeon HD 2300 .*ATI.*Radeon HD *23.. 2 1
ATI Radeon HD 2400 .*ATI.*Radeon HD *24.. 2 1
ATI Radeon HD 2600 .*ATI.*Radeon HD *26.. 2 1
ATI Radeon HD 2900 .*ATI.*Radeon HD *29.. 3 1
-ATI Radeon HD 3000 .*ATI.*Radeon HD *30.. 2 1
-ATI Radeon HD 3100 .*ATI.*Radeon HD *31.. 2 1
-ATI Radeon HD 3200 .*ATI.*Radeon HD *32.. 2 1
+ATI Radeon HD 3000 .*ATI.*Radeon HD *30.. 0 1
+ATI Radeon HD 3100 .*ATI.*Radeon HD *31.. 1 1
+ATI Radeon HD 3200 .*ATI.*Radeon HD *32.. 1 1
ATI Radeon HD 3300 .*ATI.*Radeon HD *33.. 2 1
ATI Radeon HD 3400 .*ATI.*Radeon HD *34.. 2 1
ATI Radeon HD 3500 .*ATI.*Radeon HD *35.. 2 1
ATI Radeon HD 3600 .*ATI.*Radeon HD *36.. 3 1
ATI Radeon HD 3700 .*ATI.*Radeon HD *37.. 3 1
ATI Radeon HD 3800 .*ATI.*Radeon HD *38.. 3 1
-ATI Radeon HD 4100 .*ATI.*Radeon HD *41.. 2 1
-ATI Radeon HD 4200 .*ATI.*Radeon HD *42.. 2 1
+ATI Radeon HD 4100 .*ATI.*Radeon HD *41.. 1 1
+ATI Radeon HD 4200 .*ATI.*Radeon HD *42.. 1 1
ATI Radeon HD 4300 .*ATI.*Radeon HD *43.. 2 1
ATI Radeon HD 4400 .*ATI.*Radeon HD *44.. 2 1
ATI Radeon HD 4500 .*ATI.*Radeon HD *45.. 3 1
@@ -290,27 +290,27 @@ Matrox .*Matrox.* 0 0
Mesa .*Mesa.* 0 0
NVIDIA 205 .*NVIDIA .*GeForce 205.* 2 1
NVIDIA 210 .*NVIDIA .*GeForce 210.* 2 1
-NVIDIA 310M .*NVIDIA .*GeForce 310M.* 2 1
+NVIDIA 310M .*NVIDIA .*GeForce 310M.* 1 1
NVIDIA 310 .*NVIDIA .*GeForce 310.* 3 1
NVIDIA 315M .*NVIDIA .*GeForce 315M.* 2 1
NVIDIA 315 .*NVIDIA .*GeForce 315.* 3 1
NVIDIA 320M .*NVIDIA .*GeForce 320M.* 2 1
-NVIDIA G100M .*NVIDIA .*100M.* 2 1
-NVIDIA G100 .*NVIDIA .*100.* 2 1
-NVIDIA G102M .*NVIDIA .*102M.* 2 1
-NVIDIA G103M .*NVIDIA .*103M.* 2 1
-NVIDIA G105M .*NVIDIA .*105M.* 2 1
-NVIDIA G 110M .*NVIDIA .*110M.* 2 1
-NVIDIA G 120M .*NVIDIA .*120M.* 2 1
-NVIDIA G 200 .*NVIDIA .*200(M)?.* 2 1
-NVIDIA G 205M .*NVIDIA .*205(M)?.* 2 1
-NVIDIA G 210 .*NVIDIA .*210(M)?.* 2 1
-NVIDIA 305M .*NVIDIA .*305(M)?.* 2 1
+NVIDIA G100M .*NVIDIA .*100M.* 0 1
+NVIDIA G100 .*NVIDIA .*100.* 0 1
+NVIDIA G102M .*NVIDIA .*102M.* 0 1
+NVIDIA G103M .*NVIDIA .*103M.* 0 1
+NVIDIA G105M .*NVIDIA .*105M.* 0 1
+NVIDIA G 110M .*NVIDIA .*110M.* 0 1
+NVIDIA G 120M .*NVIDIA .*120M.* 1 1
+NVIDIA G 200 .*NVIDIA .*200(M)?.* 0 1
+NVIDIA G 205M .*NVIDIA .*205(M)?.* 0 1
+NVIDIA G 210 .*NVIDIA .*210(M)?.* 1 1
+NVIDIA 305M .*NVIDIA .*305(M)?.* 1 1
NVIDIA G 310M .*NVIDIA .*310(M)?.* 2 1
NVIDIA G 315 .*NVIDIA .*315(M)?.* 2 1
NVIDIA G 320M .*NVIDIA .*320(M)?.* 2 1
-NVIDIA G 405 .*NVIDIA .*405(M)?.* 2 1
-NVIDIA G 410M .*NVIDIA .*410(M)?.* 2 1
+NVIDIA G 405 .*NVIDIA .*405(M)?.* 1 1
+NVIDIA G 410M .*NVIDIA .*410(M)?.* 1 1
NVIDIA GT 120M .*NVIDIA .*GT *120(M)?.* 2 1
NVIDIA GT 120 .*NVIDIA .*GT.*120 2 1
NVIDIA GT 130M .*NVIDIA .*GT *130(M)?.* 2 1
@@ -323,9 +323,9 @@ NVIDIA GT 240M .*NVIDIA .*GT *240(M)?.* 2 1
NVIDIA GT 250M .*NVIDIA .*GT *250(M)?.* 2 1
NVIDIA GT 260M .*NVIDIA .*GT *260(M)?.* 2 1
NVIDIA GT 320M .*NVIDIA .*GT *320(M)?.* 2 1
-NVIDIA GT 325M .*NVIDIA .*GT *325(M)?.* 2 1
+NVIDIA GT 325M .*NVIDIA .*GT *325(M)?.* 0 1
NVIDIA GT 330M .*NVIDIA .*GT *330(M)?.* 3 1
-NVIDIA GT 335M .*NVIDIA .*GT *335(M)?.* 2 1
+NVIDIA GT 335M .*NVIDIA .*GT *335(M)?.* 1 1
NVIDIA GT 340M .*NVIDIA .*GT *340(M)?.* 2 1
NVIDIA GT 415M .*NVIDIA .*GT *415(M)?.* 2 1
NVIDIA GT 420M .*NVIDIA .*GT *420(M)?.* 2 1
@@ -398,9 +398,9 @@ NVIDIA GeForce 7500 .*NVIDIA .*GeForce 75.* 1 1
NVIDIA GeForce 7600 .*NVIDIA .*GeForce 76.* 2 1
NVIDIA GeForce 7800 .*NVIDIA .*GeForce 78.* 2 1
NVIDIA GeForce 7900 .*NVIDIA .*GeForce 79.* 2 1
-NVIDIA GeForce 8100 .*NVIDIA .*GeForce 81.* 2 1
-NVIDIA GeForce 8200M .*NVIDIA .*GeForce 8200M.* 2 1
-NVIDIA GeForce 8200 .*NVIDIA .*GeForce 82.* 2 1
+NVIDIA GeForce 8100 .*NVIDIA .*GeForce 81.* 1 1
+NVIDIA GeForce 8200M .*NVIDIA .*GeForce 8200M.* 1 1
+NVIDIA GeForce 8200 .*NVIDIA .*GeForce 82.* 1 1
NVIDIA GeForce 8300 .*NVIDIA .*GeForce 83.* 2 1
NVIDIA GeForce 8400M .*NVIDIA .*GeForce 8400M.* 2 1
NVIDIA GeForce 8400 .*NVIDIA .*GeForce 84.* 2 1
@@ -411,10 +411,10 @@ NVIDIA GeForce 8700M .*NVIDIA .*GeForce 8700M.* 3 1
NVIDIA GeForce 8700 .*NVIDIA .*GeForce 87.* 3 1
NVIDIA GeForce 8800M .*NVIDIA .*GeForce 8800M.* 3 1
NVIDIA GeForce 8800 .*NVIDIA .*GeForce 88.* 3 1
-NVIDIA GeForce 9100M .*NVIDIA .*GeForce 9100M.* 2 1
-NVIDIA GeForce 9100 .*NVIDIA .*GeForce 91.* 2 1
-NVIDIA GeForce 9200M .*NVIDIA .*GeForce 9200M.* 2 1
-NVIDIA GeForce 9200 .*NVIDIA .*GeForce 92.* 2 1
+NVIDIA GeForce 9100M .*NVIDIA .*GeForce 9100M.* 0 1
+NVIDIA GeForce 9100 .*NVIDIA .*GeForce 91.* 0 1
+NVIDIA GeForce 9200M .*NVIDIA .*GeForce 9200M.* 1 1
+NVIDIA GeForce 9200 .*NVIDIA .*GeForce 92.* 1 1
NVIDIA GeForce 9300M .*NVIDIA .*GeForce 9300M.* 2 1
NVIDIA GeForce 9300 .*NVIDIA .*GeForce 93.* 2 1
NVIDIA GeForce 9400M .*NVIDIA .*GeForce 9400M.* 2 1
--
cgit v1.2.3
From b17023e3b071f5e49b3a18c28fc8e1bc73c15b73 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Wed, 19 Oct 2011 14:18:49 -0500
Subject: SH-2593 Fix for crash when jumping from "Low" to "Ultra" with Debug
GL on.
---
indra/newview/llviewerdisplay.cpp | 19 +++++--------------
indra/newview/pipeline.cpp | 12 ++++++++++++
2 files changed, 17 insertions(+), 14 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 3889c895aa..894c409ad6 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -229,6 +229,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
gGL.flush();
glClear(GL_COLOR_BUFFER_BIT);
gViewerWindow->mWindow->swapBuffers();
+ LLPipeline::refreshCachedSettings();
+ LLPipeline::refreshRenderDeferred();
gPipeline.resizeScreenTexture();
gResizeScreenTexture = FALSE;
gWindowResized = FALSE;
@@ -615,12 +617,10 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
//Increment drawable frame counter
LLDrawable::incrementVisible();
+ LLPipeline::refreshCachedSettings();
+ LLPipeline::refreshRenderDeferred();
+
LLSpatialGroup::sNoDelete = TRUE;
- LLPipeline::sUseOcclusion =
- (!gUseWireframe
- && LLFeatureManager::getInstance()->isFeatureAvailable("UseOcclusion")
- && gSavedSettings.getBOOL("UseOcclusion")
- && gGLManager.mHasOcclusionQuery) ? 2 : 0;
LLTexUnit::sWhiteTexture = LLViewerFetchedTexture::sWhiteImagep->getTexName();
/*if (LLPipeline::sUseOcclusion && LLPipeline::sRenderDeferred)
@@ -628,15 +628,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
LLPipeline::sUseOcclusion = 3;
}*/
- LLPipeline::refreshCachedSettings();
- LLPipeline::refreshRenderDeferred();
-
- LLPipeline::sAutoMaskAlphaDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaDeferred");
- LLPipeline::sAutoMaskAlphaNonDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaNonDeferred");
- LLPipeline::sUseFarClip = gSavedSettings.getBOOL("RenderUseFarClip");
- LLVOAvatar::sMaxVisible = (U32)gSavedSettings.getS32("RenderAvatarMaxVisible");
- LLPipeline::sDelayVBUpdate = gSavedSettings.getBOOL("RenderDelayVBUpdate");
-
S32 occlusion = LLPipeline::sUseOcclusion;
if (gDepthDirty)
{ //depth buffer is invalid, don't overwrite occlusion state
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 5035e0197d..3246ec648e 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -840,6 +840,18 @@ void LLPipeline::refreshRenderDeferred()
//static
void LLPipeline::refreshCachedSettings()
{
+ LLPipeline::sAutoMaskAlphaDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaDeferred");
+ LLPipeline::sAutoMaskAlphaNonDeferred = gSavedSettings.getBOOL("RenderAutoMaskAlphaNonDeferred");
+ LLPipeline::sUseFarClip = gSavedSettings.getBOOL("RenderUseFarClip");
+ LLVOAvatar::sMaxVisible = (U32)gSavedSettings.getS32("RenderAvatarMaxVisible");
+ LLPipeline::sDelayVBUpdate = gSavedSettings.getBOOL("RenderDelayVBUpdate");
+
+ LLPipeline::sUseOcclusion =
+ (!gUseWireframe
+ && LLFeatureManager::getInstance()->isFeatureAvailable("UseOcclusion")
+ && gSavedSettings.getBOOL("UseOcclusion")
+ && gGLManager.mHasOcclusionQuery) ? 2 : 0;
+
VertexShaderEnable = gSavedSettings.getBOOL("VertexShaderEnable");
RenderAvatarVP = gSavedSettings.getBOOL("RenderAvatarVP");
WindLightUseAtmosShaders = gSavedSettings.getBOOL("WindLightUseAtmosShaders");
--
cgit v1.2.3
From 850bd75c46eb3b8416e8c9e02040171e8adad963 Mon Sep 17 00:00:00 2001
From: Oz Linden
Date: Wed, 19 Oct 2011 15:22:19 -0400
Subject: storm-1622 modify wind vector visualization to always be 25m over
avatar
---
indra/newview/llglsandbox.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index cc4d9f8692..2b9c113a72 100644
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -240,7 +240,7 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
gViewerWindow->setup3DRender();
}
-const F32 WIND_ALTITUDE = 180.f;
+const F32 WIND_RELATIVE_ALTITUDE = 25.f;
void LLWind::renderVectors()
{
@@ -254,7 +254,7 @@ void LLWind::renderVectors()
gGL.pushMatrix();
LLVector3 origin_agent;
origin_agent = gAgent.getPosAgentFromGlobal(mOriginGlobal);
- gGL.translatef(origin_agent.mV[VX], origin_agent.mV[VY], WIND_ALTITUDE);
+ gGL.translatef(origin_agent.mV[VX], origin_agent.mV[VY], gAgent.getPositionAgent().mV[VZ] + WIND_RELATIVE_ALTITUDE);
for (j = 0; j < mSize; j++)
{
for (i = 0; i < mSize; i++)
--
cgit v1.2.3
From 4ec72ed0a61157dd5fcc1bc4cc91054664ee75b5 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Wed, 19 Oct 2011 16:19:00 -0500
Subject: Fix for VBO pools not getting cleared appropriately.
---
indra/newview/pipeline.cpp | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 3246ec648e..acd708e800 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -6109,11 +6109,8 @@ void LLPipeline::resetVertexBuffers()
gSky.resetVertexBuffers();
- if (LLVertexBuffer::sGLCount > 0)
- {
- LLVertexBuffer::cleanupClass();
- }
-
+ LLVertexBuffer::cleanupClass();
+
//delete all name pool caches
LLGLNamePool::cleanupPools();
--
cgit v1.2.3
From 250ab43e4e70ccd9218d32c5dcbde35599c9735b Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Wed, 19 Oct 2011 17:41:02 -0500
Subject: SH-2571 Add shader driven render for low detail terrain.
---
indra/newview/llappviewer.cpp | 5 +--
indra/newview/lldrawpoolterrain.cpp | 69 ++++++++++++++++++++++++-----------
indra/newview/llfloaterpreference.cpp | 12 +-----
3 files changed, 51 insertions(+), 35 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 31a2ff33f2..2ef55e8a49 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -773,10 +773,7 @@ bool LLAppViewer::init()
LLViewerAssetStatsFF::init();
}
- // init main thread's local data pool before initializing the threads - Nyx
- LLThreadLocalData::init();
-
- initThreads();
+ initThreads();
LL_INFOS("InitInfo") << "Threads initialized." << LL_ENDL ;
// Initialize settings early so that the defaults for ignorable dialogs are
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index d503d935d0..e14d0c5f9d 100644
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -122,14 +122,7 @@ U32 LLDrawPoolTerrain::getVertexDataMask()
void LLDrawPoolTerrain::prerender()
{
mVertexShaderLevel = LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_ENVIRONMENT);
- if (mVertexShaderLevel > 0)
- {
- sDetailMode = 1;
- }
- else
- {
- sDetailMode = gSavedSettings.getS32("RenderTerrainDetail");
- }
+ sDetailMode = gSavedSettings.getS32("RenderTerrainDetail");
}
void LLDrawPoolTerrain::beginRenderPass( S32 pass )
@@ -137,9 +130,24 @@ void LLDrawPoolTerrain::beginRenderPass( S32 pass )
LLFastTimer t(FTM_RENDER_TERRAIN);
LLFacePool::beginRenderPass(pass);
- sShader = LLPipeline::sUnderWaterRender ?
- &gTerrainWaterProgram :
- &gTerrainProgram;
+ if (sDetailMode > 0)
+ {
+ sShader = LLPipeline::sUnderWaterRender ?
+ &gTerrainWaterProgram :
+ &gTerrainProgram;
+ }
+ else
+ {
+ if (LLPipeline::sUnderWaterRender)
+ {
+ sShader = &gObjectSimpleNonIndexedTexGenWaterProgram;
+ }
+ else
+ {
+ sShader = &gObjectSimpleNonIndexedTexGenProgram;
+ }
+ }
+
if (mVertexShaderLevel > 1 && sShader->mShaderLevel > 0)
{
@@ -200,7 +208,15 @@ void LLDrawPoolTerrain::render(S32 pass)
if (mVertexShaderLevel > 1 && sShader->mShaderLevel > 0)
{
gPipeline.enableLightsDynamic();
- renderFullShader();
+
+ if (sDetailMode > 0)
+ {
+ renderFullShader();
+ }
+ else
+ {
+ renderSimple();
+ }
}
else
{
@@ -827,13 +843,21 @@ void LLDrawPoolTerrain::renderSimple()
tp0.setVec(tscale, 0.f, 0.0f, -1.f*(origin_agent.mV[0]/256.f));
tp1.setVec(0.f, tscale, 0.0f, -1.f*(origin_agent.mV[1]/256.f));
- glEnable(GL_TEXTURE_GEN_S);
- glEnable(GL_TEXTURE_GEN_T);
- glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
- glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
- glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV);
- glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV);
-
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ sShader->uniform4fv("object_plane_s", 1, tp0.mV);
+ sShader->uniform4fv("object_plane_t", 1, tp1.mV);
+ }
+ else
+ {
+ glEnable(GL_TEXTURE_GEN_S);
+ glEnable(GL_TEXTURE_GEN_T);
+ glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
+ glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
+ glTexGenfv(GL_S, GL_OBJECT_PLANE, tp0.mV);
+ glTexGenfv(GL_T, GL_OBJECT_PLANE, tp1.mV);
+ }
+
gGL.getTexUnit(0)->setTextureColorBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_COLOR, LLTexUnit::TBS_VERT_COLOR);
drawLoop();
@@ -843,8 +867,11 @@ void LLDrawPoolTerrain::renderSimple()
gGL.getTexUnit(0)->activate();
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- glDisable(GL_TEXTURE_GEN_S);
- glDisable(GL_TEXTURE_GEN_T);
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ glDisable(GL_TEXTURE_GEN_S);
+ glDisable(GL_TEXTURE_GEN_T);
+ }
gGL.matrixMode(LLRender::MM_TEXTURE);
gGL.loadIdentity();
gGL.matrixMode(LLRender::MM_MODELVIEW);
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 7f6d0155e2..92c4214fdb 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -1039,16 +1039,8 @@ void LLFloaterPreference::refreshEnabledState()
BOOL shaders = gGLManager.mGLVersion >= 2.f;
- if (shaders)
- {
- mRadioTerrainDetail->setValue(1);
- mRadioTerrainDetail->setEnabled(FALSE);
- }
- else
- {
- mRadioTerrainDetail->setEnabled(TRUE);
- }
-
+ mRadioTerrainDetail->setEnabled(TRUE);
+
// WindLight
LLCheckBoxCtrl* ctrl_wind_light = getChild("WindLightUseAtmosShaders");
--
cgit v1.2.3
From 7fef84ca755b3f07eb9841fc1b904b185402317e Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Wed, 19 Oct 2011 18:06:32 -0500
Subject: SH-2571 Make low detail terrain stick when choosing "low" from
preferences.
---
indra/newview/llviewercontrol.cpp | 6 ------
1 file changed, 6 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 5ab2877869..d9210877dd 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -118,12 +118,6 @@ static bool handleSetShaderChanged(const LLSD& newvalue)
gBumpImageList.destroyGL();
gBumpImageList.restoreGL();
- // Changing shader also changes the terrain detail to high, reflect that change here
- if (newvalue.asBoolean())
- {
- // shaders enabled, set terrain detail to high
- gSavedSettings.setS32("RenderTerrainDetail", 1);
- }
// else, leave terrain detail as is
LLViewerShaderMgr::instance()->setShaders();
return true;
--
cgit v1.2.3
From 1762cc49395d2596ab0788b2a4504abaefbe64db Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 20 Oct 2011 14:20:12 -0500
Subject: SH-2570 Don't minimize viewer when reloading shaders (revert hack
that didn't work) and pause shader loading until after all feature masks have
been applied when switching detail levels
---
indra/newview/llfeaturemanager.cpp | 8 +++++++-
indra/newview/llviewershadermgr.cpp | 6 ++----
indra/newview/llviewershadermgr.h | 1 +
3 files changed, 10 insertions(+), 5 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index db9a0424c0..eb0cdf28c0 100644
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -51,6 +51,7 @@
#include "llcontrol.h"
#include "llboost.h"
#include "llweb.h"
+#include "llviewershadermgr.h"
#if LL_WINDOWS
#include "lldxhardware.h"
@@ -662,8 +663,10 @@ void LLFeatureManager::applyFeatures(bool skipFeatures)
void LLFeatureManager::setGraphicsLevel(S32 level, bool skipFeatures)
{
- applyBaseMasks();
+ LLViewerShaderMgr::sSkipReload = true;
+ applyBaseMasks();
+
switch (level)
{
case 0:
@@ -684,6 +687,9 @@ void LLFeatureManager::setGraphicsLevel(S32 level, bool skipFeatures)
}
applyFeatures(skipFeatures);
+
+ LLViewerShaderMgr::sSkipReload = false;
+ LLViewerShaderMgr::instance()->setShaders();
}
void LLFeatureManager::applyBaseMasks()
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 50910e26e5..e50625af60 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -59,6 +59,7 @@ using std::make_pair;
using std::string;
BOOL LLViewerShaderMgr::sInitialized = FALSE;
+bool LLViewerShaderMgr::sSkipReload = false;
LLVector4 gShinyOrigin;
@@ -350,7 +351,7 @@ void LLViewerShaderMgr::setShaders()
//setShaders might be called redundantly by gSavedSettings, so return on reentrance
static bool reentrance = false;
- if (!gPipeline.mInitialized || !sInitialized || reentrance)
+ if (!gPipeline.mInitialized || !sInitialized || reentrance || sSkipReload)
{
return;
}
@@ -401,9 +402,6 @@ void LLViewerShaderMgr::setShaders()
if (gViewerWindow)
{
gViewerWindow->setCursor(UI_CURSOR_WAIT);
- //VICIOUS HACK -- some drivers will time out if we don't redraw the window within 2 seconds, and this operation can take awhile
- //minimizing tells the driver we won't be updating the window for a bit
- gViewerWindow->getWindow()->minimize();
}
// Lighting
diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h
index 26cef8cb3e..3f670dfb14 100644
--- a/indra/newview/llviewershadermgr.h
+++ b/indra/newview/llviewershadermgr.h
@@ -33,6 +33,7 @@ class LLViewerShaderMgr: public LLShaderMgr
{
public:
static BOOL sInitialized;
+ static bool sSkipReload;
LLViewerShaderMgr();
/* virtual */ ~LLViewerShaderMgr();
--
cgit v1.2.3
From 4e894bfa316ff4bc2fa64f711b8442b228573f90 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 20 Oct 2011 14:33:36 -0500
Subject: SH-2600 Fix for busted texture animation on bump mapped objects.
---
indra/newview/app_settings/shaders/class1/objects/bumpV.glsl | 3 +--
indra/newview/lldrawpoolbump.cpp | 5 ++---
2 files changed, 3 insertions(+), 5 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/objects/bumpV.glsl b/indra/newview/app_settings/shaders/class1/objects/bumpV.glsl
index 09ec6ff792..a7738087dc 100644
--- a/indra/newview/app_settings/shaders/class1/objects/bumpV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/bumpV.glsl
@@ -24,7 +24,6 @@
*/
uniform mat4 texture_matrix0;
-uniform mat4 texture_matrix1;
uniform mat4 modelview_projection_matrix;
ATTRIBUTE vec3 position;
@@ -39,5 +38,5 @@ void main()
//transform vertex
gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
- vary_texcoord1 = (texture_matrix1 * vec4(texcoord1,0,1)).xy;
+ vary_texcoord1 = (texture_matrix0 * vec4(texcoord1,0,1)).xy;
}
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index be12eb800f..610d3f9f99 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -1453,11 +1453,10 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL
}
else
{
- gGL.getTexUnit(1)->activate();
+ gGL.getTexUnit(0)->activate();
gGL.matrixMode(LLRender::MM_TEXTURE);
gGL.loadMatrix((GLfloat*) params.mTextureMatrix->mMatrix);
gPipeline.mTextureMatrixOps++;
- gGL.getTexUnit(0)->activate();
}
gGL.loadMatrix((GLfloat*) params.mTextureMatrix->mMatrix);
@@ -1470,7 +1469,7 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL
{
if (params.mTexture.notNull())
{
- gGL.getTexUnit(diffuse_channel)->bind(params.mTexture) ;
+ gGL.getTexUnit(diffuse_channel)->bind(params.mTexture);
params.mTexture->addTextureStats(params.mVSize);
}
else
--
cgit v1.2.3
From ae31a6f4a7928e4f1be75451ec7dd16c5283ed5b Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 20 Oct 2011 15:14:16 -0500
Subject: SH-2240 GL 1.2 compatibility pass
---
indra/newview/lldrawpoolbump.cpp | 16 ++++++++++++++--
indra/newview/pipeline.cpp | 1 +
2 files changed, 15 insertions(+), 2 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 610d3f9f99..774ca2e8e7 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -1453,6 +1453,13 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL
}
else
{
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ gGL.getTexUnit(1)->activate();
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadMatrix((GLfloat*) params.mTextureMatrix->mMatrix);
+ }
+
gGL.getTexUnit(0)->activate();
gGL.matrixMode(LLRender::MM_TEXTURE);
gGL.loadMatrix((GLfloat*) params.mTextureMatrix->mMatrix);
@@ -1494,9 +1501,14 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL
}
else
{
- gGL.getTexUnit(1)->activate();
- gGL.loadIdentity();
+ if (!LLGLSLShader::sNoFixedFunction)
+ {
+ gGL.getTexUnit(1)->activate();
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadIdentity();
+ }
gGL.getTexUnit(0)->activate();
+ gGL.matrixMode(LLRender::MM_TEXTURE);
}
gGL.loadIdentity();
gGL.matrixMode(LLRender::MM_MODELVIEW);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index acd708e800..cef4c649d7 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -5090,6 +5090,7 @@ void LLPipeline::setupHWLights(LLDrawPool* pool)
// Ambient
if (!LLGLSLShader::sNoFixedFunction)
{
+ gGL.syncMatrices();
LLColor4 ambient = gSky.getTotalAmbientColor();
gGL.setAmbientLightColor(ambient);
}
--
cgit v1.2.3
From 281b71300d0296f54809948d16c778b6bf08ef19 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 20 Oct 2011 15:14:51 -0500
Subject: SH-2521 Force terrain to render as simple when GL version < 2.0
---
indra/newview/lldrawpoolterrain.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index e14d0c5f9d..ce601325c8 100644
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -196,7 +196,7 @@ void LLDrawPoolTerrain::render(S32 pass)
return;
}
// Render simplified land if video card can't do sufficient multitexturing
- if (!gGLManager.mHasARBEnvCombine || (gGLManager.mNumTextureUnits < 2))
+ if (!LLGLSLShader::sNoFixedFunction || !gGLManager.mHasARBEnvCombine || (gGLManager.mNumTextureUnits < 2))
{
renderSimple(); // Render without multitexture
return;
--
cgit v1.2.3
From 34c01b6b1ff758463dcdff19782e5af668699304 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 20 Oct 2011 18:53:12 -0500
Subject: SH-2564 Fix for bad frustum culling on visible region list
---
indra/newview/llworld.cpp | 43 +++++++++++++++++++++++--------------------
1 file changed, 23 insertions(+), 20 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index a7ae456f3c..6f6e0d2334 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -589,22 +589,22 @@ void LLWorld::updateVisibilities()
{
F32 cur_far_clip = LLViewerCamera::getInstance()->getFar();
- LLViewerCamera::getInstance()->setFar(mLandFarClip);
-
- F32 diagonal_squared = F_SQRT2 * F_SQRT2 * mWidth * mWidth;
- // Go through the culled list and check for visible regions
+ // Go through the culled list and check for visible regions (region is visible if land is visible)
for (region_list_t::iterator iter = mCulledRegionList.begin();
iter != mCulledRegionList.end(); )
{
region_list_t::iterator curiter = iter++;
LLViewerRegion* regionp = *curiter;
- F32 height = regionp->getLand().getMaxZ() - regionp->getLand().getMinZ();
- F32 radius = 0.5f*(F32) sqrt(height * height + diagonal_squared);
- if (!regionp->getLand().hasZData()
- || LLViewerCamera::getInstance()->sphereInFrustum(regionp->getCenterAgent(), radius))
+
+ LLSpatialPartition* part = regionp->getSpatialPartition(LLViewerRegion::PARTITION_TERRAIN);
+ if (part)
{
- mCulledRegionList.erase(curiter);
- mVisibleRegionList.push_back(regionp);
+ LLSpatialGroup* group = (LLSpatialGroup*) part->mOctree->getListener(0);
+ if (LLViewerCamera::getInstance()->AABBInFrustum(group->mBounds[0], group->mBounds[1]))
+ {
+ mCulledRegionList.erase(curiter);
+ mVisibleRegionList.push_back(regionp);
+ }
}
}
@@ -619,17 +619,20 @@ void LLWorld::updateVisibilities()
continue;
}
- F32 height = regionp->getLand().getMaxZ() - regionp->getLand().getMinZ();
- F32 radius = 0.5f*(F32) sqrt(height * height + diagonal_squared);
- if (LLViewerCamera::getInstance()->sphereInFrustum(regionp->getCenterAgent(), radius))
+ LLSpatialPartition* part = regionp->getSpatialPartition(LLViewerRegion::PARTITION_TERRAIN);
+ if (part)
{
- regionp->calculateCameraDistance();
- regionp->getLand().updatePatchVisibilities(gAgent);
- }
- else
- {
- mVisibleRegionList.erase(curiter);
- mCulledRegionList.push_back(regionp);
+ LLSpatialGroup* group = (LLSpatialGroup*) part->mOctree->getListener(0);
+ if (LLViewerCamera::getInstance()->AABBInFrustum(group->mBounds[0], group->mBounds[1]))
+ {
+ regionp->calculateCameraDistance();
+ regionp->getLand().updatePatchVisibilities(gAgent);
+ }
+ else
+ {
+ mVisibleRegionList.erase(curiter);
+ mCulledRegionList.push_back(regionp);
+ }
}
}
--
cgit v1.2.3
From 84a6a3a9d69cc6c9a0cccdff01f80c82b8543efa Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 20 Oct 2011 19:02:56 -0500
Subject: SH-2240 Default Debug GL to false in prep for QART
---
indra/newview/app_settings/settings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index c5cae63fd4..39cefbf199 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -7763,7 +7763,7 @@
Type
Boolean
Value
- 1
+ 0
RenderDebugNormalScale
--
cgit v1.2.3
From 0297f55c6d4be505fe6831a593ed2630d565e14a Mon Sep 17 00:00:00 2001
From: Seth ProductEngine
Date: Fri, 21 Oct 2011 17:26:47 +0200
Subject: EXP-1416 FIXED "Speak" and "Voice controls" buttons added as control
views in LLTransientFloaterMgr to prevent hiding the transient IM floater.
---
indra/newview/lltoolbarview.cpp | 20 +++++++++++++++++++
indra/newview/lltoolbarview.h | 2 ++
indra/newview/lltransientfloatermgr.cpp | 34 +++++++++++++++++++++++----------
indra/newview/lltransientfloatermgr.h | 9 +++++----
4 files changed, 51 insertions(+), 14 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index 619d17efad..affa7241d1 100644
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -35,6 +35,7 @@
#include "lltoolbar.h"
#include "llbutton.h"
#include "lltooldraganddrop.h"
+#include "lltransientfloatermgr.h"
#include "llclipboard.h"
#include "llagent.h" // HACK for destinations guide on startup
@@ -96,14 +97,17 @@ BOOL LLToolBarView::postBuild()
mToolbarLeft->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
mToolbarLeft->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
mToolbarLeft->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
+ mToolbarLeft->setButtonAddCallback(boost::bind(LLToolBarView::onToolBarButtonAdded, _1));
mToolbarRight->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
mToolbarRight->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
mToolbarRight->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
+ mToolbarRight->setButtonAddCallback(boost::bind(LLToolBarView::onToolBarButtonAdded, _1));
mToolbarBottom->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
mToolbarBottom->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
mToolbarBottom->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
+ mToolbarBottom->setButtonAddCallback(boost::bind(LLToolBarView::onToolBarButtonAdded, _1));
LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&handleLoginToolbarSetup));
@@ -314,6 +318,22 @@ void LLToolBarView::addToToolset(command_id_list_t& command_list, Toolbar& toolb
}
}
+void LLToolBarView::onToolBarButtonAdded(LLView* button)
+{
+ if (button && button->getName() == "speak")
+ {
+ // Add the "Speak" button as a control view in LLTransientFloaterMgr
+ // to prevent hiding the transient IM floater upon pressing "Speak".
+ LLTransientFloaterMgr::getInstance()->addControlView(button);
+ }
+ else if (button && button->getName() == "voice")
+ {
+ // Add the "Voice controls" button as a control view in LLTransientFloaterMgr
+ // to prevent hiding the transient IM floater upon pressing "Voice controls".
+ LLTransientFloaterMgr::getInstance()->addControlView(button);
+ }
+}
+
void LLToolBarView::draw()
{
//LLPanel* sizer_left = getChild("sizer_left");
diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h
index 60ad6316f8..8cafbc9308 100644
--- a/indra/newview/lltoolbarview.h
+++ b/indra/newview/lltoolbarview.h
@@ -94,6 +94,8 @@ private:
bool addCommand(const LLCommandId& commandId, LLToolBar* toolbar);
void addToToolset(command_id_list_t& command_list, Toolbar& toolbar) const;
+ static void onToolBarButtonAdded(LLView* button);
+
// Pointers to the toolbars handled by the toolbar view
LLToolBar* mToolbarLeft;
LLToolBar* mToolbarRight;
diff --git a/indra/newview/lltransientfloatermgr.cpp b/indra/newview/lltransientfloatermgr.cpp
index c648a6a28a..d15efb048b 100644
--- a/indra/newview/lltransientfloatermgr.cpp
+++ b/indra/newview/lltransientfloatermgr.cpp
@@ -42,9 +42,9 @@ LLTransientFloaterMgr::LLTransientFloaterMgr()
&LLTransientFloaterMgr::leftMouseClickCallback, this, _2, _3, _4));
}
- mGroupControls.insert(std::pair >(GLOBAL, std::set()));
- mGroupControls.insert(std::pair >(DOCKED, std::set()));
- mGroupControls.insert(std::pair >(IM, std::set()));
+ mGroupControls.insert(std::pair(GLOBAL, controls_set_t()));
+ mGroupControls.insert(std::pair(DOCKED, controls_set_t()));
+ mGroupControls.insert(std::pair(IM, controls_set_t()));
}
void LLTransientFloaterMgr::registerTransientFloater(LLTransientFloater* floater)
@@ -59,12 +59,16 @@ void LLTransientFloaterMgr::unregisterTransientFloater(LLTransientFloater* float
void LLTransientFloaterMgr::addControlView(ETransientGroup group, LLView* view)
{
- mGroupControls.find(group)->second.insert(view);
+ if (!view) return;
+
+ mGroupControls.find(group)->second.insert(view->getHandle());
}
void LLTransientFloaterMgr::removeControlView(ETransientGroup group, LLView* view)
{
- mGroupControls.find(group)->second.erase(view);
+ if (!view) return;
+
+ mGroupControls.find(group)->second.erase(view->getHandle());
}
void LLTransientFloaterMgr::addControlView(LLView* view)
@@ -89,7 +93,7 @@ void LLTransientFloaterMgr::hideTransientFloaters(S32 x, S32 y)
{
ETransientGroup group = floater->getGroup();
- bool hide = isControlClicked(mGroupControls.find(group)->second, x, y);
+ bool hide = isControlClicked(group, mGroupControls.find(group)->second, x, y);
if (hide)
{
floater->setTransientVisible(FALSE);
@@ -98,13 +102,23 @@ void LLTransientFloaterMgr::hideTransientFloaters(S32 x, S32 y)
}
}
-bool LLTransientFloaterMgr::isControlClicked(std::set& set, S32 x, S32 y)
+bool LLTransientFloaterMgr::isControlClicked(ETransientGroup group, controls_set_t& set, S32 x, S32 y)
{
bool res = true;
for (controls_set_t::iterator it = set.begin(); it
!= set.end(); it++)
{
- LLView* control_view = *it;
+ LLView* control_view = NULL;
+
+ LLHandle handle = *it;
+ if (handle.isDead())
+ {
+ mGroupControls.find(group)->second.erase(handle);
+ continue;
+ }
+
+ control_view = handle.get();
+
if (!control_view->getVisible())
{
continue;
@@ -130,8 +144,8 @@ void LLTransientFloaterMgr::leftMouseClickCallback(S32 x, S32 y,
return;
}
- bool hide = isControlClicked(mGroupControls.find(DOCKED)->second, x, y)
- && isControlClicked(mGroupControls.find(GLOBAL)->second, x, y);
+ bool hide = isControlClicked(DOCKED, mGroupControls.find(DOCKED)->second, x, y)
+ && isControlClicked(GLOBAL, mGroupControls.find(GLOBAL)->second, x, y);
if (hide)
{
hideTransientFloaters(x, y);
diff --git a/indra/newview/lltransientfloatermgr.h b/indra/newview/lltransientfloatermgr.h
index 2919244121..b4611c8c87 100644
--- a/indra/newview/lltransientfloatermgr.h
+++ b/indra/newview/lltransientfloatermgr.h
@@ -56,14 +56,15 @@ public:
void removeControlView(LLView* view);
private:
+ typedef std::set > controls_set_t;
+ typedef std::map group_controls_t;
+
void hideTransientFloaters(S32 x, S32 y);
void leftMouseClickCallback(S32 x, S32 y, MASK mask);
- bool isControlClicked(std::set& set, S32 x, S32 y);
-private:
+ bool isControlClicked(ETransientGroup group, controls_set_t& set, S32 x, S32 y);
+
std::set mTransSet;
- typedef std::set controls_set_t;
- typedef std::map > group_controls_t;
group_controls_t mGroupControls;
};
--
cgit v1.2.3
From 2456573925567ed91d4cc227d7fc97b90248a1fa Mon Sep 17 00:00:00 2001
From: Paul ProductEngine
Date: Fri, 21 Oct 2011 19:14:10 +0200
Subject: EXP-1404 FIXED (Dock icon shown in lower left corner of call dialog
when user has speak icon hidden)
- Don't draw tongue of dockable call dialog floater in case speak button is not present in any tool bar.
---
indra/newview/llimview.cpp | 2 ++
1 file changed, 2 insertions(+)
(limited to 'indra/newview')
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 6e9baed5f2..33c6b2218c 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -1683,6 +1683,8 @@ BOOL LLCallDialog::postBuild()
LLView *anchor_panel = gToolBarView->findChildView("speak");
setDockControl(new LLDockControl(anchor_panel, this, getDockTongue(), LLDockControl::TOP));
+ setUseTongue(anchor_panel);
+
return TRUE;
}
--
cgit v1.2.3
From b0c1d877a18956714b9885291819c692a67c6913 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Fri, 21 Oct 2011 12:40:06 -0500
Subject: SH-2240 Fix for flickering due to artifacting when rendering
occlusion query geometry
---
indra/newview/llspatialpartition.cpp | 1 +
1 file changed, 1 insertion(+)
(limited to 'indra/newview')
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 2530f1f0d4..7bf4e901c1 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -322,6 +322,7 @@ void LLSpatialGroup::buildOcclusion()
{
mOcclusionVerts->flush();
+ LLVertexBuffer::unbind();
}
clearState(LLSpatialGroup::OCCLUSION_DIRTY);
--
cgit v1.2.3
From 004cc9107bd48166d87b239fb506532ac6330ef9 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Fri, 21 Oct 2011 15:51:49 -0500
Subject: SH-2240 Fix for OSX GLSL compiler not liking #ifndef gl_FragData
---
indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl | 2 +-
indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl | 2 +-
indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl | 2 +-
.../app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl | 2 +-
.../shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl | 2 +-
.../shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl | 2 +-
indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl | 2 +-
.../newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl | 2 +-
indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl | 2 +-
indra/newview/app_settings/shaders/class1/deferred/skyF.glsl | 2 +-
indra/newview/app_settings/shaders/class1/deferred/starsF.glsl | 2 +-
indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl | 2 +-
indra/newview/app_settings/shaders/class1/deferred/treeF.glsl | 2 +-
indra/newview/app_settings/shaders/class1/deferred/waterF.glsl | 2 +-
indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl | 4 ++--
15 files changed, 16 insertions(+), 16 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl
index 945a1e71a5..9a3b2e3e8a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarF.glsl
@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl b/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl
index 463c61090f..6cc5f23aca 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/bumpF.glsl
@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl
index 73e726fe15..db272cf601 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsF.glsl
@@ -24,7 +24,7 @@
*/
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl
index f3351c08bf..14b79c37fd 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl
@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl
index 7d83b9a72c..381fba8813 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl
@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl
index a24623d7b5..b582ba7f9c 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl
@@ -24,7 +24,7 @@
*/
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl
index a8e5ae4a62..7bde49eb86 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl
@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl
index 9a0e511bef..75b45111e0 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseIndexedF.glsl
@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
index a929c0e4f5..5decddebbb 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
index dac1ee1294..96ad0aa93a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl
@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl b/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl
index 7986320c38..03fccd2766 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/starsF.glsl
@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl b/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl
index 3112a1ea7f..e014e53d25 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/terrainF.glsl
@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl b/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl
index 06071056ac..b934bc6991 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl
@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
index 43cd4c2eed..4c9ea24a24 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl
@@ -25,7 +25,7 @@
#extension GL_ARB_texture_rectangle : enable
-#ifndef gl_FragData
+#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragData[3];
#endif
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl
index 0fab5e5001..d2de1980a6 100644
--- a/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl
@@ -20,7 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
+ * $/LicenseInfo$F
*/
@@ -28,6 +28,6 @@
void fullbright_lighting();
void main()
-{
+{F
fullbright_lighting();
}
--
cgit v1.2.3
From f19ee13c0450e0e16e7c8c9d7f700e11c36886ef Mon Sep 17 00:00:00 2001
From: Leslie Linden
Date: Fri, 21 Oct 2011 14:43:16 -0700
Subject: EXP-1430 FIX -- Minimizing voice settings floater corrupts layout
throughout rest of session
* Added minimum size for layout panel that holds voice morphing and removed
user resizability.
Reviewed by Richard.
---
indra/newview/skins/default/xui/en/floater_voice_controls.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml
index 93a04050b6..6807b01fa3 100644
--- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml
+++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml
@@ -89,7 +89,7 @@
visible="true"
width="20" />
-
+
Date: Fri, 21 Oct 2011 16:29:36 -0700
Subject: EXP-1434 FIX -- Mini-location bar disappears after
maximizing/restoring viewer window
* The topinfo bar no longer follows the right edge of the window so it doesn't
scale down and disappear.
---
indra/newview/skins/default/xui/en/panel_topinfo_bar.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/en/panel_topinfo_bar.xml b/indra/newview/skins/default/xui/en/panel_topinfo_bar.xml
index 79f29777ce..fc527f5f9d 100644
--- a/indra/newview/skins/default/xui/en/panel_topinfo_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_topinfo_bar.xml
@@ -4,7 +4,7 @@
background_opaque="false"
bg_opaque_color="Black_50"
bg_alpha_color="Black_50"
- follows="left|top|right"
+ follows="left|top"
height="19"
layout="topleft"
name="topinfo_bar"
--
cgit v1.2.3
From 5676e4a62efd2636840395a0667e3df3a48f1989 Mon Sep 17 00:00:00 2001
From: Merov Linden
Date: Fri, 21 Oct 2011 18:36:06 -0700
Subject: EXP-1439 : Modify DaD on the Favorite toolbar so that reordering
visible landmarks don't send any back to the end of the list
---
indra/newview/llfavoritesbar.cpp | 65 ++++++++++++++++++++++++--------------
indra/newview/llfavoritesbar.h | 2 +-
indra/newview/llinventorymodel.cpp | 50 +++++++++++++++++++++--------
indra/newview/llinventorymodel.h | 11 +++++--
4 files changed, 86 insertions(+), 42 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 98de418878..4e0c838454 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -504,20 +504,29 @@ BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
void LLFavoritesBarCtrl::handleExistingFavoriteDragAndDrop(S32 x, S32 y)
{
+ // Identify the button hovered and the side to drop
LLFavoriteLandmarkButton* dest = dynamic_cast(mLandingTab);
+ bool insert_before = true;
+ if (!dest)
+ {
+ insert_before = false;
+ dest = dynamic_cast(mLastTab);
+ }
- // there is no need to handle if an item was dragged onto itself
+ // There is no need to handle if an item was dragged onto itself
if (dest && dest->getLandmarkId() == mDragItemId)
{
return;
}
+ // Insert the dragged item in the right place
if (dest)
{
- LLInventoryModel::updateItemsOrder(mItems, mDragItemId, dest->getLandmarkId());
+ LLInventoryModel::updateItemsOrder(mItems, mDragItemId, dest->getLandmarkId(), insert_before);
}
else
{
+ // This can happen when the item list is empty
mItems.push_back(gInventory.getItem(mDragItemId));
}
@@ -534,22 +543,31 @@ void LLFavoritesBarCtrl::handleExistingFavoriteDragAndDrop(S32 x, S32 y)
void LLFavoritesBarCtrl::handleNewFavoriteDragAndDrop(LLInventoryItem *item, const LLUUID& favorites_id, S32 x, S32 y)
{
+ // Identify the button hovered and the side to drop
LLFavoriteLandmarkButton* dest = dynamic_cast(mLandingTab);
-
- // there is no need to handle if an item was dragged onto itself
+ bool insert_before = true;
+ if (!dest)
+ {
+ insert_before = false;
+ dest = dynamic_cast(mLastTab);
+ }
+
+ // There is no need to handle if an item was dragged onto itself
if (dest && dest->getLandmarkId() == mDragItemId)
{
return;
}
-
+
LLPointer viewer_item = new LLViewerInventoryItem(item);
+ // Insert the dragged item in the right place
if (dest)
{
- insertBeforeItem(mItems, dest->getLandmarkId(), viewer_item);
+ insertItem(mItems, dest->getLandmarkId(), viewer_item, insert_before);
}
else
{
+ // This can happen when the item list is empty
mItems.push_back(viewer_item);
}
@@ -1337,29 +1355,28 @@ BOOL LLFavoritesBarCtrl::needToSaveItemsOrder(const LLInventoryModel::item_array
return result;
}
-LLInventoryModel::item_array_t::iterator LLFavoritesBarCtrl::findItemByUUID(LLInventoryModel::item_array_t& items, const LLUUID& id)
+void LLFavoritesBarCtrl::insertItem(LLInventoryModel::item_array_t& items, const LLUUID& dest_item_id, LLViewerInventoryItem* insertedItem, bool insert_before)
{
- LLInventoryModel::item_array_t::iterator result = items.end();
+ // Get the iterator to the destination item
+ LLInventoryModel::item_array_t::iterator it_dest = LLInventoryModel::findItemIterByUUID(items, dest_item_id);
+ if (it_dest == items.end())
+ return;
- for (LLInventoryModel::item_array_t::iterator i = items.begin(); i != items.end(); ++i)
+ // Go to the next element if one wishes to insert after the dest element
+ if (!insert_before)
{
- if ((*i)->getUUID() == id)
- {
- result = i;
- break;
- }
+ ++it_dest;
}
-
- return result;
-}
-
-void LLFavoritesBarCtrl::insertBeforeItem(LLInventoryModel::item_array_t& items, const LLUUID& beforeItemId, LLViewerInventoryItem* insertedItem)
-{
- LLViewerInventoryItem* beforeItem = gInventory.getItem(beforeItemId);
- llassert(beforeItem);
- if (beforeItem)
+
+ // Insert the source item in the right place
+ if (it_dest != items.end())
+ {
+ items.insert(it_dest, insertedItem);
+ }
+ else
{
- items.insert(findItemByUUID(items, beforeItem->getUUID()), insertedItem);
+ // Append to the list if it_dest reached the end
+ items.push_back(insertedItem);
}
}
diff --git a/indra/newview/llfavoritesbar.h b/indra/newview/llfavoritesbar.h
index 1b11d6196e..2f75b3bb0e 100644
--- a/indra/newview/llfavoritesbar.h
+++ b/indra/newview/llfavoritesbar.h
@@ -130,7 +130,7 @@ private:
* inserts an item identified by insertedItemId BEFORE an item identified by beforeItemId.
* this function assumes that an item identified by insertedItemId doesn't exist in items array.
*/
- void insertBeforeItem(LLInventoryModel::item_array_t& items, const LLUUID& beforeItemId, LLViewerInventoryItem* insertedItem);
+ void insertItem(LLInventoryModel::item_array_t& items, const LLUUID& dest_item_id, LLViewerInventoryItem* insertedItem, bool insert_before);
// finds an item by it's UUID in the items array
LLInventoryModel::item_array_t::iterator findItemByUUID(LLInventoryModel::item_array_t& items, const LLUUID& id);
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index e86c427ae2..fb02fe0ff7 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -2879,40 +2879,62 @@ BOOL LLInventoryModel::getIsFirstTimeInViewer2()
return sFirstTimeInViewer2;
}
-static LLInventoryModel::item_array_t::iterator find_item_iter_by_uuid(LLInventoryModel::item_array_t& items, const LLUUID& id)
+LLInventoryModel::item_array_t::iterator LLInventoryModel::findItemIterByUUID(LLInventoryModel::item_array_t& items, const LLUUID& id)
{
- LLInventoryModel::item_array_t::iterator result = items.end();
+ LLInventoryModel::item_array_t::iterator curr_item = items.begin();
- for (LLInventoryModel::item_array_t::iterator i = items.begin(); i != items.end(); ++i)
+ while (curr_item != items.end())
{
- if ((*i)->getUUID() == id)
+ if ((*curr_item)->getUUID() == id)
{
- result = i;
break;
}
+ ++curr_item;
}
- return result;
+ return curr_item;
}
// static
// * @param[in, out] items - vector with items to be updated. It should be sorted in a right way
// * before calling this method.
// * @param src_item_id - LLUUID of inventory item to be moved in new position
-// * @param dest_item_id - LLUUID of inventory item before which source item should be placed.
-void LLInventoryModel::updateItemsOrder(LLInventoryModel::item_array_t& items, const LLUUID& src_item_id, const LLUUID& dest_item_id)
+// * @param dest_item_id - LLUUID of inventory item before (or after) which source item should
+// * be placed.
+// * @param insert_before - bool indicating if src_item_id should be placed before or after
+// * dest_item_id. Default is true.
+void LLInventoryModel::updateItemsOrder(LLInventoryModel::item_array_t& items, const LLUUID& src_item_id, const LLUUID& dest_item_id, bool insert_before)
{
- LLInventoryModel::item_array_t::iterator it_src = find_item_iter_by_uuid(items, src_item_id);
- LLInventoryModel::item_array_t::iterator it_dest = find_item_iter_by_uuid(items, dest_item_id);
+ LLInventoryModel::item_array_t::iterator it_src = findItemIterByUUID(items, src_item_id);
+ LLInventoryModel::item_array_t::iterator it_dest = findItemIterByUUID(items, dest_item_id);
- if (it_src == items.end() || it_dest == items.end()) return;
+ // If one of the passed UUID is not in the item list, bail out
+ if ((it_src == items.end()) || (it_dest == items.end()))
+ return;
+ // Erase the source element from the list, keep a copy before erasing.
LLViewerInventoryItem* src_item = *it_src;
items.erase(it_src);
- // target iterator can not be valid because the container was changed, so update it.
- it_dest = find_item_iter_by_uuid(items, dest_item_id);
- items.insert(it_dest, src_item);
+ // Note: Target iterator is not valid anymore because the container was changed, so update it.
+ it_dest = findItemIterByUUID(items, dest_item_id);
+
+ // Go to the next element if one wishes to insert after the dest element
+ if (!insert_before)
+ {
+ ++it_dest;
+ }
+
+ // Reinsert the source item in the right place
+ if (it_dest != items.end())
+ {
+ items.insert(it_dest, src_item);
+ }
+ else
+ {
+ // Append to the list if it_dest reached the end
+ items.push_back(src_item);
+ }
}
//* @param[in] items vector of items in order to be saved.
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index e0e81f1006..a0fd455cf3 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -332,11 +332,16 @@ protected:
//--------------------------------------------------------------------
public:
// Changes items order by insertion of the item identified by src_item_id
- // before the item identified by dest_item_id. Both items must exist in items array.
- // Sorting is stored after method is finished. Only src_item_id is moved before dest_item_id.
+ // before (or after) the item identified by dest_item_id. Both items must exist in items array.
+ // Sorting is stored after method is finished. Only src_item_id is moved before (or after) dest_item_id.
+ // The parameter "insert_before" controls on which side of dest_item_id src_item_id gets rensinserted.
static void updateItemsOrder(LLInventoryModel::item_array_t& items,
const LLUUID& src_item_id,
- const LLUUID& dest_item_id);
+ const LLUUID& dest_item_id,
+ bool insert_before = true);
+ // Gets an iterator on an item vector knowing only the item UUID.
+ // Returns end() of the vector if not found.
+ static LLInventoryModel::item_array_t::iterator findItemIterByUUID(LLInventoryModel::item_array_t& items, const LLUUID& id);
// Saves current order of the passed items using inventory item sort field.
// Resets 'items' sort fields and saves them on server.
--
cgit v1.2.3
From 443d1b08b22262566dc4d476ca0bdef665518721 Mon Sep 17 00:00:00 2001
From: Merov Linden
Date: Fri, 21 Oct 2011 18:51:39 -0700
Subject: EXP-1439 : Fix potential crash when the favorites bar is empty
---
indra/newview/llfavoritesbar.cpp | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 4e0c838454..c48b809114 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -544,12 +544,16 @@ void LLFavoritesBarCtrl::handleExistingFavoriteDragAndDrop(S32 x, S32 y)
void LLFavoritesBarCtrl::handleNewFavoriteDragAndDrop(LLInventoryItem *item, const LLUUID& favorites_id, S32 x, S32 y)
{
// Identify the button hovered and the side to drop
- LLFavoriteLandmarkButton* dest = dynamic_cast(mLandingTab);
- bool insert_before = true;
- if (!dest)
+ LLFavoriteLandmarkButton* dest = NULL;
+ bool insert_before = true;
+ if (!mItems.empty())
{
- insert_before = false;
- dest = dynamic_cast(mLastTab);
+ dest = dynamic_cast(mLandingTab);
+ if (!dest)
+ {
+ insert_before = false;
+ dest = dynamic_cast(mLastTab);
+ }
}
// There is no need to handle if an item was dragged onto itself
--
cgit v1.2.3
From 338914bd7d7e776d3ca5a4eb9a579fcbe53cf1b9 Mon Sep 17 00:00:00 2001
From: Paul ProductEngine
Date: Mon, 24 Oct 2011 14:17:15 +0200
Subject: EXP-1400 FIXED (Call request docking icon overlays other toolbar
buttons when speak button in side toolbar)
- LLDockableFloater::getDockTongue to init dock tongue with proper image depending on floater dock side, also added images for left and right tongues.
- Added proper call floater positioning relatively to the speak button
---
indra/newview/llimview.cpp | 19 ++++++++++++++++++-
indra/newview/llimview.h | 5 ++++-
.../skins/default/textures/windows/Flyout_Left.png | Bin 0 -> 271 bytes
.../skins/default/textures/windows/Flyout_Right.png | Bin 0 -> 280 bytes
.../skins/default/xui/en/floater_outgoing_call.xml | 1 +
5 files changed, 23 insertions(+), 2 deletions(-)
create mode 100644 indra/newview/skins/default/textures/windows/Flyout_Left.png
create mode 100644 indra/newview/skins/default/textures/windows/Flyout_Right.png
(limited to 'indra/newview')
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 33c6b2218c..c751394455 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -1681,7 +1681,8 @@ BOOL LLCallDialog::postBuild()
return FALSE;
LLView *anchor_panel = gToolBarView->findChildView("speak");
- setDockControl(new LLDockControl(anchor_panel, this, getDockTongue(), LLDockControl::TOP));
+ LLDockControl::DocAt dock_pos = getDockControlPos();
+ setDockControl(new LLDockControl(anchor_panel, this, getDockTongue(dock_pos), dock_pos));
setUseTongue(anchor_panel);
@@ -1751,6 +1752,22 @@ void LLCallDialog::setIcon(const LLSD& session_id, const LLSD& participant_id)
}
}
+LLDockControl::DocAt LLCallDialog::getDockControlPos()
+{
+ LLToolBar* tool_bar = NULL;
+
+ if((tool_bar = gToolBarView->getChild("toolbar_left")) && tool_bar->hasChild("speak", true))
+ {
+ return LLDockControl::RIGHT; // Speak button in the left toolbar so the call floater should be to the right of the speak button
+ }
+ else if((tool_bar = gToolBarView->getChild("toolbar_right")) && tool_bar->hasChild("speak", true))
+ {
+ return LLDockControl::LEFT; // Speak button in the right toolbar so the call floater should be to the left of the speak button
+ }
+
+ return LLDockControl::TOP;
+}
+
bool LLCallDialog::lifetimeHasExpired()
{
if (mLifetimeTimer.getStarted())
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index 93b604d36a..33c7ae9e54 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -491,7 +491,7 @@ class LLCallDialog : public LLDockableFloater
{
public:
LLCallDialog(const LLSD& payload);
- ~LLCallDialog();
+ virtual ~LLCallDialog();
virtual BOOL postBuild();
@@ -519,6 +519,9 @@ protected:
void setIcon(const LLSD& session_id, const LLSD& participant_id);
LLSD mPayload;
+
+private:
+ LLDockControl::DocAt getDockControlPos();
};
class LLIncomingCallDialog : public LLCallDialog
diff --git a/indra/newview/skins/default/textures/windows/Flyout_Left.png b/indra/newview/skins/default/textures/windows/Flyout_Left.png
new file mode 100644
index 0000000000..6ac9fe2efd
Binary files /dev/null and b/indra/newview/skins/default/textures/windows/Flyout_Left.png differ
diff --git a/indra/newview/skins/default/textures/windows/Flyout_Right.png b/indra/newview/skins/default/textures/windows/Flyout_Right.png
new file mode 100644
index 0000000000..aa1f0625aa
Binary files /dev/null and b/indra/newview/skins/default/textures/windows/Flyout_Right.png differ
diff --git a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
index 9db6568ee3..ffbb6aa28b 100644
--- a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
+++ b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
@@ -8,6 +8,7 @@
layout="topleft"
name="outgoing call"
help_topic="outgoing_call"
+ save_dock_state="true"
title="CALLING"
width="410">
Date: Mon, 24 Oct 2011 10:53:17 -0500
Subject: F ?
---
indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl
index d2de1980a6..a54c0caf81 100644
--- a/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightF.glsl
@@ -28,6 +28,6 @@
void fullbright_lighting();
void main()
-{F
+{
fullbright_lighting();
}
--
cgit v1.2.3
From dfe75ba0ebfe01928d9daba76f6e8b864f770e59 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Mon, 24 Oct 2011 12:35:53 -0500
Subject: SH-2610 Fix for black terrain when bump map is visible and shaders
are not supported.
---
indra/newview/lldrawpoolbump.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 774ca2e8e7..7b9fb2b34b 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -786,7 +786,7 @@ void LLDrawPoolBump::endBump(U32 pass)
{
// Disable texture blending on unit 1
gGL.getTexUnit(1)->activate();
- //gGL.getTexUnit(1)->disable();
+ gGL.getTexUnit(1)->disable();
gGL.getTexUnit(1)->setTextureBlendType(LLTexUnit::TB_MULT);
// Disable texture blending on unit 0
--
cgit v1.2.3
From 51ba2f5fbc379f58d64f8850cd438cc95d7b89f7 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Mon, 24 Oct 2011 12:58:51 -0500
Subject: SH-2240 Fix for crash on enabling shadows when Debug GL is enabled
---
indra/newview/pipeline.cpp | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'indra/newview')
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index cef4c649d7..04edc90be9 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -701,6 +701,9 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
{
+ refreshCachedSettings();
+ refreshRenderDeferred();
+
// remember these dimensions
mScreenWidth = resX;
mScreenHeight = resY;
@@ -8435,6 +8438,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
BOOL skip_avatar_update = FALSE;
if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson)
{
+
skip_avatar_update = TRUE;
}
--
cgit v1.2.3
From f5b10238aff1fe0332ed0253d2fbb07be54acd14 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Mon, 24 Oct 2011 13:10:26 -0500
Subject: SH-2240 Forcibly disable shaders on hardware that's specifically
flagged as unsupported.
---
indra/newview/gpu_table.txt | 2 +-
indra/newview/llfeaturemanager.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt
index 198e702459..bb85551205 100644
--- a/indra/newview/gpu_table.txt
+++ b/indra/newview/gpu_table.txt
@@ -367,7 +367,7 @@ NVIDIA GTX 550 .*NVIDIA .*GTX *55.* 3 1
NVIDIA GTX 560 .*NVIDIA .*GTX *56.* 3 1
NVIDIA GTX 570 .*NVIDIA .*GTX *57.* 3 1
NVIDIA GTX 580M .*NVIDIA .*GTX *580M.* 3 1
-NVIDIA GTX 580 .*NVIDIA .*GTX *58.* 3 1
+NVIDIA GTX 580 .*NVIDIA .*GTX *58.* 3 0
NVIDIA GTX 590 .*NVIDIA .*GTX *59.* 3 1
NVIDIA C51 .*NVIDIA .*C51.* 0 1
NVIDIA G72 .*NVIDIA .*G72.* 1 1
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index eb0cdf28c0..08f9d26705 100644
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -731,7 +731,7 @@ void LLFeatureManager::applyBaseMasks()
{
maskFeatures("NoPixelShaders");
}
- if (!gGLManager.mHasVertexShader)
+ if (!gGLManager.mHasVertexShader || !mGPUSupported)
{
maskFeatures("NoVertexShaders");
}
--
cgit v1.2.3
From 7b83f1dfd1daeb4e0b80e1c369e83137682a723c Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Mon, 24 Oct 2011 13:11:44 -0500
Subject: GTX 580 is supported
---
indra/newview/gpu_table.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt
index bb85551205..198e702459 100644
--- a/indra/newview/gpu_table.txt
+++ b/indra/newview/gpu_table.txt
@@ -367,7 +367,7 @@ NVIDIA GTX 550 .*NVIDIA .*GTX *55.* 3 1
NVIDIA GTX 560 .*NVIDIA .*GTX *56.* 3 1
NVIDIA GTX 570 .*NVIDIA .*GTX *57.* 3 1
NVIDIA GTX 580M .*NVIDIA .*GTX *580M.* 3 1
-NVIDIA GTX 580 .*NVIDIA .*GTX *58.* 3 0
+NVIDIA GTX 580 .*NVIDIA .*GTX *58.* 3 1
NVIDIA GTX 590 .*NVIDIA .*GTX *59.* 3 1
NVIDIA C51 .*NVIDIA .*C51.* 0 1
NVIDIA G72 .*NVIDIA .*G72.* 1 1
--
cgit v1.2.3
From 08ee54158fe71feebaa11ebade18d45be4caf90b Mon Sep 17 00:00:00 2001
From: Richard Linden
Date: Mon, 24 Oct 2011 13:56:14 -0700
Subject: EXP-1458 FIX Chat text entry bar does not have focus when chat
floater is opened while chat history is toggled open made expando-button
chrome, so it doesn't steal focus
---
indra/newview/skins/default/xui/en/floater_chat_bar.xml | 1 +
1 file changed, 1 insertion(+)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/en/floater_chat_bar.xml b/indra/newview/skins/default/xui/en/floater_chat_bar.xml
index 989b4a0580..86191b789c 100644
--- a/indra/newview/skins/default/xui/en/floater_chat_bar.xml
+++ b/indra/newview/skins/default/xui/en/floater_chat_bar.xml
@@ -68,6 +68,7 @@
image_pressed="ComboButton_UpSelected"
image_pressed_selected="ComboButton_Selected"
height="23"
+ chrome="true"
name="show_nearby_chat"
tool_tip="Shows/hides nearby chat log">
--
cgit v1.2.3
From cd13933b0942ef4fdf2d4ec8f558d0ec2312b691 Mon Sep 17 00:00:00 2001
From: Merov Linden
Date: Mon, 24 Oct 2011 14:14:55 -0700
Subject: EXP-1354 : Fixed. Toolbars now saved whenever changing their config
and only if initialized correctly.
---
indra/newview/lltoolbarview.cpp | 14 +++++++++++++-
indra/newview/lltoolbarview.h | 1 +
2 files changed, 14 insertions(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index affa7241d1..f481455834 100644
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -73,7 +73,8 @@ LLToolBarView::LLToolBarView(const LLToolBarView::Params& p)
mToolbarRight(NULL),
mToolbarBottom(NULL),
mDragStarted(false),
- mDragToolbarButton(NULL)
+ mDragToolbarButton(NULL),
+ mToolbarsLoaded(false)
{
}
@@ -244,6 +245,7 @@ bool LLToolBarView::loadToolbars(bool force_default)
}
}
}
+ mToolbarsLoaded = true;
return true;
}
@@ -255,6 +257,10 @@ bool LLToolBarView::loadDefaultToolbars()
if (gToolBarView)
{
retval = gToolBarView->loadToolbars(true);
+ if (retval)
+ {
+ gToolBarView->saveToolbars();
+ }
}
return retval;
@@ -262,6 +268,9 @@ bool LLToolBarView::loadDefaultToolbars()
void LLToolBarView::saveToolbars() const
{
+ if (!mToolbarsLoaded)
+ return;
+
// Build the parameter tree from the toolbar data
LLToolBarView::ToolbarSet toolbar_set;
if (mToolbarLeft)
@@ -460,6 +469,9 @@ BOOL LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* t
int new_rank = toolbar->getRankFromPosition(x,y);
toolbar->addCommand(command_id, new_rank);
}
+
+ // Save the new toolbars configuration
+ gToolBarView->saveToolbars();
}
else
{
diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h
index 8cafbc9308..ea14e471cd 100644
--- a/indra/newview/lltoolbarview.h
+++ b/indra/newview/lltoolbarview.h
@@ -100,6 +100,7 @@ private:
LLToolBar* mToolbarLeft;
LLToolBar* mToolbarRight;
LLToolBar* mToolbarBottom;
+ bool mToolbarsLoaded;
bool mDragStarted;
LLToolBarButton* mDragToolbarButton;
--
cgit v1.2.3
From a22a2412da437835167e92545c0662f27fb1fb5c Mon Sep 17 00:00:00 2001
From: Leslie Linden
Date: Wed, 26 Oct 2011 16:40:27 -0700
Subject: Disabling display of Received Items panel unless the folder exists
---
indra/newview/app_settings/settings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 3c53a9d44c..9f01674efe 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -4257,7 +4257,7 @@
Type
Boolean
Value
- 1
+ 0
InventoryDisplayOutbox
--
cgit v1.2.3
From dbf7bdfe8f266ffb95a6a1def58ccbf46f63eb1c Mon Sep 17 00:00:00 2001
From: Merov Linden
Date: Mon, 24 Oct 2011 14:14:55 -0700
Subject: EXP-1354 : Fixed. Toolbars now saved whenever changing their config
and only if initialized correctly.
---
indra/newview/lltoolbarview.cpp | 14 +++++++++++++-
indra/newview/lltoolbarview.h | 1 +
2 files changed, 14 insertions(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index 619d17efad..5d2cebe031 100644
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -72,7 +72,8 @@ LLToolBarView::LLToolBarView(const LLToolBarView::Params& p)
mToolbarRight(NULL),
mToolbarBottom(NULL),
mDragStarted(false),
- mDragToolbarButton(NULL)
+ mDragToolbarButton(NULL),
+ mToolbarsLoaded(false)
{
}
@@ -240,6 +241,7 @@ bool LLToolBarView::loadToolbars(bool force_default)
}
}
}
+ mToolbarsLoaded = true;
return true;
}
@@ -251,6 +253,10 @@ bool LLToolBarView::loadDefaultToolbars()
if (gToolBarView)
{
retval = gToolBarView->loadToolbars(true);
+ if (retval)
+ {
+ gToolBarView->saveToolbars();
+ }
}
return retval;
@@ -258,6 +264,9 @@ bool LLToolBarView::loadDefaultToolbars()
void LLToolBarView::saveToolbars() const
{
+ if (!mToolbarsLoaded)
+ return;
+
// Build the parameter tree from the toolbar data
LLToolBarView::ToolbarSet toolbar_set;
if (mToolbarLeft)
@@ -440,6 +449,9 @@ BOOL LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* t
int new_rank = toolbar->getRankFromPosition(x,y);
toolbar->addCommand(command_id, new_rank);
}
+
+ // Save the new toolbars configuration
+ gToolBarView->saveToolbars();
}
else
{
diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h
index 60ad6316f8..2b26db3802 100644
--- a/indra/newview/lltoolbarview.h
+++ b/indra/newview/lltoolbarview.h
@@ -98,6 +98,7 @@ private:
LLToolBar* mToolbarLeft;
LLToolBar* mToolbarRight;
LLToolBar* mToolbarBottom;
+ bool mToolbarsLoaded;
bool mDragStarted;
LLToolBarButton* mDragToolbarButton;
--
cgit v1.2.3
From b3c1e967ee9aa1b19622fe7b40e73417ac931b1d Mon Sep 17 00:00:00 2001
From: Merov Linden
Date: Mon, 24 Oct 2011 15:42:07 -0700
Subject: EXP-1354 : FIX. Force loading the default toolbars if the user
toolbar loading fails somewhat.
---
indra/newview/lltoolbarview.cpp | 32 ++++++++++++++++++++++++--------
1 file changed, 24 insertions(+), 8 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index f481455834..9eea49914f 100644
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -151,6 +151,7 @@ bool LLToolBarView::addCommand(const LLCommandId& command, LLToolBar* toolbar)
bool LLToolBarView::loadToolbars(bool force_default)
{
LLToolBarView::ToolbarSet toolbar_set;
+ bool err = false;
// Load the toolbars.xml file
std::string toolbar_file = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "toolbars.xml");
@@ -165,24 +166,39 @@ bool LLToolBarView::loadToolbars(bool force_default)
}
LLXMLNodePtr root;
- if(!LLXMLNode::parseFile(toolbar_file, root, NULL))
+ if (!LLXMLNode::parseFile(toolbar_file, root, NULL))
{
llwarns << "Unable to load toolbars from file: " << toolbar_file << llendl;
- return false;
+ err = true;
}
- if(!root->hasName("toolbars"))
+
+ if (!err && !root->hasName("toolbars"))
{
llwarns << toolbar_file << " is not a valid toolbars definition file" << llendl;
- return false;
+ err = true;
}
// Parse the toolbar settings
LLXUIParser parser;
- parser.readXUI(root, toolbar_set, toolbar_file);
- if (!toolbar_set.validateBlock())
+ if (!err)
{
- llerrs << "Unable to validate toolbars from file: " << toolbar_file << llendl;
- return false;
+ parser.readXUI(root, toolbar_set, toolbar_file);
+ }
+ if (!err && !toolbar_set.validateBlock())
+ {
+ llwarns << "Unable to validate toolbars from file: " << toolbar_file << llendl;
+ err = true;
+ }
+
+ if (err)
+ {
+ if (force_default)
+ {
+ llerrs << "Unable to load toolbars from default file : " << toolbar_file << llendl;
+ return false;
+ }
+ // Try to load the default toolbars
+ return loadToolbars(true);
}
// Clear the toolbars now before adding the loaded commands and settings
--
cgit v1.2.3
From 4af2cc2e743a79944df6aef6d209ea8b8a1c33e2 Mon Sep 17 00:00:00 2001
From: Leslie Linden
Date: Mon, 24 Oct 2011 15:52:50 -0700
Subject: EXP-1421 FIX -- Linden Dollars Still visually looks like a button.
* L$ background color now matches the menu bar. The tooltip and click behavior
have been left untouched, per design.
---
indra/newview/skins/default/xui/en/panel_status_bar.xml | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml
index 422bbada7f..b321e0162e 100644
--- a/indra/newview/skins/default/xui/en/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml
@@ -2,7 +2,7 @@
+ follows="right|top"
+ name="balance_bg">
+ DisplayDestinationsOnInitialRun
+
+ Comment
+ Display the destinations guide when a user first launches FUI.
+ Persist
+ 1
+ Type
+ Boolean
+ Value
+ 1
+
LastInventoryInboxActivity
Comment
diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp
index 66f644748e..f527937e8f 100644
--- a/indra/newview/llfloatertoybox.cpp
+++ b/indra/newview/llfloatertoybox.cpp
@@ -63,6 +63,7 @@ BOOL LLFloaterToybox::postBuild()
mToolBar->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
mToolBar->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
mToolBar->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
+ mToolBar->setButtonEnterCallback(boost::bind(&LLFloaterToybox::onToolBarButtonEnter,this,_1));
//
// Sort commands by localized labels so they will appear alphabetized in all languages
@@ -105,8 +106,8 @@ void LLFloaterToybox::draw()
{
const LLCommandId& id = *it;
- const bool commandOnToolbar = gToolBarView->hasCommand(id);
- mToolBar->enableCommand(id, !commandOnToolbar);
+ const bool command_not_present = (gToolBarView->hasCommand(id) == LLToolBarView::TOOLBAR_NONE);
+ mToolBar->enableCommand(id, command_not_present);
}
LLFloater::draw();
@@ -140,5 +141,30 @@ BOOL LLFloaterToybox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
return mToolBar->handleDragAndDrop(local_x, local_y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
}
+void LLFloaterToybox::onToolBarButtonEnter(LLView* button)
+{
+ std::string suffix = "";
+
+ LLCommandId commandId(button->getName());
+ LLCommand* command = LLCommandManager::instance().getCommand(commandId);
+
+ if (command)
+ {
+ S32 command_loc = gToolBarView->hasCommand(commandId);
+
+ switch(command_loc)
+ {
+ case LLToolBarView::TOOLBAR_BOTTOM: suffix = LLTrans::getString("Toolbar_Bottom_Tooltip"); break;
+ case LLToolBarView::TOOLBAR_LEFT: suffix = LLTrans::getString("Toolbar_Left_Tooltip"); break;
+ case LLToolBarView::TOOLBAR_RIGHT: suffix = LLTrans::getString("Toolbar_Right_Tooltip"); break;
+
+ default:
+ break;
+ }
+ }
+
+ mToolBar->setTooltipButtonSuffix(suffix);
+}
+
// eof
diff --git a/indra/newview/llfloatertoybox.h b/indra/newview/llfloatertoybox.h
index 62bf68680d..6f0275b8fe 100644
--- a/indra/newview/llfloatertoybox.h
+++ b/indra/newview/llfloatertoybox.h
@@ -52,6 +52,8 @@ public:
protected:
void onBtnRestoreDefaults();
+ void onToolBarButtonEnter(LLView* button);
+
public:
LLToolBar * mToolBar;
};
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index 9eea49914f..8f4f7d405f 100644
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -69,13 +69,14 @@ LLToolBarView::ToolbarSet::ToolbarSet()
LLToolBarView::LLToolBarView(const LLToolBarView::Params& p)
: LLUICtrl(p),
- mToolbarLeft(NULL),
- mToolbarRight(NULL),
- mToolbarBottom(NULL),
mDragStarted(false),
mDragToolbarButton(NULL),
mToolbarsLoaded(false)
{
+ for (S32 i = 0; i < TOOLBAR_COUNT; i++)
+ {
+ mToolbars[i] = NULL;
+ }
}
void LLToolBarView::initFromParams(const LLToolBarView::Params& p)
@@ -91,49 +92,99 @@ LLToolBarView::~LLToolBarView()
BOOL LLToolBarView::postBuild()
{
- mToolbarLeft = getChild("toolbar_left");
- mToolbarRight = getChild("toolbar_right");
- mToolbarBottom = getChild("toolbar_bottom");
-
- mToolbarLeft->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
- mToolbarLeft->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
- mToolbarLeft->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
- mToolbarLeft->setButtonAddCallback(boost::bind(LLToolBarView::onToolBarButtonAdded, _1));
-
- mToolbarRight->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
- mToolbarRight->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
- mToolbarRight->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
- mToolbarRight->setButtonAddCallback(boost::bind(LLToolBarView::onToolBarButtonAdded, _1));
-
- mToolbarBottom->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
- mToolbarBottom->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
- mToolbarBottom->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
- mToolbarBottom->setButtonAddCallback(boost::bind(LLToolBarView::onToolBarButtonAdded, _1));
+ mToolbars[TOOLBAR_LEFT] = getChild("toolbar_left");
+ mToolbars[TOOLBAR_RIGHT] = getChild("toolbar_right");
+ mToolbars[TOOLBAR_BOTTOM] = getChild("toolbar_bottom");
+
+ for (int i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++)
+ {
+ mToolbars[i]->setStartDragCallback(boost::bind(LLToolBarView::startDragTool,_1,_2,_3));
+ mToolbars[i]->setHandleDragCallback(boost::bind(LLToolBarView::handleDragTool,_1,_2,_3,_4));
+ mToolbars[i]->setHandleDropCallback(boost::bind(LLToolBarView::handleDropTool,_1,_2,_3,_4));
+ mToolbars[i]->setButtonAddCallback(boost::bind(LLToolBarView::onToolBarButtonAdded,_1));
+ }
LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&handleLoginToolbarSetup));
return TRUE;
}
-bool LLToolBarView::hasCommand(const LLCommandId& commandId) const
+S32 LLToolBarView::hasCommand(const LLCommandId& commandId) const
{
- bool has_command = false;
- if (mToolbarLeft && !has_command)
+ S32 command_location = TOOLBAR_NONE;
+
+ for (S32 loc = TOOLBAR_FIRST; loc <= TOOLBAR_LAST; loc++)
{
- has_command = mToolbarLeft->hasCommand(commandId);
+ if (mToolbars[loc]->hasCommand(commandId))
+ {
+ command_location = loc;
+ break;
+ }
}
- if (mToolbarRight && !has_command)
+
+ return command_location;
+}
+
+S32 LLToolBarView::addCommand(const LLCommandId& commandId, EToolBarLocation toolbar, int rank)
+{
+ int old_rank;
+ removeCommand(commandId, old_rank);
+
+ S32 command_location = mToolbars[toolbar]->addCommand(commandId, rank);
+
+ return command_location;
+}
+
+S32 LLToolBarView::removeCommand(const LLCommandId& commandId, int& rank)
+{
+ S32 command_location = hasCommand(commandId);
+ rank = LLToolBar::RANK_NONE;
+
+ if (command_location != TOOLBAR_NONE)
+ {
+ rank = mToolbars[command_location]->removeCommand(commandId);
+ }
+
+ return command_location;
+}
+
+S32 LLToolBarView::enableCommand(const LLCommandId& commandId, bool enabled)
+{
+ S32 command_location = hasCommand(commandId);
+
+ if (command_location != TOOLBAR_NONE)
{
- has_command = mToolbarRight->hasCommand(commandId);
+ mToolbars[command_location]->enableCommand(commandId, enabled);
}
- if (mToolbarBottom && !has_command)
+
+ return command_location;
+}
+
+S32 LLToolBarView::stopCommandInProgress(const LLCommandId& commandId)
+{
+ S32 command_location = hasCommand(commandId);
+
+ if (command_location != TOOLBAR_NONE)
+ {
+ mToolbars[command_location]->stopCommandInProgress(commandId);
+ }
+
+ return command_location;
+}
+
+S32 LLToolBarView::flashCommand(const LLCommandId& commandId, bool flash)
+{
+ S32 command_location = hasCommand(commandId);
+
+ if (command_location != TOOLBAR_NONE)
{
- has_command = mToolbarBottom->hasCommand(commandId);
+ mToolbars[command_location]->flashCommand(commandId, flash);
}
- return has_command;
+
+ return command_location;
}
-bool LLToolBarView::addCommand(const LLCommandId& command, LLToolBar* toolbar)
+bool LLToolBarView::addCommandInternal(const LLCommandId& command, LLToolBar* toolbar)
{
LLCommandManager& mgr = LLCommandManager::instance();
if (mgr.getCommand(command))
@@ -166,7 +217,7 @@ bool LLToolBarView::loadToolbars(bool force_default)
}
LLXMLNodePtr root;
- if (!LLXMLNode::parseFile(toolbar_file, root, NULL))
+ if(!LLXMLNode::parseFile(toolbar_file, root, NULL))
{
llwarns << "Unable to load toolbars from file: " << toolbar_file << llendl;
err = true;
@@ -182,7 +233,7 @@ bool LLToolBarView::loadToolbars(bool force_default)
LLXUIParser parser;
if (!err)
{
- parser.readXUI(root, toolbar_set, toolbar_file);
+ parser.readXUI(root, toolbar_set, toolbar_file);
}
if (!err && !toolbar_set.validateBlock())
{
@@ -195,69 +246,64 @@ bool LLToolBarView::loadToolbars(bool force_default)
if (force_default)
{
llerrs << "Unable to load toolbars from default file : " << toolbar_file << llendl;
- return false;
- }
+ return false;
+ }
// Try to load the default toolbars
return loadToolbars(true);
}
// Clear the toolbars now before adding the loaded commands and settings
- if (mToolbarLeft)
- {
- mToolbarLeft->clearCommandsList();
- }
- if (mToolbarRight)
- {
- mToolbarRight->clearCommandsList();
- }
- if (mToolbarBottom)
+ for (S32 i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++)
{
- mToolbarBottom->clearCommandsList();
+ if (mToolbars[i])
+ {
+ mToolbars[i]->clearCommandsList();
+ }
}
// Add commands to each toolbar
- if (toolbar_set.left_toolbar.isProvided() && mToolbarLeft)
+ if (toolbar_set.left_toolbar.isProvided() && mToolbars[TOOLBAR_LEFT])
{
if (toolbar_set.left_toolbar.button_display_mode.isProvided())
{
LLToolBarEnums::ButtonType button_type = toolbar_set.left_toolbar.button_display_mode;
- mToolbarLeft->setButtonType(button_type);
+ mToolbars[TOOLBAR_LEFT]->setButtonType(button_type);
}
- BOOST_FOREACH(const LLCommandId::Params& command_name_param, toolbar_set.left_toolbar.commands)
+ BOOST_FOREACH(const LLCommandId::Params& command_params, toolbar_set.left_toolbar.commands)
{
- if (addCommand(LLCommandId(command_name_param), mToolbarLeft) == false)
+ if (addCommandInternal(LLCommandId(command_params), mToolbars[TOOLBAR_LEFT]))
{
- llwarns << "Error adding command '" << command_name_param.name() << "' to left toolbar." << llendl;
+ llwarns << "Error adding command '" << command_params.name() << "' to left toolbar." << llendl;
}
}
}
- if (toolbar_set.right_toolbar.isProvided() && mToolbarRight)
+ if (toolbar_set.right_toolbar.isProvided() && mToolbars[TOOLBAR_RIGHT])
{
if (toolbar_set.right_toolbar.button_display_mode.isProvided())
{
LLToolBarEnums::ButtonType button_type = toolbar_set.right_toolbar.button_display_mode;
- mToolbarRight->setButtonType(button_type);
+ mToolbars[TOOLBAR_RIGHT]->setButtonType(button_type);
}
- BOOST_FOREACH(const LLCommandId::Params& command_name_param, toolbar_set.right_toolbar.commands)
+ BOOST_FOREACH(const LLCommandId::Params& command_params, toolbar_set.right_toolbar.commands)
{
- if (addCommand(LLCommandId(command_name_param), mToolbarRight) == false)
+ if (addCommandInternal(LLCommandId(command_params), mToolbars[TOOLBAR_RIGHT]))
{
- llwarns << "Error adding command '" << command_name_param.name() << "' to right toolbar." << llendl;
+ llwarns << "Error adding command '" << command_params.name() << "' to right toolbar." << llendl;
}
}
}
- if (toolbar_set.bottom_toolbar.isProvided() && mToolbarBottom)
+ if (toolbar_set.bottom_toolbar.isProvided() && mToolbars[TOOLBAR_BOTTOM])
{
if (toolbar_set.bottom_toolbar.button_display_mode.isProvided())
{
LLToolBarEnums::ButtonType button_type = toolbar_set.bottom_toolbar.button_display_mode;
- mToolbarBottom->setButtonType(button_type);
+ mToolbars[TOOLBAR_BOTTOM]->setButtonType(button_type);
}
- BOOST_FOREACH(const LLCommandId::Params& command_name_param, toolbar_set.bottom_toolbar.commands)
+ BOOST_FOREACH(const LLCommandId::Params& command_params, toolbar_set.bottom_toolbar.commands)
{
- if (addCommand(LLCommandId(command_name_param), mToolbarBottom) == false)
+ if (addCommandInternal(LLCommandId(command_params), mToolbars[TOOLBAR_BOTTOM]))
{
- llwarns << "Error adding command '" << command_name_param.name() << "' to bottom toolbar." << llendl;
+ llwarns << "Error adding command '" << command_params.name() << "' to bottom toolbar." << llendl;
}
}
}
@@ -289,20 +335,20 @@ void LLToolBarView::saveToolbars() const
// Build the parameter tree from the toolbar data
LLToolBarView::ToolbarSet toolbar_set;
- if (mToolbarLeft)
+ if (mToolbars[TOOLBAR_LEFT])
{
- toolbar_set.left_toolbar.button_display_mode = mToolbarLeft->getButtonType();
- addToToolset(mToolbarLeft->getCommandsList(),toolbar_set.left_toolbar);
+ toolbar_set.left_toolbar.button_display_mode = mToolbars[TOOLBAR_LEFT]->getButtonType();
+ addToToolset(mToolbars[TOOLBAR_LEFT]->getCommandsList(), toolbar_set.left_toolbar);
}
- if (mToolbarRight)
+ if (mToolbars[TOOLBAR_RIGHT])
{
- toolbar_set.right_toolbar.button_display_mode = mToolbarRight->getButtonType();
- addToToolset(mToolbarRight->getCommandsList(),toolbar_set.right_toolbar);
+ toolbar_set.right_toolbar.button_display_mode = mToolbars[TOOLBAR_RIGHT]->getButtonType();
+ addToToolset(mToolbars[TOOLBAR_RIGHT]->getCommandsList(), toolbar_set.right_toolbar);
}
- if (mToolbarBottom)
+ if (mToolbars[TOOLBAR_BOTTOM])
{
- toolbar_set.bottom_toolbar.button_display_mode = mToolbarBottom->getButtonType();
- addToToolset(mToolbarBottom->getCommandsList(),toolbar_set.bottom_toolbar);
+ toolbar_set.bottom_toolbar.button_display_mode = mToolbars[TOOLBAR_BOTTOM]->getButtonType();
+ addToToolset(mToolbars[TOOLBAR_BOTTOM]->getCommandsList(), toolbar_set.bottom_toolbar);
}
// Serialize the parameter tree
@@ -361,33 +407,36 @@ void LLToolBarView::onToolBarButtonAdded(LLView* button)
void LLToolBarView::draw()
{
- //LLPanel* sizer_left = getChild("sizer_left");
+ LLRect toolbar_rects[TOOLBAR_COUNT];
- LLRect bottom_rect, left_rect, right_rect;
-
- if (mToolbarBottom)
- {
- mToolbarBottom->getParent()->reshape(mToolbarBottom->getParent()->getRect().getWidth(), mToolbarBottom->getRect().getHeight());
- mToolbarBottom->localRectToOtherView(mToolbarBottom->getLocalRect(), &bottom_rect, this);
- }
- if (mToolbarLeft)
+ for (S32 i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++)
{
- mToolbarLeft->getParent()->reshape(mToolbarLeft->getRect().getWidth(), mToolbarLeft->getParent()->getRect().getHeight());
- mToolbarLeft->localRectToOtherView(mToolbarLeft->getLocalRect(), &left_rect, this);
- }
- if (mToolbarRight)
- {
- mToolbarRight->getParent()->reshape(mToolbarRight->getRect().getWidth(), mToolbarRight->getParent()->getRect().getHeight());
- mToolbarRight->localRectToOtherView(mToolbarRight->getLocalRect(), &right_rect, this);
+ if (mToolbars[i])
+ {
+ LLLayoutStack::ELayoutOrientation orientation = LLToolBarEnums::getOrientation(mToolbars[i]->getSideType());
+
+ if (orientation == LLLayoutStack::HORIZONTAL)
+ {
+ mToolbars[i]->getParent()->reshape(mToolbars[i]->getParent()->getRect().getWidth(), mToolbars[i]->getRect().getHeight());
+ }
+ else
+ {
+ mToolbars[i]->getParent()->reshape(mToolbars[i]->getRect().getWidth(), mToolbars[i]->getParent()->getRect().getHeight());
+ }
+
+ mToolbars[i]->localRectToOtherView(mToolbars[i]->getLocalRect(), &toolbar_rects[i], this);
+ }
}
// Draw drop zones if drop of a tool is active
if (isToolDragged())
{
LLColor4 drop_color = LLUIColorTable::instance().getColor( "ToolbarDropZoneColor" );
- gl_rect_2d(bottom_rect, drop_color, TRUE);
- gl_rect_2d(left_rect, drop_color, TRUE);
- gl_rect_2d(right_rect, drop_color, TRUE);
+
+ for (S32 i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++)
+ {
+ gl_rect_2d(toolbar_rects[i], drop_color, TRUE);
+ }
}
LLUICtrl::draw();
@@ -399,9 +448,9 @@ void LLToolBarView::draw()
// ----------------------------------------
-void LLToolBarView::startDragTool(S32 x, S32 y, LLToolBarButton* button)
+void LLToolBarView::startDragTool(S32 x, S32 y, LLToolBarButton* toolbarButton)
{
- resetDragTool(button);
+ resetDragTool(toolbarButton);
// Flag the tool dragging but don't start it yet
LLToolDragAndDrop::getInstance()->setDragStart( x, y );
@@ -427,9 +476,7 @@ BOOL LLToolBarView::handleDragTool( S32 x, S32 y, const LLUUID& uuid, LLAssetTyp
// Second, stop the command if it is in progress and requires stopping!
LLCommandId command_id = LLCommandId(uuid);
- gToolBarView->mToolbarLeft->stopCommandInProgress(command_id);
- gToolBarView->mToolbarRight->stopCommandInProgress(command_id);
- gToolBarView->mToolbarBottom->stopCommandInProgress(command_id);
+ gToolBarView->stopCommandInProgress(command_id);
gToolBarView->mDragStarted = true;
return TRUE;
@@ -460,10 +507,10 @@ BOOL LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* t
{
// Suppress the command from the toolbars (including the one it's dropped in,
// this will handle move position).
- bool command_present = gToolBarView->hasCommand(command_id);
+ S32 old_toolbar_loc = gToolBarView->hasCommand(command_id);
LLToolBar* old_toolbar = NULL;
- if (command_present)
+ if (old_toolbar_loc != TOOLBAR_NONE)
{
llassert(gToolBarView->mDragToolbarButton);
old_toolbar = gToolBarView->mDragToolbarButton->getParentByType();
@@ -473,9 +520,8 @@ BOOL LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* t
}
else
{
- gToolBarView->mToolbarBottom->removeCommand(command_id);
- gToolBarView->mToolbarLeft->removeCommand(command_id);
- gToolBarView->mToolbarRight->removeCommand(command_id);
+ int old_rank = LLToolBar::RANK_NONE;
+ gToolBarView->removeCommand(command_id, old_rank);
}
}
@@ -499,27 +545,29 @@ BOOL LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* t
return handled;
}
-void LLToolBarView::resetDragTool(LLToolBarButton* button)
+void LLToolBarView::resetDragTool(LLToolBarButton* toolbarButton)
{
// Clear the saved command, toolbar and rank
gToolBarView->mDragStarted = false;
- gToolBarView->mDragToolbarButton = button;
+ gToolBarView->mDragToolbarButton = toolbarButton;
}
void LLToolBarView::setToolBarsVisible(bool visible)
{
- mToolbarBottom->getParent()->setVisible(visible);
- mToolbarLeft->getParent()->setVisible(visible);
- mToolbarRight->getParent()->setVisible(visible);
+ for (S32 i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++)
+ {
+ mToolbars[i]->getParent()->setVisible(visible);
+ }
}
bool LLToolBarView::isModified() const
{
bool modified = false;
- modified |= mToolbarBottom->isModified();
- modified |= mToolbarLeft->isModified();
- modified |= mToolbarRight->isModified();
+ for (S32 i = TOOLBAR_FIRST; i <= TOOLBAR_LAST; i++)
+ {
+ modified |= mToolbars[i]->isModified();
+ }
return modified;
}
@@ -532,9 +580,11 @@ bool LLToolBarView::isModified() const
void handleLoginToolbarSetup()
{
// Open the destinations guide by default on first login, per Rhett
- if (gSavedSettings.getBOOL("FirstLoginThisInstall") || gAgent.isFirstLogin())
+ if (gSavedPerAccountSettings.getBOOL("DisplayDestinationsOnInitialRun") || gAgent.isFirstLogin())
{
LLFloaterReg::showInstance("destinations");
+
+ gSavedPerAccountSettings.setBOOL("DisplayDestinationsOnInitialRun", FALSE);
}
}
diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h
index ea14e471cd..3dc8954abe 100644
--- a/indra/newview/lltoolbarview.h
+++ b/indra/newview/lltoolbarview.h
@@ -39,6 +39,19 @@ class LLUICtrlFactory;
class LLToolBarView : public LLUICtrl
{
public:
+ typedef enum
+ {
+ TOOLBAR_NONE = 0,
+ TOOLBAR_LEFT,
+ TOOLBAR_RIGHT,
+ TOOLBAR_BOTTOM,
+
+ TOOLBAR_COUNT,
+
+ TOOLBAR_FIRST = TOOLBAR_LEFT,
+ TOOLBAR_LAST = TOOLBAR_BOTTOM,
+ } EToolBarLocation;
+
// Xui structure of the toolbar panel
struct Params : public LLInitParam::Block {};
@@ -52,6 +65,7 @@ public:
{
Mandatory button_display_mode;
Multiple commands;
+
Toolbar();
};
struct ToolbarSet : public LLInitParam::Block
@@ -59,6 +73,7 @@ public:
Optional left_toolbar,
right_toolbar,
bottom_toolbar;
+
ToolbarSet();
};
@@ -66,9 +81,16 @@ public:
virtual ~LLToolBarView();
virtual BOOL postBuild();
virtual void draw();
+
// Toolbar view interface with the rest of the world
- // Checks if the commandId is being used somewhere in one of the toolbars
- bool hasCommand(const LLCommandId& commandId) const;
+ // Checks if the commandId is being used somewhere in one of the toolbars, returns EToolBarLocation
+ S32 hasCommand(const LLCommandId& commandId) const;
+ S32 addCommand(const LLCommandId& commandId, EToolBarLocation toolbar, int rank = LLToolBar::RANK_NONE);
+ S32 removeCommand(const LLCommandId& commandId, int& rank); // Sets the rank the removed command was at, RANK_NONE if not found
+ S32 enableCommand(const LLCommandId& commandId, bool enabled);
+ S32 stopCommandInProgress(const LLCommandId& commandId);
+ S32 flashCommand(const LLCommandId& commandId, bool flash);
+
// Loads the toolbars from the existing user or default settings
bool loadToolbars(bool force_default = false); // return false if load fails
@@ -76,10 +98,10 @@ public:
static bool loadDefaultToolbars();
- static void startDragTool(S32 x, S32 y, LLToolBarButton* button);
+ static void startDragTool(S32 x, S32 y, LLToolBarButton* toolbarButton);
static BOOL handleDragTool(S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type);
static BOOL handleDropTool(void* cargo_data, S32 x, S32 y, LLToolBar* toolbar);
- static void resetDragTool(LLToolBarButton* button);
+ static void resetDragTool(LLToolBarButton* toolbarButton);
bool isModified() const;
@@ -91,15 +113,13 @@ protected:
private:
void saveToolbars() const;
- bool addCommand(const LLCommandId& commandId, LLToolBar* toolbar);
+ bool addCommandInternal(const LLCommandId& commandId, LLToolBar* toolbar);
void addToToolset(command_id_list_t& command_list, Toolbar& toolbar) const;
static void onToolBarButtonAdded(LLView* button);
// Pointers to the toolbars handled by the toolbar view
- LLToolBar* mToolbarLeft;
- LLToolBar* mToolbarRight;
- LLToolBar* mToolbarBottom;
+ LLToolBar* mToolbars[TOOLBAR_COUNT];
bool mToolbarsLoaded;
bool mDragStarted;
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 308208869d..5e5bc0bde0 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -3705,7 +3705,11 @@ Try enclosing path to the editor with double quotes.
Changing camera angle
Volume controls for calls and people near you in world
-
+ currently in your bottom toolbar
+ currently in your left toolbar
+ currently in your right toolbar
+
+
Retain%
Detail
Better Detail
diff --git a/indra/newview/skins/default/xui/en/widgets/toolbar.xml b/indra/newview/skins/default/xui/en/widgets/toolbar.xml
index 7e7a9c61cf..0aa478ace9 100644
--- a/indra/newview/skins/default/xui/en/widgets/toolbar.xml
+++ b/indra/newview/skins/default/xui/en/widgets/toolbar.xml
@@ -30,6 +30,8 @@
image_overlay_alignment="left"
use_ellipses="true"
auto_resize="true"
+ button_flash_count="99999"
+ button_flash_rate="1.0"
flash_color="EmphasisColor"/>
--
cgit v1.2.3
From 8874ac39c1928bcb70c4f63cd3cfaeb75712d00e Mon Sep 17 00:00:00 2001
From: Leslie Linden
Date: Mon, 24 Oct 2011 17:06:48 -0700
Subject: EXP-1462 FIX -- Moving speak button or voice settings button between
toolbars can cause viewer to crash on Mac
* Updated iterator code to not erase stuff while we're iterating through it!
Reviewed by Richard.
---
indra/newview/lltransientfloatermgr.cpp | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/lltransientfloatermgr.cpp b/indra/newview/lltransientfloatermgr.cpp
index d15efb048b..3d68c10489 100644
--- a/indra/newview/lltransientfloatermgr.cpp
+++ b/indra/newview/lltransientfloatermgr.cpp
@@ -104,6 +104,8 @@ void LLTransientFloaterMgr::hideTransientFloaters(S32 x, S32 y)
bool LLTransientFloaterMgr::isControlClicked(ETransientGroup group, controls_set_t& set, S32 x, S32 y)
{
+ std::list< LLHandle > dead_handles;
+
bool res = true;
for (controls_set_t::iterator it = set.begin(); it
!= set.end(); it++)
@@ -113,7 +115,7 @@ bool LLTransientFloaterMgr::isControlClicked(ETransientGroup group, controls_set
LLHandle handle = *it;
if (handle.isDead())
{
- mGroupControls.find(group)->second.erase(handle);
+ dead_handles.push_back(handle);
continue;
}
@@ -132,6 +134,13 @@ bool LLTransientFloaterMgr::isControlClicked(ETransientGroup group, controls_set
break;
}
}
+
+ for (std::list< LLHandle >::iterator it = dead_handles.begin(); it != dead_handles.end(); ++it)
+ {
+ LLHandle handle = *it;
+ mGroupControls.find(group)->second.erase(handle);
+ }
+
return res;
}
--
cgit v1.2.3
From 5b0a1ac026e0ca06526cc0c03325b223a051ea63 Mon Sep 17 00:00:00 2001
From: Merov Linden
Date: Mon, 24 Oct 2011 19:24:58 -0700
Subject: EXP-1460 : Make the caret in favorites toolbar display more
consistently and with less finicky hit testing
---
indra/newview/llfavoritesbar.cpp | 58 +++++++++++++++++++---------------------
1 file changed, 28 insertions(+), 30 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index c48b809114..6c9058caf1 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -443,17 +443,17 @@ BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
{
setLandingTab(dest);
}
- /*
- * the condition dest == NULL can be satisfied not only in the case
- * of dragging to the right from the last tab of the favbar. there is a
- * small gap between each tab. if the user drags something exactly there
- * then mLandingTab will be set to NULL and the dragged item will be pushed
- * to the end of the favorites bar. this is incorrect behavior. that's why
- * we need an additional check which excludes the case described previously
- * making sure that the mouse pointer is beyond the last tab.
- */
- else if (mLastTab && x >= mLastTab->getRect().mRight)
+ else if (mLastTab && (x >= mLastTab->getRect().mRight))
{
+ /*
+ * the condition dest == NULL can be satisfied not only in the case
+ * of dragging to the right from the last tab of the favbar. there is a
+ * small gap between each tab. if the user drags something exactly there
+ * then mLandingTab will be set to NULL and the dragged item will be pushed
+ * to the end of the favorites bar. this is incorrect behavior. that's why
+ * we need an additional check which excludes the case described previously
+ * making sure that the mouse pointer is beyond the last tab.
+ */
setLandingTab(NULL);
}
@@ -467,7 +467,6 @@ BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
if (drop)
{
handleExistingFavoriteDragAndDrop(x, y);
- showDragMarker(FALSE);
}
}
else
@@ -490,7 +489,6 @@ BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
setLandingTab(NULL);
}
handleNewFavoriteDragAndDrop(item, favorites_id, x, y);
- showDragMarker(FALSE);
}
}
}
@@ -664,7 +662,7 @@ void LLFavoritesBarCtrl::draw()
{
// mouse pointer hovers over an existing tab
LLRect rect = mLandingTab->getRect();
- mImageDragIndication->draw(rect.mLeft - w/2, rect.getHeight(), w, h);
+ mImageDragIndication->draw(rect.mLeft, rect.getHeight(), w, h);
}
else if (mLastTab)
{
@@ -672,6 +670,8 @@ void LLFavoritesBarCtrl::draw()
LLRect rect = mLastTab->getRect();
mImageDragIndication->draw(rect.mRight, rect.getHeight(), w, h);
}
+ // Once drawn, mark this false so we won't draw it again (unless we hit the favorite bar again)
+ mShowDragMarker = FALSE;
}
}
@@ -743,7 +743,7 @@ void LLFavoritesBarCtrl::updateButtons()
if (first_changed_item_index <= mItems.count())
{
// Rebuild the buttons only
- // child_list_t is a linked list, so safe to erase from the middle if we pre-incrament the iterator
+ // child_list_t is a linked list, so safe to erase from the middle if we pre-increment the iterator
while (child_it != childs->end())
{
@@ -832,9 +832,9 @@ LLButton* LLFavoritesBarCtrl::createButton(const LLPointergetWidth(item->getName()) + 20;
int width = required_width > def_button_width? def_button_width : required_width;
@@ -862,7 +862,6 @@ LLButton* LLFavoritesBarCtrl::createButton(const LLPointersetRect(butt_rect);
// change only left and save bottom
fav_btn->setFont(mFont);
- fav_btn->setName(item->getName());
fav_btn->setLabel(item->getName());
fav_btn->setToolTip(item->getName());
fav_btn->setCommitCallback(boost::bind(&LLFavoritesBarCtrl::onButtonClick, this, item->getUUID()));
@@ -1320,25 +1319,24 @@ BOOL LLFavoritesBarCtrl::handleHover(S32 x, S32 y, MASK mask)
LLUICtrl* LLFavoritesBarCtrl::findChildByLocalCoords(S32 x, S32 y)
{
- LLUICtrl* ctrl = 0;
- S32 screenX, screenY;
+ LLUICtrl* ctrl = NULL;
const child_list_t* list = getChildList();
- localPointToScreen(x, y, &screenX, &screenY);
-
- // look for a child which contains the point (screenX, screenY) in it's rectangle
for (child_list_const_iter_t i = list->begin(); i != list->end(); ++i)
{
- LLRect rect;
- localRectToScreen((*i)->getRect(), &rect);
-
- if (rect.pointInRect(screenX, screenY))
+ // Look only for children that are favorite buttons
+ if ((*i)->getName() == "favorites_bar_btn")
{
- ctrl = dynamic_cast(*i);
- break;
+ LLRect rect = (*i)->getRect();
+ // We consider a button hit if the cursor is left of the right side
+ // This makes the hit a bit less finicky than hitting directly on the button itself
+ if (x <= rect.mRight)
+ {
+ ctrl = dynamic_cast(*i);
+ break;
+ }
}
}
-
return ctrl;
}
--
cgit v1.2.3
From 69accb7dffed4b7cfdaa53e921ee198da0a95f16 Mon Sep 17 00:00:00 2001
From: Vadim ProductEngine
Date: Tue, 25 Oct 2011 15:37:12 +0200
Subject: STORM-1577 WIP Changed wording.
---
indra/newview/skins/default/xui/en/floater_translation_settings.xml | 6 +++---
indra/newview/skins/default/xui/en/panel_preferences_chat.xml | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/en/floater_translation_settings.xml b/indra/newview/skins/default/xui/en/floater_translation_settings.xml
index e36348e396..1eb75e40f3 100644
--- a/indra/newview/skins/default/xui/en/floater_translation_settings.xml
+++ b/indra/newview/skins/default/xui/en/floater_translation_settings.xml
@@ -6,7 +6,7 @@
name="floater_translation_settings"
help_topic="environment_editor_floater"
save_rect="true"
- title="TRANSLATION SETTINGS"
+ title="CHAT TRANSLATION SETTINGS"
width="480">
Bing appID not verified. Please try again.
@@ -17,7 +17,7 @@
- Choose translation service to use:
+ Choose translation service:
+ width="170">
--
cgit v1.2.3
From 56b2e4ac7c7cc4f27f08b4024ecbeace4c3a3e51 Mon Sep 17 00:00:00 2001
From: Vadim ProductEngine
Date: Tue, 25 Oct 2011 16:36:27 +0200
Subject: STORM-1577 WIP Indented floater contents.
---
.../default/xui/en/floater_translation_settings.xml | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/en/floater_translation_settings.xml b/indra/newview/skins/default/xui/en/floater_translation_settings.xml
index 1eb75e40f3..40fdaaed66 100644
--- a/indra/newview/skins/default/xui/en/floater_translation_settings.xml
+++ b/indra/newview/skins/default/xui/en/floater_translation_settings.xml
@@ -7,7 +7,7 @@
help_topic="environment_editor_floater"
save_rect="true"
title="CHAT TRANSLATION SETTINGS"
- width="480">
+ width="485">
Bing appID not verified. Please try again.
Google API key not verified. Please try again.
@@ -27,7 +27,7 @@
height="20"
follows="left|top"
layout="topleft"
- left="10"
+ left="40"
name="translate_language_label"
top_pad="20"
width="130">
@@ -118,7 +118,7 @@
follows="top|left|right"
height="15"
layout="topleft"
- left="10"
+ left="40"
name="tip"
top_pad="20"
width="330"
@@ -153,10 +153,10 @@
follows="top|right"
height="20"
layout="topleft"
- left="40"
+ left="70"
name="bing_api_key_label"
top_pad="-55"
- width="100">
+ width="85">
Bing [http://www.bing.com/developers/createapp.aspx AppID]:
+ width="210" />
InventoryDisplayOutbox
--
cgit v1.2.3
From a556fcf2784907ee3d7e9e6e6a3ae1f89dcf5aa0 Mon Sep 17 00:00:00 2001
From: Richard Linden
Date: Wed, 26 Oct 2011 17:38:44 -0700
Subject: EXP-1458 FIX Chat text entry bar does not have focus when chat
floater is opened while chat history is toggled open
---
.../skins/default/xui/en/floater_chat_bar.xml | 100 +++++++++++----------
1 file changed, 53 insertions(+), 47 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/en/floater_chat_bar.xml b/indra/newview/skins/default/xui/en/floater_chat_bar.xml
index 86191b789c..e7eb7652c7 100644
--- a/indra/newview/skins/default/xui/en/floater_chat_bar.xml
+++ b/indra/newview/skins/default/xui/en/floater_chat_bar.xml
@@ -15,6 +15,7 @@
min_height="60"
min_width="150"
can_resize="true"
+ default_tab_group="1"
name="chat_bar"
width="380">
-
-
-
-
-
+
+
+
+
+
--
cgit v1.2.3
From 95da0d5421b86b3c01fc372db28d7aa568ef0b16 Mon Sep 17 00:00:00 2001
From: eli
Date: Wed, 26 Oct 2011 18:45:06 -0700
Subject: FIX VWR-27349 Fix incorrect language name vs. native script name
formats for Chinese
---
.../skins/default/xui/zh/panel_preferences_general.xml | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/zh/panel_preferences_general.xml b/indra/newview/skins/default/xui/zh/panel_preferences_general.xml
index 29f9599c97..6827fab6e6 100644
--- a/indra/newview/skins/default/xui/zh/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/zh/panel_preferences_general.xml
@@ -5,15 +5,15 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
(須重新啟動)
--
cgit v1.2.3
From 5c868a90f2e30245771aa1ef402645d6d3f12ab1 Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)"
Date: Thu, 27 Oct 2011 17:39:07 -0400
Subject: SH-2635 FIX - always send crash report if previous session froze
---
indra/newview/llappviewer.cpp | 39 +++------------------------------------
1 file changed, 3 insertions(+), 36 deletions(-)
mode change 100644 => 100755 indra/newview/llappviewer.cpp
(limited to 'indra/newview')
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
old mode 100644
new mode 100755
index ecfd101eeb..dc88c81d6a
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2825,48 +2825,15 @@ void LLAppViewer::initUpdater()
void LLAppViewer::checkForCrash(void)
{
-
#if LL_SEND_CRASH_REPORTS
if (gLastExecEvent == LAST_EXEC_FROZE)
{
- llinfos << "Last execution froze, requesting to send crash report." << llendl;
- //
- // Pop up a freeze or crash warning dialog
- //
- S32 choice;
- const S32 cb = gCrashSettings.getS32("CrashSubmitBehavior");
- if(cb == CRASH_BEHAVIOR_ASK)
- {
- std::ostringstream msg;
- msg << LLTrans::getString("MBFrozenCrashed");
- std::string alert = LLTrans::getString("APP_NAME") + " " + LLTrans::getString("MBAlert");
- choice = OSMessageBox(msg.str(),
- alert,
- OSMB_YESNO);
- }
- else if(cb == CRASH_BEHAVIOR_NEVER_SEND)
- {
- choice = OSBTN_NO;
- }
- else
- {
- choice = OSBTN_YES;
- }
-
- if (OSBTN_YES == choice)
- {
- llinfos << "Sending crash report." << llendl;
+ llinfos << "Last execution froze, sending a crash report." << llendl;
- bool report_freeze = true;
- handleCrashReporting(report_freeze);
- }
- else
- {
- llinfos << "Not sending crash report." << llendl;
- }
+ bool report_freeze = true;
+ handleCrashReporting(report_freeze);
}
#endif // LL_SEND_CRASH_REPORTS
-
}
//
--
cgit v1.2.3
From e86adb53f4df0cb0b9d8ea9b6cc805782d9fcf71 Mon Sep 17 00:00:00 2001
From: Richard Linden
Date: Thu, 27 Oct 2011 17:20:12 -0700
Subject: EXP-1479 FIX Chat history does not open when selecting toggle on chat
floater and issue with minimizing and opening chat floater
---
indra/newview/skins/default/xui/en/floater_chat_bar.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/en/floater_chat_bar.xml b/indra/newview/skins/default/xui/en/floater_chat_bar.xml
index e7eb7652c7..87606c1a2a 100644
--- a/indra/newview/skins/default/xui/en/floater_chat_bar.xml
+++ b/indra/newview/skins/default/xui/en/floater_chat_bar.xml
@@ -24,7 +24,7 @@
follow="all"
width="380"
height="0"
- visible="true"
+ visible="false"
filename="panel_nearby_chat.xml"
name="nearby_chat" />
Date: Fri, 28 Oct 2011 16:26:20 -0500
Subject: SH-2633 Fix for avatar hair turning white when editing appearance
---
indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl | 5 +++--
.../app_settings/shaders/class1/deferred/avatarAlphaV.glsl | 10 ++++++----
.../app_settings/shaders/class1/objects/simpleNoColorV.glsl | 6 ++++--
.../app_settings/shaders/class2/deferred/avatarAlphaV.glsl | 7 ++++---
.../shaders/class2/windlight/atmosphericsVarsV.glsl | 4 +++-
indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl | 6 ++++--
6 files changed, 24 insertions(+), 14 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl b/indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl
index 2901e18db8..19203ab670 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/avatarV.glsl
@@ -32,6 +32,7 @@ ATTRIBUTE vec2 texcoord0;
VARYING vec4 vertex_color;
VARYING vec2 vary_texcoord0;
+uniform vec4 color;
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
mat4 getSkinnedTransform();
@@ -61,8 +62,8 @@ void main()
calcAtmospherics(pos.xyz);
- vec4 color = calcLighting(pos.xyz, norm, vec4(1,1,1,1), vec4(0,0,0,0));
- vertex_color = color;
+ vec4 col = calcLighting(pos.xyz, norm, color, vec4(0,0,0,0));
+ vertex_color = col;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl
index acbc3f7e15..d7b90978ba 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl
@@ -52,6 +52,8 @@ VARYING vec2 vary_texcoord0;
uniform float near_clip;
+uniform vec4 color;
+
uniform vec4 light_position[8];
uniform vec3 light_direction[8];
uniform vec3 light_attenuation[8];
@@ -123,17 +125,17 @@ void main()
col.rgb += light_diffuse[6].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[6], light_direction[6], light_attenuation[6].x, light_attenuation[6].y, light_attenuation[6].z);
col.rgb += light_diffuse[7].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[7], light_direction[7], light_attenuation[7].x, light_attenuation[7].y, light_attenuation[7].z);
- vary_pointlight_col = col.rgb;
+ vary_pointlight_col = col.rgb*color.rgb;
col.rgb = vec3(0,0,0);
// Add windlight lights
col.rgb = atmosAmbient(vec3(0.));
- vary_ambient = col.rgb;
- vary_directional = atmosAffectDirectionalLight(max(calcDirectionalLight(norm, light_position[0].xyz), 0.0));
+ vary_ambient = col.rgb*color.rgb;
+ vary_directional = color.rgb*atmosAffectDirectionalLight(max(calcDirectionalLight(norm, light_position[0].xyz), 0.0));
- col.rgb = min(col.rgb, 1.0);
+ col.rgb = col.rgb * color.rgb;
vertex_color = col;
diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleNoColorV.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleNoColorV.glsl
index 706627e175..0be52a52af 100644
--- a/indra/newview/app_settings/shaders/class1/objects/simpleNoColorV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/simpleNoColorV.glsl
@@ -28,6 +28,8 @@ uniform mat4 texture_matrix0;
uniform mat4 modelview_matrix;
uniform mat4 modelview_projection_matrix;
+uniform vec4 color;
+
ATTRIBUTE vec3 position;
ATTRIBUTE vec3 normal;
ATTRIBUTE vec2 texcoord0;
@@ -50,8 +52,8 @@ void main()
calcAtmospherics(pos.xyz);
- vec4 color = calcLighting(pos.xyz, norm, vec4(1,1,1,1), vec4(0.));
- vertex_color = color;
+ vec4 col = calcLighting(pos.xyz, norm, color, vec4(0.));
+ vertex_color = col;
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl b/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl
index 63c7a6b13d..9c7a332417 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl
@@ -49,6 +49,7 @@ VARYING vec3 vary_pointlight_col;
VARYING vec4 vertex_color;
VARYING vec2 vary_texcoord0;
+uniform vec4 color;
uniform float near_clip;
uniform float shadow_offset;
@@ -125,17 +126,17 @@ void main()
col.rgb += light_diffuse[6].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[6], light_direction[6], light_attenuation[6].x, light_attenuation[6].y, light_attenuation[6].z);
col.rgb += light_diffuse[7].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[7], light_direction[7], light_attenuation[7].x, light_attenuation[7].y, light_attenuation[7].z);
- vary_pointlight_col = col.rgb;
+ vary_pointlight_col = col.rgb*color.rgb;
col.rgb = vec3(0,0,0);
// Add windlight lights
col.rgb = atmosAmbient(vec3(0.));
- vary_ambient = col.rgb;
+ vary_ambient = col.rgb*color.rgb;
vary_directional = atmosAffectDirectionalLight(max(calcDirectionalLight(norm, light_position[0].xyz), 0.0));
- col.rgb = min(col.rgb, 1.0);
+ col.rgb = col.rgb*color.rgb;
vertex_color = col;
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
index 01605e5b25..ba2ed6b1ce 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
@@ -27,6 +27,7 @@
VARYING vec3 vary_AdditiveColor;
VARYING float vary_AtmosAttenuation;
+vec3 additive_color;
vec3 atmos_attenuation;
vec3 sunlit_color;
vec3 amblit_color;
@@ -43,7 +44,7 @@ vec3 getAmblitColor()
vec3 getAdditiveColor()
{
- return vary_AdditiveColor;
+ return additive_color;
}
vec3 getAtmosAttenuation()
{
@@ -72,6 +73,7 @@ void setAmblitColor(vec3 v)
void setAdditiveColor(vec3 v)
{
+ additive_color = v;
vary_AdditiveColor = v;
}
diff --git a/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl b/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl
index 7fb3cb6552..721054b5ad 100644
--- a/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl
+++ b/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl
@@ -37,6 +37,8 @@ vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
mat4 getSkinnedTransform();
void calcAtmospherics(vec3 inPositionEye);
+uniform vec4 color;
+
uniform vec4 gWindDir;
uniform vec4 gSinWaveParams;
uniform vec4 gGravity;
@@ -125,8 +127,8 @@ void main()
calcAtmospherics(pos.xyz);
- vec4 color = calcLighting(pos.xyz, norm, vec4(1,1,1,1), vec4(0.0));
- vertex_color = color;
+ vec4 col = calcLighting(pos.xyz, norm, color, vec4(0.0));
+ vertex_color = col;
gl_Position = projection_matrix * pos;
}
--
cgit v1.2.3
From e1023d614c7e9b0a1619e1ff917dbc37fa344aa8 Mon Sep 17 00:00:00 2001
From: eli
Date: Fri, 28 Oct 2011 16:27:34 -0700
Subject: sync with viewer-development
---
.../newview/skins/default/xui/da/floater_about.xml | 2 +-
.../xui/en/floater_translation_settings.xml | 244 +++++++++++++++++++++
indra/newview/skins/default/xui/en/menu_viewer.xml | 10 +
.../default/xui/en/panel_preferences_chat.xml | 127 +----------
indra/newview/skins/default/xui/en/strings.xml | 6 +
.../newview/skins/default/xui/pl/floater_about.xml | 2 +-
indra/newview/skins/default/xui/ru/strings.xml | 2 +-
.../newview/skins/default/xui/zh/floater_about.xml | 2 +-
8 files changed, 276 insertions(+), 119 deletions(-)
create mode 100644 indra/newview/skins/default/xui/en/floater_translation_settings.xml
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/da/floater_about.xml b/indra/newview/skins/default/xui/da/floater_about.xml
index 0ccaab73ba..fc8bc33096 100644
--- a/indra/newview/skins/default/xui/da/floater_about.xml
+++ b/indra/newview/skins/default/xui/da/floater_about.xml
@@ -10,7 +10,7 @@
Du er ved [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] i regionen [REGION] lokaliseret ved <nolink>[HOSTNAME]</nolink> ([HOSTIP])
[SERVER_VERSION]
-[[SERVER_RELEASE_NOTES_URL] [ReleaseNotes]]
+[SERVER_RELEASE_NOTES_URL]
CPU: [CPU]
diff --git a/indra/newview/skins/default/xui/en/floater_translation_settings.xml b/indra/newview/skins/default/xui/en/floater_translation_settings.xml
new file mode 100644
index 0000000000..c03f751265
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_translation_settings.xml
@@ -0,0 +1,244 @@
+
+
+
+ Bing appID not verified. Please try again.
+ Google API key not verified. Please try again.
+
+ Bing appID verified.
+ Google API key verified.
+
+
+
+ Translate chat into:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Choose translation service:
+
+
+
+
+
+
+
+
+ Bing [http://www.bing.com/developers/createapp.aspx AppID]:
+
+
+
+
+
+ Google [http://code.google.com/apis/language/translate/v2/getting_started.html#auth API key]:
+
+
+
+
+
+ [http://code.google.com/apis/language/translate/v2/pricing.html Pricing] | [https://code.google.com/apis/console Stats]
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 63e50b0b9f..01f9c23afd 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -2437,6 +2437,16 @@
parameter="raycast" />
+
+
+
+
-
-
-
-
- Use machine translation while chatting (powered by Google)
-
-
- Translate chat into:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
\ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index c4031de0f8..24cec13c4c 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2183,6 +2183,8 @@ Returns a string with the requested data about the region
Stomach
Left Pec
Right Pec
+ Neck
+ Avatar Center
Invalid Attachment Point
@@ -3529,6 +3531,10 @@ Try enclosing path to the editor with double quotes.
Error parsing the external editor command.
External editor failed to run.
+
+ Translation failed: [REASON]
+ Error parsing translation response.
+
Esc
Space
diff --git a/indra/newview/skins/default/xui/pl/floater_about.xml b/indra/newview/skins/default/xui/pl/floater_about.xml
index 637325ddd0..409429ffaa 100644
--- a/indra/newview/skins/default/xui/pl/floater_about.xml
+++ b/indra/newview/skins/default/xui/pl/floater_about.xml
@@ -10,7 +10,7 @@
Położenie [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] w [REGION] zlokalizowanym w <nolink>[HOSTNAME]</nolink> ([HOSTIP])
[SERVER_VERSION]
-[[SERVER_RELEASE_NOTES_URL] [ReleaseNotes]]
+[SERVER_RELEASE_NOTES_URL]
Procesor: [CPU]
diff --git a/indra/newview/skins/default/xui/ru/strings.xml b/indra/newview/skins/default/xui/ru/strings.xml
index d52cee6b0d..0134298166 100644
--- a/indra/newview/skins/default/xui/ru/strings.xml
+++ b/indra/newview/skins/default/xui/ru/strings.xml
@@ -4252,7 +4252,7 @@ support@secondlife.com.
Женщина – ух ты!
- /поклониться
+ /поклон
/хлопнуть
diff --git a/indra/newview/skins/default/xui/zh/floater_about.xml b/indra/newview/skins/default/xui/zh/floater_about.xml
index 0ac85d399e..7e19c124a1 100644
--- a/indra/newview/skins/default/xui/zh/floater_about.xml
+++ b/indra/newview/skins/default/xui/zh/floater_about.xml
@@ -10,7 +10,7 @@
You are at [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] in [REGION] located at <nolink>[HOSTNAME]</nolink> ([HOSTIP])
[SERVER_VERSION]
-[[SERVER_RELEASE_NOTES_URL] [ReleaseNotes]]
+[SERVER_RELEASE_NOTES_URL]
CPU:[CPU]
--
cgit v1.2.3
From 5406ebad3e2073a860ced69094bbfb76880ce999 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Mon, 31 Oct 2011 17:20:44 -0500
Subject: SH-2521 Put back "high detail" terrain render when basic shaders
disabled (still broken).
---
indra/newview/lldrawpoolterrain.cpp | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index d61df9c048..3e9d30283a 100644
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -198,7 +198,7 @@ void LLDrawPoolTerrain::render(S32 pass)
return;
}
// Render simplified land if video card can't do sufficient multitexturing
- if (!LLGLSLShader::sNoFixedFunction || !gGLManager.mHasARBEnvCombine || (gGLManager.mNumTextureUnits < 2))
+ if (!gGLManager.mHasARBEnvCombine || (gGLManager.mNumTextureUnits < 2))
{
renderSimple(); // Render without multitexture
return;
@@ -223,11 +223,16 @@ void LLDrawPoolTerrain::render(S32 pass)
{
gPipeline.enableLightsStatic();
- if (sDetailMode == 0){
+ if (sDetailMode == 0)
+ {
renderSimple();
- } else if (gGLManager.mNumTextureUnits < 4){
+ }
+ else if (gGLManager.mNumTextureUnits < 4)
+ {
renderFull2TU();
- } else {
+ }
+ else
+ {
renderFull4TU();
}
}
--
cgit v1.2.3
From f76143a74ebbd9faf84fdcdee7fbf81a4090aafc Mon Sep 17 00:00:00 2001
From: eli
Date: Mon, 31 Oct 2011 16:25:34 -0700
Subject: sync with viewer-development
---
.../skins/default/xui/en/floater_chat_bar.xml | 97 ++++++++++++----------
.../skins/default/xui/en/floater_outgoing_call.xml | 1 +
.../skins/default/xui/en/floater_toybox.xml | 2 +-
.../default/xui/en/floater_voice_controls.xml | 2 +-
.../newview/skins/default/xui/en/menu_toolbars.xml | 2 +-
indra/newview/skins/default/xui/en/menu_viewer.xml | 11 ++-
.../skins/default/xui/en/panel_status_bar.xml | 7 +-
.../skins/default/xui/en/panel_topinfo_bar.xml | 2 +-
indra/newview/skins/default/xui/en/strings.xml | 6 +-
.../skins/default/xui/en/widgets/toolbar.xml | 4 +
10 files changed, 78 insertions(+), 56 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/en/floater_chat_bar.xml b/indra/newview/skins/default/xui/en/floater_chat_bar.xml
index 989b4a0580..87606c1a2a 100644
--- a/indra/newview/skins/default/xui/en/floater_chat_bar.xml
+++ b/indra/newview/skins/default/xui/en/floater_chat_bar.xml
@@ -15,6 +15,7 @@
min_height="60"
min_width="150"
can_resize="true"
+ default_tab_group="1"
name="chat_bar"
width="380">
-
-
-
-
-
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
index 9db6568ee3..ffbb6aa28b 100644
--- a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
+++ b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml
@@ -8,6 +8,7 @@
layout="topleft"
name="outgoing call"
help_topic="outgoing_call"
+ save_dock_state="true"
title="CALLING"
width="410">
-
+
-
+
+
+
+ name="balance_bg">
[mthnum,datetime,utc]/[day,datetime,utc]/[year,datetime,utc]
-
+
Balance
Credits
Debits
@@ -3711,6 +3711,10 @@ Try enclosing path to the editor with double quotes.
Changing camera angle
Volume controls for calls and people near you in world
+ currently in your bottom toolbar
+ currently in your left toolbar
+ currently in your right toolbar
+
Retain%
Detail
diff --git a/indra/newview/skins/default/xui/en/widgets/toolbar.xml b/indra/newview/skins/default/xui/en/widgets/toolbar.xml
index 7e7a9c61cf..0aa478ace9 100644
--- a/indra/newview/skins/default/xui/en/widgets/toolbar.xml
+++ b/indra/newview/skins/default/xui/en/widgets/toolbar.xml
@@ -30,6 +30,8 @@
image_overlay_alignment="left"
use_ellipses="true"
auto_resize="true"
+ button_flash_count="99999"
+ button_flash_rate="1.0"
flash_color="EmphasisColor"/>
--
cgit v1.2.3
From 74fcb62b3dc0084c61cdf611b2b95ab3b03203bd Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 1 Nov 2011 12:33:59 -0500
Subject: SH-2546 Fix for black avatars and terrain on GF Go 7800 (use vec3
instead of float on varying parameters).
---
.../app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl | 2 +-
.../app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl
index e8e56e12c1..765b0927c3 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsF.glsl
@@ -26,7 +26,7 @@
VARYING vec3 vary_SunlitColor;
VARYING vec3 vary_AdditiveColor;
-VARYING float vary_AtmosAttenuation;
+VARYING vec3 vary_AtmosAttenuation;
vec3 getSunlitColor()
{
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
index ba2ed6b1ce..99dbee15ee 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsV.glsl
@@ -25,7 +25,7 @@
VARYING vec3 vary_AdditiveColor;
-VARYING float vary_AtmosAttenuation;
+VARYING vec3 vary_AtmosAttenuation;
vec3 additive_color;
vec3 atmos_attenuation;
@@ -80,5 +80,5 @@ void setAdditiveColor(vec3 v)
void setAtmosAttenuation(vec3 v)
{
atmos_attenuation = v;
- vary_AtmosAttenuation = v.r;
+ vary_AtmosAttenuation = v;
}
--
cgit v1.2.3
From 108cdf58c2def80cf6c88e35c85b6da1c3709b76 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 1 Nov 2011 12:47:06 -0500
Subject: SH-2620 Force FXAA shader to off on OSX
---
indra/newview/pipeline.cpp | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'indra/newview')
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 76ad7fd83e..85a7691ead 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -6405,6 +6405,10 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
bool multisample = RenderFSAASamples > 1;
+#if LL_DARWIN //force FXAA to off on OSX (SH-2620)
+ multisample = false;
+#endif
+
if (multisample)
{
//bake out texture2D with RGBL for FXAA shader
--
cgit v1.2.3
From b58229a64e2a5c8178f3ac05f944b6cfecc5466b Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 1 Nov 2011 14:33:20 -0500
Subject: SH-1427 Fix for sunlight color getting clobbered for non-deferred
atmospheric shaders.
---
.../app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl
index 89b6a52909..4fe0ef9caf 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl
@@ -23,7 +23,7 @@
* $/LicenseInfo$
*/
-uniform vec4 sunlight_color;
+uniform vec4 sunlight_color_copy;
uniform vec4 light_ambient;
vec3 atmosAmbient(vec3 light)
@@ -33,7 +33,7 @@ vec3 atmosAmbient(vec3 light)
vec3 atmosAffectDirectionalLight(float lightIntensity)
{
- return sunlight_color.rgb * lightIntensity;
+ return sunlight_color_copy.rgb * lightIntensity;
}
vec3 atmosGetDiffuseSunlightColor()
--
cgit v1.2.3
From 1bea08335b6c2fa31f414db2fe7316a118b2ec18 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Wed, 2 Nov 2011 10:55:12 -0500
Subject: SH-2648 Fix for flickering shadows on 40% transparent objects.
---
indra/newview/pipeline.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 85a7691ead..fe29333ab2 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -8149,10 +8149,10 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
{
LLFastTimer ftm(FTM_SHADOW_ALPHA);
gDeferredShadowAlphaMaskProgram.bind();
- gDeferredShadowAlphaMaskProgram.setAlphaRange(0.6f, 1.f);
+ gDeferredShadowAlphaMaskProgram.setAlphaRange(0.598f, 1.f);
renderObjects(LLRenderPass::PASS_ALPHA_SHADOW, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_COLOR, TRUE);
gDeferredTreeShadowProgram.bind();
- gDeferredTreeShadowProgram.setAlphaRange(0.6f, 1.f);
+ gDeferredTreeShadowProgram.setAlphaRange(0.598f, 1.f);
renderObjects(LLRenderPass::PASS_GRASS, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, TRUE);
}
--
cgit v1.2.3
From 2179e1c1f2f3614678d528fe96640728ce663f2e Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Wed, 2 Nov 2011 13:13:38 -0500
Subject: SH-2541 Fix for speckles on avatar on some cards -- don't use
"maximum_alpha" for alpha tests in shaders as it was always being set to 1.0
anyway.
---
.../shaders/class1/deferred/diffuseAlphaMaskF.glsl | 3 +-
.../class1/deferred/diffuseAlphaMaskIndexedF.glsl | 3 +-
.../class1/deferred/diffuseAlphaMaskNoColorF.glsl | 3 +-
.../shaders/class1/deferred/impostorF.glsl | 3 +-
.../shaders/class1/deferred/shadowAlphaMaskF.glsl | 3 +-
.../shaders/class1/deferred/treeF.glsl | 3 +-
.../shaders/class1/deferred/treeShadowF.glsl | 3 +-
.../shaders/class1/interface/alphamaskF.glsl | 3 +-
.../shaders/class1/lighting/lightAlphaMaskF.glsl | 3 +-
.../class1/lighting/lightAlphaMaskNonIndexedF.glsl | 4 +--
.../class1/lighting/lightFullbrightAlphaMaskF.glsl | 3 +-
.../lightFullbrightNonIndexedAlphaMaskF.glsl | 3 +-
.../lighting/lightFullbrightWaterAlphaMaskF.glsl | 3 +-
.../lightFullbrightWaterNonIndexedAlphaMaskF.glsl | 3 +-
.../class1/lighting/lightWaterAlphaMaskF.glsl | 3 +-
.../lighting/lightWaterAlphaMaskNonIndexedF.glsl | 3 +-
.../shaders/class1/objects/impostorF.glsl | 3 +-
indra/newview/lldrawpoolalpha.cpp | 16 +++++-----
indra/newview/lldrawpoolavatar.cpp | 12 ++++----
indra/newview/lldrawpoolsimple.cpp | 4 +--
indra/newview/lldrawpooltree.cpp | 6 ++--
indra/newview/lltexlayer.cpp | 34 +++++++++++-----------
indra/newview/pipeline.cpp | 4 +--
23 files changed, 55 insertions(+), 73 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl
index 14b79c37fd..e9989a4e48 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskF.glsl
@@ -28,7 +28,6 @@ out vec4 gl_FragData[3];
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
uniform sampler2D diffuseMap;
@@ -40,7 +39,7 @@ void main()
{
vec4 col = texture2D(diffuseMap, vary_texcoord0.xy) * vertex_color;
- if (col.a < minimum_alpha || col.a > maximum_alpha)
+ if (col.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl
index 381fba8813..fdf8d72b38 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskIndexedF.glsl
@@ -30,7 +30,6 @@ out vec4 gl_FragData[3];
VARYING vec3 vary_normal;
uniform float minimum_alpha;
-uniform float maximum_alpha;
VARYING vec4 vertex_color;
VARYING vec2 vary_texcoord0;
@@ -39,7 +38,7 @@ void main()
{
vec4 col = diffuseLookup(vary_texcoord0.xy) * vertex_color;
- if (col.a < minimum_alpha || col.a > maximum_alpha)
+ if (col.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl
index b582ba7f9c..bb20e2ca47 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseAlphaMaskNoColorF.glsl
@@ -29,7 +29,6 @@ out vec4 gl_FragData[3];
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
uniform sampler2D diffuseMap;
@@ -40,7 +39,7 @@ void main()
{
vec4 col = texture2D(diffuseMap, vary_texcoord0.xy);
- if (col.a < minimum_alpha || col.a > maximum_alpha)
+ if (col.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
index 5decddebbb..a44173a2a4 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
@@ -28,7 +28,6 @@ out vec4 gl_FragData[3];
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
uniform sampler2D diffuseMap;
@@ -41,7 +40,7 @@ void main()
{
vec4 col = texture2D(diffuseMap, vary_texcoord0.xy);
- if (col.a < minimum_alpha || col.a > maximum_alpha)
+ if (col.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl
index 71b12326d8..46d42d2a4a 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/shadowAlphaMaskF.glsl
@@ -28,7 +28,6 @@ out vec4 gl_FragColor;
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
uniform sampler2D diffuseMap;
@@ -40,7 +39,7 @@ void main()
{
float alpha = texture2D(diffuseMap, vary_texcoord0.xy).a * vertex_color.a;
- if (alpha < minimum_alpha || alpha > maximum_alpha)
+ if (alpha < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl b/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl
index b934bc6991..ea98d6884c 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/treeF.glsl
@@ -34,12 +34,11 @@ VARYING vec3 vary_normal;
VARYING vec2 vary_texcoord0;
uniform float minimum_alpha;
-uniform float maximum_alpha;
void main()
{
vec4 col = texture2D(diffuseMap, vary_texcoord0.xy);
- if (col.a < minimum_alpha || col.a > maximum_alpha)
+ if (col.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/treeShadowF.glsl b/indra/newview/app_settings/shaders/class1/deferred/treeShadowF.glsl
index 29ec6e6bee..20d0170535 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/treeShadowF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/treeShadowF.glsl
@@ -28,7 +28,6 @@ out vec4 gl_FragColor;
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
uniform sampler2D diffuseMap;
@@ -39,7 +38,7 @@ void main()
{
float alpha = texture2D(diffuseMap, vary_texcoord0.xy).a;
- if (alpha < minimum_alpha || alpha > maximum_alpha)
+ if (alpha < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/interface/alphamaskF.glsl b/indra/newview/app_settings/shaders/class1/interface/alphamaskF.glsl
index 4f2767fc97..d2f5e1987a 100644
--- a/indra/newview/app_settings/shaders/class1/interface/alphamaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/alphamaskF.glsl
@@ -30,7 +30,6 @@ out vec4 gl_FragColor;
uniform sampler2D diffuseMap;
uniform float minimum_alpha;
-uniform float maximum_alpha;
VARYING vec2 vary_texcoord0;
VARYING vec4 vertex_color;
@@ -38,7 +37,7 @@ VARYING vec4 vertex_color;
void main()
{
vec4 col = vertex_color*texture2D(diffuseMap, vary_texcoord0.xy);
- if (col.a < minimum_alpha || col.a > maximum_alpha)
+ if (col.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl
index 6815f7aa85..10413bdeb0 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl
@@ -28,7 +28,6 @@ out vec4 gl_FragColor;
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
vec3 atmosLighting(vec3 light);
vec3 scaleSoftClip(vec3 light);
@@ -40,7 +39,7 @@ void default_lighting()
{
vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color;
- if (color.a < minimum_alpha || color.a > maximum_alpha)
+ if (color.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl
index 2640668d7d..1164e5b0a6 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskNonIndexedF.glsl
@@ -28,8 +28,6 @@ out vec4 gl_FragColor;
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
-
uniform sampler2D diffuseMap;
@@ -43,7 +41,7 @@ void default_lighting()
{
vec4 color = texture2D(diffuseMap,vary_texcoord0.xy) * vertex_color;
- if (color.a < minimum_alpha || color.a > maximum_alpha)
+ if (color.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl
index 92113d9afa..ba99c0ed71 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl
@@ -28,7 +28,6 @@ out vec4 gl_FragColor;
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
vec3 fullbrightAtmosTransport(vec3 light);
vec3 fullbrightScaleSoftClip(vec3 light);
@@ -40,7 +39,7 @@ void fullbright_lighting()
{
vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color;
- if (color.a < minimum_alpha || color.a > maximum_alpha)
+ if (color.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightNonIndexedAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightNonIndexedAlphaMaskF.glsl
index d1ad3da009..276fad4f44 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightNonIndexedAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightNonIndexedAlphaMaskF.glsl
@@ -28,7 +28,6 @@ out vec4 gl_FragColor;
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
vec3 fullbrightAtmosTransport(vec3 light);
vec3 fullbrightScaleSoftClip(vec3 light);
@@ -42,7 +41,7 @@ void fullbright_lighting()
{
vec4 color = texture2D(diffuseMap,vary_texcoord0.xy) * vertex_color;
- if (color.a < minimum_alpha || color.a > maximum_alpha)
+ if (color.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl
index 32a1c71099..754b2922d9 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterAlphaMaskF.glsl
@@ -28,7 +28,6 @@ out vec4 gl_FragColor;
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
vec4 diffuseLookup(vec2 texcoord);
@@ -42,7 +41,7 @@ void fullbright_lighting_water()
{
vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color;
- if (color.a < minimum_alpha || color.a > maximum_alpha)
+ if (color.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterNonIndexedAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterNonIndexedAlphaMaskF.glsl
index 1b5aa61441..f69b907dc7 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterNonIndexedAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightWaterNonIndexedAlphaMaskF.glsl
@@ -28,7 +28,6 @@ out vec4 gl_FragColor;
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
uniform sampler2D diffuseMap;
@@ -42,7 +41,7 @@ void fullbright_lighting_water()
{
vec4 color = texture2D(diffuseMap, vary_texcoord0.xy) * vertex_color;
- if (color.a < minimum_alpha || color.a > maximum_alpha)
+ if (color.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl
index 60289cf7f7..103dd633c9 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskF.glsl
@@ -28,7 +28,6 @@ out vec4 gl_FragColor;
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
vec3 atmosLighting(vec3 light);
vec4 applyWaterFog(vec4 color);
@@ -40,7 +39,7 @@ void default_lighting_water()
{
vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color;
- if (color.a < minimum_alpha || color.a > maximum_alpha)
+ if (color.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl
index d0038ae89b..bef72752da 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightWaterAlphaMaskNonIndexedF.glsl
@@ -28,7 +28,6 @@ out vec4 gl_FragColor;
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
uniform sampler2D diffuseMap;
@@ -42,7 +41,7 @@ void default_lighting_water()
{
vec4 color = texture2D(diffuseMap,vary_texcoord0.xy) * vertex_color;
- if (color.a < minimum_alpha || color.a > maximum_alpha)
+ if (color.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/app_settings/shaders/class1/objects/impostorF.glsl b/indra/newview/app_settings/shaders/class1/objects/impostorF.glsl
index e7c81888eb..3c6e22b295 100644
--- a/indra/newview/app_settings/shaders/class1/objects/impostorF.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/impostorF.glsl
@@ -28,7 +28,6 @@ out vec4 gl_FragColor;
#endif
uniform float minimum_alpha;
-uniform float maximum_alpha;
uniform sampler2D diffuseMap;
@@ -38,7 +37,7 @@ void main()
{
vec4 color = texture2D(diffuseMap,vary_texcoord0.xy);
- if (color.a < minimum_alpha || color.a > maximum_alpha)
+ if (color.a < minimum_alpha)
{
discard;
}
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 230c4e2638..54f937d8fd 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -90,7 +90,7 @@ void LLDrawPoolAlpha::renderDeferred(S32 pass)
{
LLFastTimer t(FTM_RENDER_GRASS);
gDeferredDiffuseAlphaMaskProgram.bind();
- gDeferredDiffuseAlphaMaskProgram.setAlphaRange(0.33f, 1.f);
+ gDeferredDiffuseAlphaMaskProgram.setMinimumAlpha(0.33f);
//render alpha masked objects
LLRenderPass::pushBatches(LLRenderPass::PASS_ALPHA_MASK, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
@@ -136,7 +136,7 @@ void LLDrawPoolAlpha::beginPostDeferredPass(S32 pass)
simple_shader = NULL;
fullbright_shader = NULL;
gObjectFullbrightAlphaMaskProgram.bind();
- gObjectFullbrightAlphaMaskProgram.setAlphaRange(0.33f, 1.f);
+ gObjectFullbrightAlphaMaskProgram.setMinimumAlpha(0.33f);
}
deferred_render = TRUE;
@@ -232,14 +232,14 @@ void LLDrawPoolAlpha::render(S32 pass)
if (!LLPipeline::sRenderDeferred || !deferred_render)
{
simple_shader->bind();
- simple_shader->setAlphaRange(0.33f, 1.f);
+ simple_shader->setMinimumAlpha(0.33f);
pushBatches(LLRenderPass::PASS_ALPHA_MASK, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
}
if (fullbright_shader)
{
fullbright_shader->bind();
- fullbright_shader->setAlphaRange(0.33f, 1.f);
+ fullbright_shader->setMinimumAlpha(0.33f);
}
pushBatches(LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK, getVertexDataMask() | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE);
//LLGLSLShader::bindNoShader();
@@ -275,16 +275,16 @@ void LLDrawPoolAlpha::render(S32 pass)
if (LLPipeline::sImpostorRender)
{
fullbright_shader->bind();
- fullbright_shader->setAlphaRange(0.5f, 1.f);
+ fullbright_shader->setMinimumAlpha(0.5f);
simple_shader->bind();
- simple_shader->setAlphaRange(0.5f, 1.f);
+ simple_shader->setMinimumAlpha(0.5f);
}
else
{
fullbright_shader->bind();
- fullbright_shader->setAlphaRange(0.f, 1.f);
+ fullbright_shader->setMinimumAlpha(0.f);
simple_shader->bind();
- simple_shader->setAlphaRange(0.f, 1.f);
+ simple_shader->setMinimumAlpha(0.f);
}
}
else
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 7290a48a1a..60313b25a0 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -576,7 +576,7 @@ void LLDrawPoolAvatar::beginImpostor()
if (LLGLSLShader::sNoFixedFunction)
{
gImpostorProgram.bind();
- gImpostorProgram.setAlphaRange(0.01f, 1.f);
+ gImpostorProgram.setMinimumAlpha(0.01f);
}
gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
@@ -608,7 +608,7 @@ void LLDrawPoolAvatar::beginRigid()
if (sVertexProgram != NULL)
{ //eyeballs render with the specular shader
sVertexProgram->bind();
- sVertexProgram->setAlphaRange(0.2f, 1.f);
+ sVertexProgram->setMinimumAlpha(0.2f);
}
}
else
@@ -641,7 +641,7 @@ void LLDrawPoolAvatar::beginDeferredImpostor()
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
sVertexProgram->bind();
- sVertexProgram->setAlphaRange(0.01f, 1.f);
+ sVertexProgram->setMinimumAlpha(0.01f);
}
void LLDrawPoolAvatar::endDeferredImpostor()
@@ -659,7 +659,7 @@ void LLDrawPoolAvatar::beginDeferredRigid()
sVertexProgram = &gDeferredNonIndexedDiffuseAlphaMaskNoColorProgram;
sVertexProgram->bind();
- sVertexProgram->setAlphaRange(0.2f, 1.f);
+ sVertexProgram->setMinimumAlpha(0.2f);
}
void LLDrawPoolAvatar::endDeferredRigid()
@@ -716,7 +716,7 @@ void LLDrawPoolAvatar::beginSkinned()
if (LLGLSLShader::sNoFixedFunction)
{
- sVertexProgram->setAlphaRange(0.2f, 1.f);
+ sVertexProgram->setMinimumAlpha(0.2f);
}
}
@@ -1014,7 +1014,7 @@ void LLDrawPoolAvatar::beginDeferredSkinned()
sRenderingSkinned = TRUE;
sVertexProgram->bind();
- sVertexProgram->setAlphaRange(0.2f, 1.f);
+ sVertexProgram->setMinimumAlpha(0.2f);
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
gGL.getTexUnit(0)->activate();
diff --git a/indra/newview/lldrawpoolsimple.cpp b/indra/newview/lldrawpoolsimple.cpp
index 80c202d4e2..6e0ea78af2 100644
--- a/indra/newview/lldrawpoolsimple.cpp
+++ b/indra/newview/lldrawpoolsimple.cpp
@@ -269,7 +269,7 @@ void LLDrawPoolGrass::beginRenderPass(S32 pass)
if (mVertexShaderLevel > 0)
{
simple_shader->bind();
- simple_shader->setAlphaRange(0.5f, 1.f);
+ simple_shader->setMinimumAlpha(0.5f);
}
else
{
@@ -325,7 +325,7 @@ void LLDrawPoolGrass::renderDeferred(S32 pass)
{
LLFastTimer t(FTM_RENDER_GRASS_DEFERRED);
gDeferredNonIndexedDiffuseAlphaMaskProgram.bind();
- gDeferredNonIndexedDiffuseAlphaMaskProgram.setAlphaRange(0.5f, 1.f);
+ gDeferredNonIndexedDiffuseAlphaMaskProgram.setMinimumAlpha(0.5f);
//render grass
LLRenderPass::renderTexture(LLRenderPass::PASS_GRASS, getVertexDataMask());
}
diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp
index cdf6e1ab52..d198e28c14 100644
--- a/indra/newview/lldrawpooltree.cpp
+++ b/indra/newview/lldrawpooltree.cpp
@@ -75,7 +75,7 @@ void LLDrawPoolTree::beginRenderPass(S32 pass)
if (gPipeline.canUseVertexShaders())
{
shader->bind();
- shader->setAlphaRange(0.5f, 1.f);
+ shader->setMinimumAlpha(0.5f);
gGL.diffuseColor4f(1,1,1,1);
}
else
@@ -144,7 +144,7 @@ void LLDrawPoolTree::beginDeferredPass(S32 pass)
shader = &gDeferredTreeProgram;
shader->bind();
- shader->setAlphaRange(0.5f, 1.f);
+ shader->setMinimumAlpha(0.5f);
}
void LLDrawPoolTree::renderDeferred(S32 pass)
@@ -170,7 +170,7 @@ void LLDrawPoolTree::beginShadowPass(S32 pass)
gSavedSettings.getF32("RenderDeferredTreeShadowBias"));
gDeferredTreeShadowProgram.bind();
- gDeferredTreeShadowProgram.setAlphaRange(0.5f, 1.f);
+ gDeferredTreeShadowProgram.setMinimumAlpha(0.5f);
}
void LLDrawPoolTree::renderShadow(S32 pass)
diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp
index 9f5cbf6ec8..6f6d5dbf12 100644
--- a/indra/newview/lltexlayer.cpp
+++ b/indra/newview/lltexlayer.cpp
@@ -300,7 +300,7 @@ BOOL LLTexLayerSetBuffer::render()
if (use_shaders)
{
gAlphaMaskProgram.bind();
- gAlphaMaskProgram.setAlphaRange(0.004f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
}
LLVertexBuffer::unbind();
@@ -947,7 +947,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height )
LLGLDisable no_alpha(GL_ALPHA_TEST);
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.0f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.0f);
}
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.color4f( 0.f, 0.f, 0.f, 1.f );
@@ -957,7 +957,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height )
gGL.flush();
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.004f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
}
}
@@ -987,7 +987,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height )
LLGLDisable no_alpha(GL_ALPHA_TEST);
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.f);
}
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
@@ -999,7 +999,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height )
gGL.flush();
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.004f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
}
}
@@ -1135,7 +1135,7 @@ void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height,
LLGLDisable no_alpha(GL_ALPHA_TEST);
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.f);
}
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.color4f( 0.f, 0.f, 0.f, 1.f );
@@ -1145,7 +1145,7 @@ void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height,
gGL.flush();
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.004f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
}
}
@@ -1717,7 +1717,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height)
LLGLDisable alpha_test(no_alpha_test ? GL_ALPHA_TEST : 0);
if (use_shaders && no_alpha_test)
{
- gAlphaMaskProgram.setAlphaRange(0.f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.f);
}
LLTexUnit::eTextureAddressMode old_mode = tex->getAddressMode();
@@ -1731,7 +1731,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height)
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
if (use_shaders && no_alpha_test)
{
- gAlphaMaskProgram.setAlphaRange(0.004f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
}
}
@@ -1768,14 +1768,14 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height)
LLGLDisable no_alpha(GL_ALPHA_TEST);
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.f);
}
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
gGL.color4fv( net_color.mV );
gl_rect_2d_simple( width, height );
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.004f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
}
}
@@ -1874,14 +1874,14 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
LLGLSNoAlphaTest gls_no_alpha_test;
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.f);
}
gGL.getTexUnit(0)->bind(tex, TRUE);
gl_rect_2d_simple_tex( width, height );
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.004f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
}
}
else
@@ -1899,7 +1899,7 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
LLGLSNoAlphaTest gls_no_alpha_test;
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.f);
}
gGL.getTexUnit(0)->bind(tex);
gl_rect_2d_simple_tex( width, height );
@@ -1907,7 +1907,7 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
success = TRUE;
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.004f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
}
}
}
@@ -1931,7 +1931,7 @@ BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.f);
}
gGL.setColorMask(false, true);
@@ -2011,7 +2011,7 @@ BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
if (use_shaders)
{
- gAlphaMaskProgram.setAlphaRange(0.004f, 1.f);
+ gAlphaMaskProgram.setMinimumAlpha(0.004f);
}
LLGLSUIDefault gls_ui;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 76ddeab203..152f4728dd 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -8154,10 +8154,10 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
{
LLFastTimer ftm(FTM_SHADOW_ALPHA);
gDeferredShadowAlphaMaskProgram.bind();
- gDeferredShadowAlphaMaskProgram.setAlphaRange(0.598f, 1.f);
+ gDeferredShadowAlphaMaskProgram.setMinimumAlpha(0.598f);
renderObjects(LLRenderPass::PASS_ALPHA_SHADOW, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_COLOR, TRUE);
gDeferredTreeShadowProgram.bind();
- gDeferredTreeShadowProgram.setAlphaRange(0.598f, 1.f);
+ gDeferredTreeShadowProgram.setMinimumAlpha(0.598f);
renderObjects(LLRenderPass::PASS_GRASS, LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0, TRUE);
}
--
cgit v1.2.3
From db8267f95109cccb94cde8b9673df995dddc7a3e Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Wed, 2 Nov 2011 14:47:01 -0500
Subject: SH-1427 Fix for shader compilation failure when detail set to "mid"
---
.../app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl
index 4fe0ef9caf..6ff860362c 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl
@@ -38,7 +38,7 @@ vec3 atmosAffectDirectionalLight(float lightIntensity)
vec3 atmosGetDiffuseSunlightColor()
{
- return sunlight_color.rgb;
+ return sunlight_color_copy.rgb;
}
vec3 scaleDownLight(vec3 light)
--
cgit v1.2.3
From 2d24ed6ec5a8a26099065bc259f6738d5464db33 Mon Sep 17 00:00:00 2001
From: eli
Date: Fri, 4 Nov 2011 13:45:14 -0700
Subject: WIP INTL-82 LQA changes for Turkish; remove obsolete files
---
.../default/xui/ru/floater_day_cycle_options.xml | 95 ----------------------
.../skins/default/xui/tr/floater_camera.xml | 2 +-
.../default/xui/tr/floater_day_cycle_options.xml | 95 ----------------------
.../default/xui/tr/floater_edit_day_cycle.xml | 20 ++---
.../default/xui/tr/floater_edit_sky_preset.xml | 12 +--
.../newview/skins/default/xui/tr/floater_picks.xml | 2 +-
.../default/xui/tr/floater_preview_texture.xml | 2 +-
.../skins/default/xui/tr/floater_texture_ctrl.xml | 4 +-
.../newview/skins/default/xui/tr/floater_tools.xml | 2 +-
.../default/xui/tr/floater_windlight_options.xml | 2 +-
.../skins/default/xui/tr/menu_gesture_gear.xml | 2 +-
.../skins/default/xui/tr/menu_hide_navbar.xml | 4 +-
.../newview/skins/default/xui/tr/menu_landmark.xml | 4 +-
.../skins/default/xui/tr/menu_picks_plus.xml | 2 +-
indra/newview/skins/default/xui/tr/menu_place.xml | 2 +-
.../default/xui/tr/menu_places_gear_landmark.xml | 2 +-
indra/newview/skins/default/xui/tr/menu_slurl.xml | 2 +-
indra/newview/skins/default/xui/tr/menu_viewer.xml | 2 +-
.../newview/skins/default/xui/tr/notifications.xml | 46 +++++------
.../skins/default/xui/tr/panel_edit_pick.xml | 4 +-
.../skins/default/xui/tr/panel_landmarks.xml | 2 +-
indra/newview/skins/default/xui/tr/panel_me.xml | 2 +-
.../skins/default/xui/tr/panel_navigation_bar.xml | 4 +-
.../skins/default/xui/tr/panel_outfit_edit.xml | 4 +-
.../skins/default/xui/tr/panel_outfits_list.xml | 2 +-
.../newview/skins/default/xui/tr/panel_people.xml | 2 +-
indra/newview/skins/default/xui/tr/panel_picks.xml | 8 +-
.../default/xui/tr/panel_preferences_privacy.xml | 2 +-
.../skins/default/xui/tr/panel_profile_view.xml | 2 +-
.../newview/skins/default/xui/tr/role_actions.xml | 8 +-
.../skins/default/xui/tr/sidepanel_appearance.xml | 12 +--
indra/newview/skins/default/xui/tr/strings.xml | 20 ++---
.../default/xui/zh/floater_day_cycle_options.xml | 95 ----------------------
33 files changed, 92 insertions(+), 377 deletions(-)
delete mode 100644 indra/newview/skins/default/xui/ru/floater_day_cycle_options.xml
delete mode 100644 indra/newview/skins/default/xui/tr/floater_day_cycle_options.xml
delete mode 100644 indra/newview/skins/default/xui/zh/floater_day_cycle_options.xml
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/ru/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/ru/floater_day_cycle_options.xml
deleted file mode 100644
index 7c702f246d..0000000000
--- a/indra/newview/skins/default/xui/ru/floater_day_cycle_options.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-
-
-
-
-
-
-
- 00:00
-
-
- 03:00
-
-
- 06:00
-
-
- 09:00
-
-
- 12:00
-
-
- 15:00
-
-
- 18:00
-
-
- 21:00
-
-
- 00:00
-
-
- |
-
-
- I
-
-
- |
-
-
- I
-
-
- |
-
-
- I
-
-
- |
-
-
- I
-
-
- |
-
-
-
-
- Настройки ключевого кадра:
-
-
- Ключевое время:
-
-
-
-
- Ключевая настройка:
-
-
-
- Привязка:
-
-
-
- Длительность цикла:
-
-
-
-
-
- Просмотр:
-
-
-
-
-
-
-
-
-
diff --git a/indra/newview/skins/default/xui/tr/floater_camera.xml b/indra/newview/skins/default/xui/tr/floater_camera.xml
index 33b4338e21..4161e6ea52 100644
--- a/indra/newview/skins/default/xui/tr/floater_camera.xml
+++ b/indra/newview/skins/default/xui/tr/floater_camera.xml
@@ -13,7 +13,7 @@
Kamera modları
- Yörünge Değişimi - Yakınlaştırma - Kamerayı Çevirme
+ Yörünge - Yakınlş. - Kamerayı Çvr.
Ön Ayarlı Görünümler
diff --git a/indra/newview/skins/default/xui/tr/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/tr/floater_day_cycle_options.xml
deleted file mode 100644
index 9e706d9892..0000000000
--- a/indra/newview/skins/default/xui/tr/floater_day_cycle_options.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-
-
-
-
-
-
-
- 12öö
-
-
- 3öö
-
-
- 6öö
-
-
- 9öö
-
-
- 12ös
-
-
- 3ös
-
-
- 6ös
-
-
- 9ös
-
-
- 12öö
-
-
- |
-
-
- I
-
-
- |
-
-
- I
-
-
- |
-
-
- I
-
-
- |
-
-
- I
-
-
- |
-
-
-
-
- Anahtar Kare Ayarları:
-
-
- Anahtar Zamanı:
-
-
-
-
- Anahtar Ön Ayarı:
-
-
-
- Yasla:
-
-
-
- Döngü Uzunluğu:
-
-
-
-
-
- Önizleme:
-
-
-
-
-
-
-
-
-
diff --git a/indra/newview/skins/default/xui/tr/floater_edit_day_cycle.xml b/indra/newview/skins/default/xui/tr/floater_edit_day_cycle.xml
index a5cbe3a416..e2e87ddf1e 100644
--- a/indra/newview/skins/default/xui/tr/floater_edit_day_cycle.xml
+++ b/indra/newview/skins/default/xui/tr/floater_edit_day_cycle.xml
@@ -36,31 +36,31 @@
- 12öö
+ 12
- 3öö
+ 3
- 6öö
+ 6
- 9öö
+ 9
- 12ös
+ 24
- 3ös
+ 15
- 6ös
+ 18
- 9ös
+ 21
- 12öö
+ 12
|
@@ -97,7 +97,7 @@
Zaman:
-
+
diff --git a/indra/newview/skins/default/xui/tr/floater_edit_sky_preset.xml b/indra/newview/skins/default/xui/tr/floater_edit_sky_preset.xml
index 16564963e5..0e9f86148d 100644
--- a/indra/newview/skins/default/xui/tr/floater_edit_sky_preset.xml
+++ b/indra/newview/skins/default/xui/tr/floater_edit_sky_preset.xml
@@ -86,21 +86,21 @@
|
- 12öö
+ 12
- 6öö
+ 6
- 12ös
+ 24
- 6ös
+ 18
- 12öö
+ 12
-
+
Doğu Açısı
diff --git a/indra/newview/skins/default/xui/tr/floater_picks.xml b/indra/newview/skins/default/xui/tr/floater_picks.xml
index 06a404447e..513a2e319a 100644
--- a/indra/newview/skins/default/xui/tr/floater_picks.xml
+++ b/indra/newview/skins/default/xui/tr/floater_picks.xml
@@ -1,2 +1,2 @@
-
+
diff --git a/indra/newview/skins/default/xui/tr/floater_preview_texture.xml b/indra/newview/skins/default/xui/tr/floater_preview_texture.xml
index 4548fbae64..79e184130a 100644
--- a/indra/newview/skins/default/xui/tr/floater_preview_texture.xml
+++ b/indra/newview/skins/default/xui/tr/floater_preview_texture.xml
@@ -34,7 +34,7 @@
16:10
-
+
16:9
diff --git a/indra/newview/skins/default/xui/tr/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/tr/floater_texture_ctrl.xml
index 1ba9f8c2aa..4ef789f585 100644
--- a/indra/newview/skins/default/xui/tr/floater_texture_ctrl.xml
+++ b/indra/newview/skins/default/xui/tr/floater_texture_ctrl.xml
@@ -1,10 +1,10 @@
-
+
Bir resim seçmek için tıklayın
- Favori:
+ Seçme:
Birden çok doku
diff --git a/indra/newview/skins/default/xui/tr/floater_tools.xml b/indra/newview/skins/default/xui/tr/floater_tools.xml
index 47299059af..cd5e6b7fac 100644
--- a/indra/newview/skins/default/xui/tr/floater_tools.xml
+++ b/indra/newview/skins/default/xui/tr/floater_tools.xml
@@ -1,5 +1,5 @@
-
+
Nesneyi döndürmek için renkli bantları sürükleyin
diff --git a/indra/newview/skins/default/xui/tr/floater_windlight_options.xml b/indra/newview/skins/default/xui/tr/floater_windlight_options.xml
index 02910e2539..6c5fba374c 100644
--- a/indra/newview/skins/default/xui/tr/floater_windlight_options.xml
+++ b/indra/newview/skins/default/xui/tr/floater_windlight_options.xml
@@ -1,7 +1,7 @@
- A-12ÖÖ:A-12ÖS:A-3ÖÖ:A-3ÖS:A-4.30ÖS:A-6ÖÖ:A-6ÖS:A-9ÖÖ:A-9ÖS:Barselona:Tipi:Mavi Gün Ortası:Sahilde Öğleden Sonra:Sahilde Gün Batımı:Varsayılan:Çölde Gün Batımı:Güzel Bir Gün:Kabarık Büyük Bulutlar:Sisli:Şık Şık:Şık Şık Şık:Dondurma:Hayalet:Uygunsuz Gerçekler:Gün Ortası1:Gün Ortası 2:Gün Ortası 3:Gün Ortası 4:Gece:Korsan:Mor:Denizcinin Keyfi:Saf Tensel
+ A-12:A-24:A-3:A-15:A-16.30:A-6:A-18:A-9:A-21:Barselona:Tipi:Mavi Gün Ortası:Sahilde Öğleden Sonra:Sahilde Gün Batımı:Varsayılan:Çölde Gün Batımı:Güzel Bir Gün:Kabarık Büyük Bulutlar:Sisli:Şık Şık:Şık Şık Şık:Dondurma:Hayalet:Uygunsuz Gerçekler:Gün Ortası1:Gün Ortası 2:Gün Ortası 3:Gün Ortası 4:Gece:Korsan:Mor:Denizcinin Keyfi:Saf Tensel
Gökyüzü Ön Ayarları:
diff --git a/indra/newview/skins/default/xui/tr/menu_gesture_gear.xml b/indra/newview/skins/default/xui/tr/menu_gesture_gear.xml
index 9ae433d8bb..cb9b678fdd 100644
--- a/indra/newview/skins/default/xui/tr/menu_gesture_gear.xml
+++ b/indra/newview/skins/default/xui/tr/menu_gesture_gear.xml
@@ -1,6 +1,6 @@
-
+
diff --git a/indra/newview/skins/default/xui/tr/menu_hide_navbar.xml b/indra/newview/skins/default/xui/tr/menu_hide_navbar.xml
index 130c72e04d..d1f213516b 100644
--- a/indra/newview/skins/default/xui/tr/menu_hide_navbar.xml
+++ b/indra/newview/skins/default/xui/tr/menu_hide_navbar.xml
@@ -1,6 +1,6 @@
diff --git a/indra/newview/skins/default/xui/tr/menu_landmark.xml b/indra/newview/skins/default/xui/tr/menu_landmark.xml
index 17068d445d..c68a2f6a90 100644
--- a/indra/newview/skins/default/xui/tr/menu_landmark.xml
+++ b/indra/newview/skins/default/xui/tr/menu_landmark.xml
@@ -2,6 +2,6 @@
-
-
+
+
diff --git a/indra/newview/skins/default/xui/tr/menu_picks_plus.xml b/indra/newview/skins/default/xui/tr/menu_picks_plus.xml
index 0bd84fa88e..d9c4fefc97 100644
--- a/indra/newview/skins/default/xui/tr/menu_picks_plus.xml
+++ b/indra/newview/skins/default/xui/tr/menu_picks_plus.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/indra/newview/skins/default/xui/tr/menu_place.xml b/indra/newview/skins/default/xui/tr/menu_place.xml
index 4ef7c01f09..ad167a328a 100644
--- a/indra/newview/skins/default/xui/tr/menu_place.xml
+++ b/indra/newview/skins/default/xui/tr/menu_place.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/indra/newview/skins/default/xui/tr/menu_places_gear_landmark.xml b/indra/newview/skins/default/xui/tr/menu_places_gear_landmark.xml
index 5282d9fec7..939ee2c7cb 100644
--- a/indra/newview/skins/default/xui/tr/menu_places_gear_landmark.xml
+++ b/indra/newview/skins/default/xui/tr/menu_places_gear_landmark.xml
@@ -15,5 +15,5 @@
-
+
diff --git a/indra/newview/skins/default/xui/tr/menu_slurl.xml b/indra/newview/skins/default/xui/tr/menu_slurl.xml
index 03e3837ea0..73ac068b26 100644
--- a/indra/newview/skins/default/xui/tr/menu_slurl.xml
+++ b/indra/newview/skins/default/xui/tr/menu_slurl.xml
@@ -1,6 +1,6 @@
diff --git a/indra/newview/skins/default/xui/tr/menu_viewer.xml b/indra/newview/skins/default/xui/tr/menu_viewer.xml
index 0877d8881b..efeed833a5 100644
--- a/indra/newview/skins/default/xui/tr/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/tr/menu_viewer.xml
@@ -56,7 +56,7 @@
-
+
- MOOSE gibi gerçekten Uzun bir Adla Kıyafetim
+ MOOSE gibi gerçekten Uzun bir Adla Dış Görünümüm
-
+
-
+
diff --git a/indra/newview/skins/default/xui/tr/strings.xml b/indra/newview/skins/default/xui/tr/strings.xml
index e1885413bb..a17d78486d 100644
--- a/indra/newview/skins/default/xui/tr/strings.xml
+++ b/indra/newview/skins/default/xui/tr/strings.xml
@@ -584,7 +584,7 @@ Lütfen bir dakika içerisinde tekrar oturum açmayı deneyin.
sim durumu
- sık kullanılan
+ favori
bağlantı
@@ -1205,7 +1205,7 @@ Lütfen bir dakika içerisinde tekrar oturum açmayı deneyin.
Aradığınızı bulamadınız mı? [secondlife:///app/search/places/[SEARCH_TERM] Arama] ile bulmayı deneyin.
- Bir yer imini sık kullanılanlarınıza eklemek için buraya sürükleyin.
+ Bir yer imini favorilerinize eklemek için buraya sürükleyin.
Envanterinizde bu dokunun kopyası yok
@@ -1380,10 +1380,10 @@ Lütfen bir dakika içerisinde tekrar oturum açmayı deneyin.
Mimikler
- Sık Kullanılanlarım
+ Favorilerim
- Sık Kullanılanlarım
+ Favorilerim
Mevcut Dış Görünüm
@@ -1985,10 +1985,10 @@ Lütfen bir dakika içerisinde tekrar oturum açmayı deneyin.
(yayınlandıktan sonra güncelleştirilir)
- Herhangi bir Favori veya İlan oluşturmadınız. Bir Favori veya İlan oluşturmak için aşağıdaki Artı düğmesine tıklayın.
+ Herhangi bir Seçme veya İlan oluşturmadınız. Bir Seçme veya İlan oluşturmak için aşağıdaki Artı düğmesine tıklayın.
- Kullanıcının herhangi bir favorisi veya ilanı yok
+ Kullanıcının herhangi bir seçmesi veya ilanı yok
Yükleniyor...
@@ -4165,7 +4165,7 @@ Kötüye Kullanımı Bildirme
Konuşma Mimikleri
- Sık Kullanılan Mimikler
+ Favori Mimikler
Erkek - Afedersiniz
@@ -4798,7 +4798,7 @@ Düzenleyici yolunu çift tırnakla çevrelemeyi deneyin.
Pusula
- Hedef Konumlar
+ Hedef Konum
Mimikler
@@ -4825,7 +4825,7 @@ Düzenleyici yolunu çift tırnakla çevrelemeyi deneyin.
Kişiler
- Favoriler
+ Seçmeler
Yerler
@@ -4897,7 +4897,7 @@ Düzenleyici yolunu çift tırnakla çevrelemeyi deneyin.
Arkadaşlar, gruplar ve yakındaki kişiler
- Profilinizde sık kullanılan olarak gösterilecek yerler
+ Profilinizde favori olarak gösterilecek yerler
Kaydettiğiniz yerler
diff --git a/indra/newview/skins/default/xui/zh/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/zh/floater_day_cycle_options.xml
deleted file mode 100644
index 84186c5836..0000000000
--- a/indra/newview/skins/default/xui/zh/floater_day_cycle_options.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-
-
-
-
-
-
-
- 12am
-
-
- 3am
-
-
- 6am
-
-
- 9am
-
-
- 12pm
-
-
- 3pm
-
-
- 6pm
-
-
- 9pm
-
-
- 12am
-
-
- |
-
-
- I
-
-
- |
-
-
- I
-
-
- |
-
-
- I
-
-
- |
-
-
- I
-
-
- |
-
-
-
-
- Key Frame Settings:
-
-
- Key Time:
-
-
-
-
- Key Preset:
-
-
-
- Snap:
-
-
-
- Length of Cycle:
-
-
-
-
-
- 預覽:
-
-
-
-
-
-
-
-
-
--
cgit v1.2.3
From e82c0561fa5fa157efec445362b09360346ed382 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Fri, 4 Nov 2011 16:14:43 -0500
Subject: SH-2652 Faster depth of field
---
indra/newview/app_settings/settings.xml | 2 +-
.../app_settings/shaders/class1/deferred/cofF.glsl | 86 +++++++++++++++++
.../shaders/class1/deferred/postDeferredF.glsl | 76 ++-------------
indra/newview/llviewershadermgr.cpp | 12 +++
indra/newview/llviewershadermgr.h | 1 +
indra/newview/pipeline.cpp | 107 ++++++++++++++++-----
6 files changed, 192 insertions(+), 92 deletions(-)
create mode 100644 indra/newview/app_settings/shaders/class1/deferred/cofF.glsl
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 53ba005b8a..fb73ddf219 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -9054,7 +9054,7 @@
Type
Boolean
Value
- 1
+ 0
RenderVBOMappingDisable
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl b/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl
new file mode 100644
index 0000000000..81f00f7d0f
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl
@@ -0,0 +1,86 @@
+/**
+ * @file cofF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#extension GL_ARB_texture_rectangle : enable
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform sampler2DRect diffuseRect;
+uniform sampler2DRect depthMap;
+uniform sampler2D bloomMap;
+
+uniform float depth_cutoff;
+uniform float norm_cutoff;
+uniform float focal_distance;
+uniform float blur_constant;
+uniform float tan_pixel_angle;
+uniform float magnification;
+
+uniform mat4 inv_proj;
+uniform vec2 screen_res;
+
+VARYING vec2 vary_fragcoord;
+
+float getDepth(vec2 pos_screen)
+{
+ float z = texture2DRect(depthMap, pos_screen.xy).r;
+ z = z*2.0-1.0;
+ vec4 ndc = vec4(0.0, 0.0, z, 1.0);
+ vec4 p = inv_proj*ndc;
+ return p.z/p.w;
+}
+
+float calc_cof(float depth)
+{
+ float sc = abs(depth-focal_distance)/-depth*blur_constant;
+
+ sc /= magnification;
+
+ // tan_pixel_angle = pixel_length/-depth;
+ float pixel_length = tan_pixel_angle*-focal_distance;
+
+ sc = sc/pixel_length;
+ sc *= 1.414;
+
+ return sc;
+}
+
+void main()
+{
+ vec2 tc = vary_fragcoord.xy;
+
+ float depth = getDepth(tc);
+
+ vec4 diff = texture2DRect(diffuseRect, vary_fragcoord.xy);
+
+ float sc = calc_cof(depth);
+ sc = min(abs(sc), 10.0);
+
+ vec4 bloom = texture2D(bloomMap, vary_fragcoord.xy/screen_res);
+ gl_FragColor.rgb = diff.rgb + bloom.rgb;
+ gl_FragColor.a = sc/10.f;
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
index 985f44fb6c..f684e25df8 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
@@ -30,13 +30,7 @@ out vec4 gl_FragColor;
#endif
uniform sampler2DRect diffuseRect;
-uniform sampler2DRect edgeMap;
-uniform sampler2DRect depthMap;
-uniform sampler2DRect normalMap;
-uniform sampler2D bloomMap;
-uniform float depth_cutoff;
-uniform float norm_cutoff;
uniform float focal_distance;
uniform float blur_constant;
uniform float tan_pixel_angle;
@@ -47,59 +41,16 @@ uniform vec2 screen_res;
VARYING vec2 vary_fragcoord;
-float getDepth(vec2 pos_screen)
+void dofSample(inout vec4 diff, inout float w, float min_sc, vec2 tc)
{
- float z = texture2DRect(depthMap, pos_screen.xy).r;
- z = z*2.0-1.0;
- vec4 ndc = vec4(0.0, 0.0, z, 1.0);
- vec4 p = inv_proj*ndc;
- return p.z/p.w;
-}
-
-float calc_cof(float depth)
-{
- float sc = abs(depth-focal_distance)/-depth*blur_constant;
-
- sc /= magnification;
-
- // tan_pixel_angle = pixel_length/-depth;
- float pixel_length = tan_pixel_angle*-focal_distance;
-
- sc = sc/pixel_length;
- sc *= 1.414;
-
- return sc;
-}
-
-void dofSampleNear(inout vec4 diff, inout float w, float cur_sc, vec2 tc)
-{
- float d = getDepth(tc);
-
- float sc = calc_cof(d);
-
- float wg = 0.25;
-
vec4 s = texture2DRect(diffuseRect, tc);
- // de-weight dull areas to make highlights 'pop'
- wg += s.r+s.g+s.b;
-
- diff += wg*s;
-
- w += wg;
-}
-void dofSample(inout vec4 diff, inout float w, float min_sc, float cur_depth, vec2 tc)
-{
- float d = getDepth(tc);
-
- float sc = calc_cof(d);
-
- if (sc > min_sc //sampled pixel is more "out of focus" than current sample radius
- || d < cur_depth) //sampled pixel is further away than current pixel
+ float sc = s.a*10.0;
+
+ if (sc > min_sc) //sampled pixel is more "out of focus" than current sample radius
{
float wg = 0.25;
- vec4 s = texture2DRect(diffuseRect, tc);
// de-weight dull areas to make highlights 'pop'
wg += s.r+s.g+s.b;
@@ -109,30 +60,20 @@ void dofSample(inout vec4 diff, inout float w, float min_sc, float cur_depth, ve
}
}
-
void main()
{
- vec3 norm = texture2DRect(normalMap, vary_fragcoord.xy).xyz;
- norm = vec3((norm.xy-0.5)*2.0,norm.z); // unpack norm
-
vec2 tc = vary_fragcoord.xy;
- float depth = getDepth(tc);
-
vec4 diff = texture2DRect(diffuseRect, vary_fragcoord.xy);
{
float w = 1.0;
- float sc = calc_cof(depth);
- sc = min(abs(sc), 10.0);
-
- float fd = depth*0.5f;
-
+ float sc = diff.a*10.0;
+
float PI = 3.14159265358979323846264;
// sample quite uniformly spaced points within a circle, for a circular 'bokeh'
- //if (depth < focal_distance)
{
while (sc > 0.5)
{
@@ -143,7 +84,7 @@ void main()
float samp_x = sc*sin(ang);
float samp_y = sc*cos(ang);
// you could test sample coords against an interesting non-circular aperture shape here, if desired.
- dofSample(diff, w, sc, depth, vary_fragcoord.xy + vec2(samp_x,samp_y));
+ dofSample(diff, w, sc, vary_fragcoord.xy + vec2(samp_x,samp_y));
}
sc -= 1.0;
}
@@ -152,6 +93,5 @@ void main()
diff /= w;
}
- vec4 bloom = texture2D(bloomMap, vary_fragcoord.xy/screen_res);
- gl_FragColor = diff + bloom;
+ gl_FragColor = diff;
}
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 108f008f58..8118d32dc4 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -186,6 +186,7 @@ LLGLSLShader gDeferredAvatarEyesProgram;
LLGLSLShader gDeferredFullbrightProgram;
LLGLSLShader gDeferredEmissiveProgram;
LLGLSLShader gDeferredPostProgram;
+LLGLSLShader gDeferredCoFProgram;
LLGLSLShader gFXAAProgram;
LLGLSLShader gDeferredPostNoDoFProgram;
LLGLSLShader gDeferredWLSkyProgram;
@@ -1013,6 +1014,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredEmissiveProgram.unload();
gDeferredAvatarEyesProgram.unload();
gDeferredPostProgram.unload();
+ gDeferredCoFProgram.unload();
gFXAAProgram.unload();
gDeferredWaterProgram.unload();
gDeferredWLSkyProgram.unload();
@@ -1425,6 +1427,16 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
success = gDeferredPostProgram.createShader(NULL, NULL);
}
+ if (success)
+ {
+ gDeferredCoFProgram.mName = "Deferred CoF Shader";
+ gDeferredCoFProgram.mShaderFiles.clear();
+ gDeferredCoFProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredV.glsl", GL_VERTEX_SHADER_ARB));
+ gDeferredCoFProgram.mShaderFiles.push_back(make_pair("deferred/cofF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredCoFProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
+ success = gDeferredCoFProgram.createShader(NULL, NULL);
+ }
+
if (success)
{
gDeferredPostNoDoFProgram.mName = "Deferred Post Shader";
diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h
index 3f670dfb14..f746d3f115 100644
--- a/indra/newview/llviewershadermgr.h
+++ b/indra/newview/llviewershadermgr.h
@@ -330,6 +330,7 @@ extern LLGLSLShader gDeferredSoftenProgram;
extern LLGLSLShader gDeferredShadowProgram;
extern LLGLSLShader gDeferredShadowAlphaMaskProgram;
extern LLGLSLShader gDeferredPostProgram;
+extern LLGLSLShader gDeferredCoFProgram;
extern LLGLSLShader gFXAAProgram;
extern LLGLSLShader gDeferredPostNoDoFProgram;
extern LLGLSLShader gDeferredAvatarShadowProgram;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 152f4728dd..85899b5ad6 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -443,7 +443,7 @@ void LLPipeline::init()
sRenderBump = gSavedSettings.getBOOL("RenderObjectBump");
sUseTriStrips = gSavedSettings.getBOOL("RenderUseTriStrips");
LLVertexBuffer::sUseStreamDraw = gSavedSettings.getBOOL("RenderUseStreamVBO");
- LLVertexBuffer::sUseStreamDraw = gSavedSettings.getBOOL("RenderUseVAO");
+ LLVertexBuffer::sUseVAO = gSavedSettings.getBOOL("RenderUseVAO");
LLVertexBuffer::sPreferStreamDraw = gSavedSettings.getBOOL("RenderPreferStreamDraw");
sRenderAttachedLights = gSavedSettings.getBOOL("RenderAttachedLights");
sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles");
@@ -6136,7 +6136,7 @@ void LLPipeline::resetVertexBuffers()
sRenderBump = gSavedSettings.getBOOL("RenderObjectBump");
sUseTriStrips = gSavedSettings.getBOOL("RenderUseTriStrips");
LLVertexBuffer::sUseStreamDraw = gSavedSettings.getBOOL("RenderUseStreamVBO");
- LLVertexBuffer::sUseStreamDraw = gSavedSettings.getBOOL("RenderUseVAO");
+ LLVertexBuffer::sUseVAO = gSavedSettings.getBOOL("RenderUseVAO");
LLVertexBuffer::sPreferStreamDraw = gSavedSettings.getBOOL("RenderPreferStreamDraw");
LLVertexBuffer::sEnableVBOs = gSavedSettings.getBOOL("RenderVBOEnable");
LLVertexBuffer::sDisableVBOMapping = LLVertexBuffer::sEnableVBOs && gSavedSettings.getBOOL("RenderVBOMappingDisable") ;
@@ -6487,7 +6487,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
}
LLGLDisable blend(GL_BLEND);
- bindDeferredShader(*shader);
+
if (dof_enabled)
{
@@ -6595,41 +6595,102 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
blur_constant /= 1000.f; //convert to meters for shader
F32 magnification = focal_length/(subject_distance-focal_length);
+ mDeferredLight.bindTarget();
+ shader = &gDeferredCoFProgram;
+
+ bindDeferredShader(*shader);
+
+ S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mScreen.getUsage());
+ if (channel > -1)
+ {
+ mScreen.bindTexture(0, channel);
+ }
+
+ if (multisample)
+ { //bloom has already been added, bind black
+ channel = shader->enableTexture(LLShaderMgr::DEFERRED_BLOOM);
+ if (channel > -1)
+ {
+ gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sBlackImagep);
+ }
+ }
+
shader->uniform1f(LLShaderMgr::DOF_FOCAL_DISTANCE, -subject_distance/1000.f);
shader->uniform1f(LLShaderMgr::DOF_BLUR_CONSTANT, blur_constant);
shader->uniform1f(LLShaderMgr::DOF_TAN_PIXEL_ANGLE, tanf(1.f/LLDrawable::sCurPixelAngle));
shader->uniform1f(LLShaderMgr::DOF_MAGNIFICATION, magnification);
- }
- S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mScreen.getUsage());
- if (channel > -1)
- {
- mScreen.bindTexture(0, channel);
- }
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+ gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
+ gGL.vertex2f(-1,-1);
+
+ gGL.texCoord2f(tc1.mV[0], tc2.mV[1]);
+ gGL.vertex2f(-1,3);
+
+ gGL.texCoord2f(tc2.mV[0], tc1.mV[1]);
+ gGL.vertex2f(3,-1);
+
+ gGL.end();
+
+ unbindDeferredShader(*shader);
+ mDeferredLight.flush();
- if (multisample)
- { //bloom has already been added, bind black
- channel = shader->enableTexture(LLShaderMgr::DEFERRED_BLOOM);
+
+ shader = &gDeferredPostProgram;
+ bindDeferredShader(*shader);
+ channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mDeferredLight.getUsage());
if (channel > -1)
{
- gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sBlackImagep);
+ mDeferredLight.bindTexture(0, channel);
}
+
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+ gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
+ gGL.vertex2f(-1,-1);
+
+ gGL.texCoord2f(tc1.mV[0], tc2.mV[1]);
+ gGL.vertex2f(-1,3);
+
+ gGL.texCoord2f(tc2.mV[0], tc1.mV[1]);
+ gGL.vertex2f(3,-1);
+
+ gGL.end();
+
+ unbindDeferredShader(*shader);
}
+ else
+ {
+ bindDeferredShader(*shader);
-
- gGL.begin(LLRender::TRIANGLE_STRIP);
- gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
- gGL.vertex2f(-1,-1);
+ S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mScreen.getUsage());
+ if (channel > -1)
+ {
+ mScreen.bindTexture(0, channel);
+ }
+
+ if (multisample)
+ { //bloom has already been added, bind black
+ channel = shader->enableTexture(LLShaderMgr::DEFERRED_BLOOM);
+ if (channel > -1)
+ {
+ gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sBlackImagep);
+ }
+ }
+
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+ gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
+ gGL.vertex2f(-1,-1);
- gGL.texCoord2f(tc1.mV[0], tc2.mV[1]);
- gGL.vertex2f(-1,3);
+ gGL.texCoord2f(tc1.mV[0], tc2.mV[1]);
+ gGL.vertex2f(-1,3);
- gGL.texCoord2f(tc2.mV[0], tc1.mV[1]);
- gGL.vertex2f(3,-1);
+ gGL.texCoord2f(tc2.mV[0], tc1.mV[1]);
+ gGL.vertex2f(3,-1);
- gGL.end();
+ gGL.end();
- unbindDeferredShader(*shader);
+ unbindDeferredShader(*shader);
+ }
}
}
else
--
cgit v1.2.3
From 8a8e9ccdb67e7e8a492a4fe1505407ebe128ee18 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Fri, 4 Nov 2011 16:15:05 -0500
Subject: SH-2652 Don't allocate 6000+ strings every frame
---
indra/newview/llfolderviewitem.cpp | 2 +-
indra/newview/llfolderviewitem.h | 2 +-
indra/newview/llspatialpartition.cpp | 40 ++++-
indra/newview/lltool.h | 2 +-
indra/newview/llviewermedia.cpp | 283 +++++++++++++++++++----------------
indra/newview/llviewermedia.h | 2 +-
6 files changed, 199 insertions(+), 132 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp
index 622dcfe8dd..02222e430f 100644
--- a/indra/newview/llfolderviewitem.cpp
+++ b/indra/newview/llfolderviewitem.cpp
@@ -658,7 +658,7 @@ LLViewerInventoryItem * LLFolderViewItem::getInventoryItem(void)
return gInventory.getItem(getListener()->getUUID());
}
-std::string LLFolderViewItem::getName( void ) const
+const std::string& LLFolderViewItem::getName( void ) const
{
if(mListener)
{
diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h
index 676eaf825d..be71817316 100644
--- a/indra/newview/llfolderviewitem.h
+++ b/indra/newview/llfolderviewitem.h
@@ -267,7 +267,7 @@ public:
// This method returns the actual name of the thing being
// viewed. This method will ask the viewed object itself.
- std::string getName( void ) const;
+ const std::string& getName( void ) const;
const std::string& getSearchableLabel( void ) const;
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 7bf4e901c1..3fecc33802 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -1617,6 +1617,13 @@ static LLFastTimer::DeclareTimer FTM_SET_OCCLUSION_STATE("Occlusion State");
static LLFastTimer::DeclareTimer FTM_OCCLUSION_EARLY_FAIL("Occlusion Early Fail");
static LLFastTimer::DeclareTimer FTM_OCCLUSION_ALLOCATE("Allocate");
static LLFastTimer::DeclareTimer FTM_OCCLUSION_BUILD("Build");
+static LLFastTimer::DeclareTimer FTM_OCCLUSION_BEGIN_QUERY("Begin Query");
+static LLFastTimer::DeclareTimer FTM_OCCLUSION_END_QUERY("End Query");
+static LLFastTimer::DeclareTimer FTM_OCCLUSION_SET_BUFFER("Set Buffer");
+static LLFastTimer::DeclareTimer FTM_OCCLUSION_DRAW_WATER("Draw Water");
+static LLFastTimer::DeclareTimer FTM_OCCLUSION_DRAW("Draw");
+
+
void LLSpatialGroup::doOcclusion(LLCamera* camera)
{
@@ -1635,6 +1642,19 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera)
{
if (!isOcclusionState(QUERY_PENDING) || isOcclusionState(DISCARD_QUERY))
{
+ bool check = true;
+
+ if (isOcclusionState(QUERY_PENDING))
+ {
+ GLuint available = 0;
+ glGetQueryObjectuivARB(mOcclusionQuery[LLViewerCamera::sCurCameraID], GL_QUERY_RESULT_AVAILABLE_ARB, &available);
+ if (available == GL_FALSE)
+ {
+ check = false;
+ }
+ }
+
+ if (check)
{ //no query pending, or previous query to be discarded
LLFastTimer t(FTM_RENDER_OCCLUSION);
@@ -1671,12 +1691,21 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera)
{
LLFastTimer t(FTM_PUSH_OCCLUSION_VERTS);
- glBeginQueryARB(mode, mOcclusionQuery[LLViewerCamera::sCurCameraID]);
+
+ {
+ LLFastTimer t(FTM_OCCLUSION_BEGIN_QUERY);
+ glBeginQueryARB(mode, mOcclusionQuery[LLViewerCamera::sCurCameraID]);
+ }
- mOcclusionVerts->setBuffer(LLVertexBuffer::MAP_VERTEX);
+ {
+ LLFastTimer t(FTM_OCCLUSION_SET_BUFFER);
+ mOcclusionVerts->setBuffer(LLVertexBuffer::MAP_VERTEX);
+ }
if (!use_depth_clamp && mSpatialPartition->mDrawableType == LLDrawPool::POOL_VOIDWATER)
{
+ LLFastTimer t(FTM_OCCLUSION_DRAW_WATER);
+
LLGLSquashToFarClip squash(glh_get_current_projection(), 1);
if (camera->getOrigin().isExactlyZero())
{ //origin is invalid, draw entire box
@@ -1690,6 +1719,7 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera)
}
else
{
+ LLFastTimer t(FTM_OCCLUSION_DRAW);
if (camera->getOrigin().isExactlyZero())
{ //origin is invalid, draw entire box
mOcclusionVerts->drawRange(LLRender::TRIANGLE_FAN, 0, 7, 8, 0);
@@ -1701,7 +1731,11 @@ void LLSpatialGroup::doOcclusion(LLCamera* camera)
}
}
- glEndQueryARB(mode);
+
+ {
+ LLFastTimer t(FTM_OCCLUSION_END_QUERY);
+ glEndQueryARB(mode);
+ }
}
}
diff --git a/indra/newview/lltool.h b/indra/newview/lltool.h
index d3edabb486..ecc435d844 100644
--- a/indra/newview/lltool.h
+++ b/indra/newview/lltool.h
@@ -68,7 +68,7 @@ public:
virtual void localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const
{ *screen_x = local_x; *screen_y = local_y; }
- virtual std::string getName() const { return mName; }
+ virtual const std::string& getName() const { return mName; }
// New virtual functions
virtual LLViewerObject* getEditingObject() { return NULL; }
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 41b4dc01e8..cb78c40f9a 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -782,6 +782,12 @@ static bool proximity_comparitor(const LLViewerMediaImpl* i1, const LLViewerMedi
}
static LLFastTimer::DeclareTimer FTM_MEDIA_UPDATE("Update Media");
+static LLFastTimer::DeclareTimer FTM_MEDIA_SPARE_IDLE("Spare Idle");
+static LLFastTimer::DeclareTimer FTM_MEDIA_UPDATE_INTEREST("Update/Interest");
+static LLFastTimer::DeclareTimer FTM_MEDIA_SORT("Sort");
+static LLFastTimer::DeclareTimer FTM_MEDIA_SORT2("Sort 2");
+static LLFastTimer::DeclareTimer FTM_MEDIA_MISC("Misc");
+
//////////////////////////////////////////////////////////////////////////////////////////
// static
@@ -806,21 +812,28 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
impl_list::iterator iter = sViewerMediaImplList.begin();
impl_list::iterator end = sViewerMediaImplList.end();
- for(; iter != end;)
{
- LLViewerMediaImpl* pimpl = *iter++;
- pimpl->update();
- pimpl->calculateInterest();
+ LLFastTimer t(FTM_MEDIA_UPDATE_INTEREST);
+ for(; iter != end;)
+ {
+ LLViewerMediaImpl* pimpl = *iter++;
+ pimpl->update();
+ pimpl->calculateInterest();
+ }
}
// Let the spare media source actually launch
if(sSpareBrowserMediaSource)
{
+ LLFastTimer t(FTM_MEDIA_SPARE_IDLE);
sSpareBrowserMediaSource->idle();
}
- // Sort the static instance list using our interest criteria
- sViewerMediaImplList.sort(priorityComparitor);
+ {
+ LLFastTimer t(FTM_MEDIA_SORT);
+ // Sort the static instance list using our interest criteria
+ sViewerMediaImplList.sort(priorityComparitor);
+ }
// Go through the list again and adjust according to priority.
iter = sViewerMediaImplList.begin();
@@ -848,147 +861,150 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
// max_instances must be set high enough to allow the various instances used in the UI (for the help browser, search, etc.) to be loaded.
// If max_normal + max_low is less than max_instances, things will tend to get unloaded instead of being set to slideshow.
- for(; iter != end; iter++)
{
- LLViewerMediaImpl* pimpl = *iter;
+ LLFastTimer t(FTM_MEDIA_MISC);
+ for(; iter != end; iter++)
+ {
+ LLViewerMediaImpl* pimpl = *iter;
- LLPluginClassMedia::EPriority new_priority = LLPluginClassMedia::PRIORITY_NORMAL;
+ LLPluginClassMedia::EPriority new_priority = LLPluginClassMedia::PRIORITY_NORMAL;
- if(pimpl->isForcedUnloaded() || (impl_count_total >= (int)max_instances))
- {
- // Never load muted or failed impls.
- // Hard limit on the number of instances that will be loaded at one time
- new_priority = LLPluginClassMedia::PRIORITY_UNLOADED;
- }
- else if(!pimpl->getVisible())
- {
- new_priority = LLPluginClassMedia::PRIORITY_HIDDEN;
- }
- else if(pimpl->hasFocus())
- {
- new_priority = LLPluginClassMedia::PRIORITY_HIGH;
- impl_count_interest_normal++; // count this against the count of "normal" instances for priority purposes
- }
- else if(pimpl->getUsedInUI())
- {
- new_priority = LLPluginClassMedia::PRIORITY_NORMAL;
- impl_count_interest_normal++;
- }
- else if(pimpl->isParcelMedia())
- {
- new_priority = LLPluginClassMedia::PRIORITY_NORMAL;
- impl_count_interest_normal++;
- }
- else
- {
- // Look at interest and CPU usage for instances that aren't in any of the above states.
-
- // Heuristic -- if the media texture's approximate screen area is less than 1/4 of the native area of the texture,
- // turn it down to low instead of normal. This may downsample for plugins that support it.
- bool media_is_small = false;
- F64 approximate_interest = pimpl->getApproximateTextureInterest();
- if(approximate_interest == 0.0f)
+ if(pimpl->isForcedUnloaded() || (impl_count_total >= (int)max_instances))
{
- // this media has no current size, which probably means it's not loaded.
- media_is_small = true;
+ // Never load muted or failed impls.
+ // Hard limit on the number of instances that will be loaded at one time
+ new_priority = LLPluginClassMedia::PRIORITY_UNLOADED;
}
- else if(pimpl->getInterest() < (approximate_interest / 4))
+ else if(!pimpl->getVisible())
{
- media_is_small = true;
+ new_priority = LLPluginClassMedia::PRIORITY_HIDDEN;
}
-
- if(pimpl->getInterest() == 0.0f)
+ else if(pimpl->hasFocus())
{
- // This media is completely invisible, due to being outside the view frustrum or out of range.
- new_priority = LLPluginClassMedia::PRIORITY_HIDDEN;
+ new_priority = LLPluginClassMedia::PRIORITY_HIGH;
+ impl_count_interest_normal++; // count this against the count of "normal" instances for priority purposes
}
- else if(check_cpu_usage && (total_cpu > max_cpu))
+ else if(pimpl->getUsedInUI())
{
- // Higher priority plugins have already used up the CPU budget. Set remaining ones to slideshow priority.
- new_priority = LLPluginClassMedia::PRIORITY_SLIDESHOW;
+ new_priority = LLPluginClassMedia::PRIORITY_NORMAL;
+ impl_count_interest_normal++;
}
- else if((impl_count_interest_normal < (int)max_normal) && !media_is_small)
+ else if(pimpl->isParcelMedia())
{
- // Up to max_normal inworld get normal priority
new_priority = LLPluginClassMedia::PRIORITY_NORMAL;
impl_count_interest_normal++;
}
- else if (impl_count_interest_low + impl_count_interest_normal < (int)max_low + (int)max_normal)
+ else
{
- // The next max_low inworld get turned down
- new_priority = LLPluginClassMedia::PRIORITY_LOW;
- impl_count_interest_low++;
-
- // Set the low priority size for downsampling to approximately the size the texture is displayed at.
+ // Look at interest and CPU usage for instances that aren't in any of the above states.
+
+ // Heuristic -- if the media texture's approximate screen area is less than 1/4 of the native area of the texture,
+ // turn it down to low instead of normal. This may downsample for plugins that support it.
+ bool media_is_small = false;
+ F64 approximate_interest = pimpl->getApproximateTextureInterest();
+ if(approximate_interest == 0.0f)
+ {
+ // this media has no current size, which probably means it's not loaded.
+ media_is_small = true;
+ }
+ else if(pimpl->getInterest() < (approximate_interest / 4))
+ {
+ media_is_small = true;
+ }
+
+ if(pimpl->getInterest() == 0.0f)
{
- F32 approximate_interest_dimension = (F32) sqrt(pimpl->getInterest());
+ // This media is completely invisible, due to being outside the view frustrum or out of range.
+ new_priority = LLPluginClassMedia::PRIORITY_HIDDEN;
+ }
+ else if(check_cpu_usage && (total_cpu > max_cpu))
+ {
+ // Higher priority plugins have already used up the CPU budget. Set remaining ones to slideshow priority.
+ new_priority = LLPluginClassMedia::PRIORITY_SLIDESHOW;
+ }
+ else if((impl_count_interest_normal < (int)max_normal) && !media_is_small)
+ {
+ // Up to max_normal inworld get normal priority
+ new_priority = LLPluginClassMedia::PRIORITY_NORMAL;
+ impl_count_interest_normal++;
+ }
+ else if (impl_count_interest_low + impl_count_interest_normal < (int)max_low + (int)max_normal)
+ {
+ // The next max_low inworld get turned down
+ new_priority = LLPluginClassMedia::PRIORITY_LOW;
+ impl_count_interest_low++;
+
+ // Set the low priority size for downsampling to approximately the size the texture is displayed at.
+ {
+ F32 approximate_interest_dimension = (F32) sqrt(pimpl->getInterest());
- pimpl->setLowPrioritySizeLimit(llround(approximate_interest_dimension));
+ pimpl->setLowPrioritySizeLimit(llround(approximate_interest_dimension));
+ }
+ }
+ else
+ {
+ // Any additional impls (up to max_instances) get very infrequent time
+ new_priority = LLPluginClassMedia::PRIORITY_SLIDESHOW;
}
}
- else
- {
- // Any additional impls (up to max_instances) get very infrequent time
- new_priority = LLPluginClassMedia::PRIORITY_SLIDESHOW;
- }
- }
- if(!pimpl->getUsedInUI() && (new_priority != LLPluginClassMedia::PRIORITY_UNLOADED))
- {
- // This is a loadable inworld impl -- the last one in the list in this class defines the lowest loadable interest.
- lowest_interest_loadable = pimpl;
+ if(!pimpl->getUsedInUI() && (new_priority != LLPluginClassMedia::PRIORITY_UNLOADED))
+ {
+ // This is a loadable inworld impl -- the last one in the list in this class defines the lowest loadable interest.
+ lowest_interest_loadable = pimpl;
- impl_count_total++;
- }
+ impl_count_total++;
+ }
- // Overrides if the window is minimized or we lost focus (taking care
- // not to accidentally "raise" the priority either)
- if (!gViewerWindow->getActive() /* viewer window minimized? */
- && new_priority > LLPluginClassMedia::PRIORITY_HIDDEN)
- {
- new_priority = LLPluginClassMedia::PRIORITY_HIDDEN;
- }
- else if (!gFocusMgr.getAppHasFocus() /* viewer window lost focus? */
- && new_priority > LLPluginClassMedia::PRIORITY_LOW)
- {
- new_priority = LLPluginClassMedia::PRIORITY_LOW;
- }
+ // Overrides if the window is minimized or we lost focus (taking care
+ // not to accidentally "raise" the priority either)
+ if (!gViewerWindow->getActive() /* viewer window minimized? */
+ && new_priority > LLPluginClassMedia::PRIORITY_HIDDEN)
+ {
+ new_priority = LLPluginClassMedia::PRIORITY_HIDDEN;
+ }
+ else if (!gFocusMgr.getAppHasFocus() /* viewer window lost focus? */
+ && new_priority > LLPluginClassMedia::PRIORITY_LOW)
+ {
+ new_priority = LLPluginClassMedia::PRIORITY_LOW;
+ }
- if(!inworld_media_enabled)
- {
- // If inworld media is locked out, force all inworld media to stay unloaded.
- if(!pimpl->getUsedInUI())
+ if(!inworld_media_enabled)
{
- new_priority = LLPluginClassMedia::PRIORITY_UNLOADED;
+ // If inworld media is locked out, force all inworld media to stay unloaded.
+ if(!pimpl->getUsedInUI())
+ {
+ new_priority = LLPluginClassMedia::PRIORITY_UNLOADED;
+ }
}
- }
- // update the audio stream here as well
- if( !inworld_audio_enabled)
- {
- if(LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio())
+ // update the audio stream here as well
+ if( !inworld_audio_enabled)
{
- gAudiop->stopInternetStream();
+ if(LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio())
+ {
+ gAudiop->stopInternetStream();
+ }
}
- }
- pimpl->setPriority(new_priority);
+ pimpl->setPriority(new_priority);
- if(pimpl->getUsedInUI())
- {
- // Any impls used in the UI should not be in the proximity list.
- pimpl->mProximity = -1;
- }
- else
- {
- proximity_order.push_back(pimpl);
- }
+ if(pimpl->getUsedInUI())
+ {
+ // Any impls used in the UI should not be in the proximity list.
+ pimpl->mProximity = -1;
+ }
+ else
+ {
+ proximity_order.push_back(pimpl);
+ }
- total_cpu += pimpl->getCPUUsage();
+ total_cpu += pimpl->getCPUUsage();
- if (!pimpl->getUsedInUI() && pimpl->hasMedia())
- {
- sAnyMediaShowing = true;
- }
+ if (!pimpl->getUsedInUI() && pimpl->hasMedia())
+ {
+ sAnyMediaShowing = true;
+ }
+ }
}
// Re-calculate this every time.
@@ -1014,6 +1030,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
}
else
{
+ LLFastTimer t(FTM_MEDIA_SORT2);
// Use a distance-based sort for proximity values.
std::stable_sort(proximity_order.begin(), proximity_order.end(), proximity_comparitor);
}
@@ -2506,7 +2523,7 @@ void LLViewerMediaImpl::updateJavascriptObject()
}
//////////////////////////////////////////////////////////////////////////////////////////
-std::string LLViewerMediaImpl::getName() const
+const std::string& LLViewerMediaImpl::getName() const
{
if (mMediaSource)
{
@@ -2768,8 +2785,14 @@ bool LLViewerMediaImpl::canNavigateBack()
}
//////////////////////////////////////////////////////////////////////////////////////////
+static LLFastTimer::DeclareTimer FTM_MEDIA_DO_UPDATE("Do Update");
+static LLFastTimer::DeclareTimer FTM_MEDIA_GET_DATA("Get Data");
+static LLFastTimer::DeclareTimer FTM_MEDIA_SET_SUBIMAGE("Set Subimage");
+
+
void LLViewerMediaImpl::update()
{
+ LLFastTimer t(FTM_MEDIA_DO_UPDATE);
if(mMediaSource == NULL)
{
if(mPriority == LLPluginClassMedia::PRIORITY_UNLOADED)
@@ -2869,20 +2892,27 @@ void LLViewerMediaImpl::update()
if(width > 0 && height > 0)
{
- U8* data = mMediaSource->getBitsData();
+ U8* data = NULL;
+ {
+ LLFastTimer t(FTM_MEDIA_GET_DATA);
+ data = mMediaSource->getBitsData();
+ }
// Offset the pixels pointer to match x_pos and y_pos
data += ( x_pos * mMediaSource->getTextureDepth() * mMediaSource->getBitsWidth() );
data += ( y_pos * mMediaSource->getTextureDepth() );
- placeholder_image->setSubImage(
- data,
- mMediaSource->getBitsWidth(),
- mMediaSource->getBitsHeight(),
- x_pos,
- y_pos,
- width,
- height);
+ {
+ LLFastTimer t(FTM_MEDIA_SET_SUBIMAGE);
+ placeholder_image->setSubImage(
+ data,
+ mMediaSource->getBitsWidth(),
+ mMediaSource->getBitsHeight(),
+ x_pos,
+ y_pos,
+ width,
+ height);
+ }
}
@@ -3455,8 +3485,11 @@ BOOL LLViewerMediaImpl::isUpdated()
return mIsUpdated ;
}
+static LLFastTimer::DeclareTimer FTM_MEDIA_CALCULATE_INTEREST("Calculate Interest");
+
void LLViewerMediaImpl::calculateInterest()
{
+ LLFastTimer t(FTM_MEDIA_CALCULATE_INTEREST);
LLViewerMediaTexture* texture = LLViewerTextureManager::findMediaTexture( mTextureId );
if(texture != NULL)
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index 0b69b8f0c1..0da26ea3c7 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -317,7 +317,7 @@ public:
/*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask) { return FALSE; };
/*virtual*/ BOOL handleMiddleMouseDown(S32 x, S32 y, MASK mask) { return FALSE; };
/*virtual*/ BOOL handleMiddleMouseUp(S32 x, S32 y, MASK mask) {return FALSE; };
- /*virtual*/ std::string getName() const;
+ /*virtual*/ const std::string& getName() const;
/*virtual*/ void screenPointToLocal(S32 screen_x, S32 screen_y, S32* local_x, S32* local_y) const {};
/*virtual*/ void localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const {};
--
cgit v1.2.3
From 785dcfe6d496bd44730b6ba0004614b2c6d04c6a Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Fri, 4 Nov 2011 16:42:00 -0500
Subject: SH-2652 Even faster depth of field
---
.../shaders/class1/deferred/dofCombineF.glsl | 49 +++++++++
.../shaders/class1/deferred/postDeferredF.glsl | 5 -
indra/newview/llviewershadermgr.cpp | 12 +++
indra/newview/llviewershadermgr.h | 1 +
indra/newview/pipeline.cpp | 120 +++++++++++++--------
5 files changed, 139 insertions(+), 48 deletions(-)
create mode 100644 indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl b/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl
new file mode 100644
index 0000000000..de0c70cfe9
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl
@@ -0,0 +1,49 @@
+/**
+ * @file dofCombineF.glsl
+ *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2007, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#extension GL_ARB_texture_rectangle : enable
+
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
+uniform sampler2DRect diffuseRect;
+uniform sampler2DRect lightMap;
+
+uniform mat4 inv_proj;
+uniform vec2 screen_res;
+
+VARYING vec2 vary_fragcoord;
+
+void main()
+{
+ vec2 tc = vary_fragcoord.xy;
+
+ vec4 dof = texture2DRect(diffuseRect, vary_fragcoord.xy*0.5);
+
+ vec4 diff = texture2DRect(lightMap, vary_fragcoord.xy);
+
+ gl_FragColor = mix(diff, dof, diff.a);
+}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
index f684e25df8..1db638b943 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
@@ -31,11 +31,6 @@ out vec4 gl_FragColor;
uniform sampler2DRect diffuseRect;
-uniform float focal_distance;
-uniform float blur_constant;
-uniform float tan_pixel_angle;
-uniform float magnification;
-
uniform mat4 inv_proj;
uniform vec2 screen_res;
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 8118d32dc4..32978a0d04 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -187,6 +187,7 @@ LLGLSLShader gDeferredFullbrightProgram;
LLGLSLShader gDeferredEmissiveProgram;
LLGLSLShader gDeferredPostProgram;
LLGLSLShader gDeferredCoFProgram;
+LLGLSLShader gDeferredDoFCombineProgram;
LLGLSLShader gFXAAProgram;
LLGLSLShader gDeferredPostNoDoFProgram;
LLGLSLShader gDeferredWLSkyProgram;
@@ -1015,6 +1016,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
gDeferredAvatarEyesProgram.unload();
gDeferredPostProgram.unload();
gDeferredCoFProgram.unload();
+ gDeferredDoFCombineProgram.unload();
gFXAAProgram.unload();
gDeferredWaterProgram.unload();
gDeferredWLSkyProgram.unload();
@@ -1437,6 +1439,16 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
success = gDeferredCoFProgram.createShader(NULL, NULL);
}
+ if (success)
+ {
+ gDeferredDoFCombineProgram.mName = "Deferred DoFCombine Shader";
+ gDeferredDoFCombineProgram.mShaderFiles.clear();
+ gDeferredDoFCombineProgram.mShaderFiles.push_back(make_pair("deferred/postDeferredV.glsl", GL_VERTEX_SHADER_ARB));
+ gDeferredDoFCombineProgram.mShaderFiles.push_back(make_pair("deferred/dofCombineF.glsl", GL_FRAGMENT_SHADER_ARB));
+ gDeferredDoFCombineProgram.mShaderLevel = mVertexShaderLevel[SHADER_DEFERRED];
+ success = gDeferredDoFCombineProgram.createShader(NULL, NULL);
+ }
+
if (success)
{
gDeferredPostNoDoFProgram.mName = "Deferred Post Shader";
diff --git a/indra/newview/llviewershadermgr.h b/indra/newview/llviewershadermgr.h
index f746d3f115..95eb551bf1 100644
--- a/indra/newview/llviewershadermgr.h
+++ b/indra/newview/llviewershadermgr.h
@@ -331,6 +331,7 @@ extern LLGLSLShader gDeferredShadowProgram;
extern LLGLSLShader gDeferredShadowAlphaMaskProgram;
extern LLGLSLShader gDeferredPostProgram;
extern LLGLSLShader gDeferredCoFProgram;
+extern LLGLSLShader gDeferredDoFCombineProgram;
extern LLGLSLShader gFXAAProgram;
extern LLGLSLShader gDeferredPostNoDoFProgram;
extern LLGLSLShader gDeferredAvatarShadowProgram;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 85899b5ad6..8ae7e97f4a 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -6595,68 +6595,102 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
blur_constant /= 1000.f; //convert to meters for shader
F32 magnification = focal_length/(subject_distance-focal_length);
- mDeferredLight.bindTarget();
- shader = &gDeferredCoFProgram;
+ { //build diffuse+bloom+CoF
+ mDeferredLight.bindTarget();
+ shader = &gDeferredCoFProgram;
- bindDeferredShader(*shader);
-
- S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mScreen.getUsage());
- if (channel > -1)
- {
- mScreen.bindTexture(0, channel);
- }
+ bindDeferredShader(*shader);
- if (multisample)
- { //bloom has already been added, bind black
- channel = shader->enableTexture(LLShaderMgr::DEFERRED_BLOOM);
+ S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mScreen.getUsage());
if (channel > -1)
{
- gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sBlackImagep);
+ mScreen.bindTexture(0, channel);
+ }
+
+ if (multisample)
+ { //bloom has already been added, bind black
+ channel = shader->enableTexture(LLShaderMgr::DEFERRED_BLOOM);
+ if (channel > -1)
+ {
+ gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sBlackImagep);
+ }
}
- }
- shader->uniform1f(LLShaderMgr::DOF_FOCAL_DISTANCE, -subject_distance/1000.f);
- shader->uniform1f(LLShaderMgr::DOF_BLUR_CONSTANT, blur_constant);
- shader->uniform1f(LLShaderMgr::DOF_TAN_PIXEL_ANGLE, tanf(1.f/LLDrawable::sCurPixelAngle));
- shader->uniform1f(LLShaderMgr::DOF_MAGNIFICATION, magnification);
+ shader->uniform1f(LLShaderMgr::DOF_FOCAL_DISTANCE, -subject_distance/1000.f);
+ shader->uniform1f(LLShaderMgr::DOF_BLUR_CONSTANT, blur_constant);
+ shader->uniform1f(LLShaderMgr::DOF_TAN_PIXEL_ANGLE, tanf(1.f/LLDrawable::sCurPixelAngle));
+ shader->uniform1f(LLShaderMgr::DOF_MAGNIFICATION, magnification);
- gGL.begin(LLRender::TRIANGLE_STRIP);
- gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
- gGL.vertex2f(-1,-1);
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+ gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
+ gGL.vertex2f(-1,-1);
- gGL.texCoord2f(tc1.mV[0], tc2.mV[1]);
- gGL.vertex2f(-1,3);
+ gGL.texCoord2f(tc1.mV[0], tc2.mV[1]);
+ gGL.vertex2f(-1,3);
- gGL.texCoord2f(tc2.mV[0], tc1.mV[1]);
- gGL.vertex2f(3,-1);
+ gGL.texCoord2f(tc2.mV[0], tc1.mV[1]);
+ gGL.vertex2f(3,-1);
- gGL.end();
+ gGL.end();
- unbindDeferredShader(*shader);
- mDeferredLight.flush();
+ unbindDeferredShader(*shader);
+ mDeferredLight.flush();
+ }
+ { //perform DoF sampling at half-res (preserve alpha channel)
+ mScreen.bindTarget();
+ glViewport(0,0,mScreen.getWidth()/2, mScreen.getHeight()/2);
+ gGL.setColorMask(true, false);
- shader = &gDeferredPostProgram;
- bindDeferredShader(*shader);
- channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mDeferredLight.getUsage());
- if (channel > -1)
- {
- mDeferredLight.bindTexture(0, channel);
+ shader = &gDeferredPostProgram;
+ bindDeferredShader(*shader);
+ S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mDeferredLight.getUsage());
+ if (channel > -1)
+ {
+ mDeferredLight.bindTexture(0, channel);
+ }
+
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+ gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
+ gGL.vertex2f(-1,-1);
+
+ gGL.texCoord2f(tc1.mV[0], tc2.mV[1]);
+ gGL.vertex2f(-1,3);
+
+ gGL.texCoord2f(tc2.mV[0], tc1.mV[1]);
+ gGL.vertex2f(3,-1);
+
+ gGL.end();
+
+ unbindDeferredShader(*shader);
+ mScreen.flush();
+ gGL.setColorMask(true, true);
}
- gGL.begin(LLRender::TRIANGLE_STRIP);
- gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
- gGL.vertex2f(-1,-1);
+ { //combine result based on alpha
+ shader = &gDeferredDoFCombineProgram;
+ bindDeferredShader(*shader);
+ glViewport(0, 0, mDeferredScreen.getWidth(), mDeferredScreen.getHeight());
+ S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mScreen.getUsage());
+ if (channel > -1)
+ {
+ mScreen.bindTexture(0, channel);
+ }
+
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+ gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
+ gGL.vertex2f(-1,-1);
- gGL.texCoord2f(tc1.mV[0], tc2.mV[1]);
- gGL.vertex2f(-1,3);
+ gGL.texCoord2f(tc1.mV[0], tc2.mV[1]);
+ gGL.vertex2f(-1,3);
- gGL.texCoord2f(tc2.mV[0], tc1.mV[1]);
- gGL.vertex2f(3,-1);
+ gGL.texCoord2f(tc2.mV[0], tc1.mV[1]);
+ gGL.vertex2f(3,-1);
- gGL.end();
+ gGL.end();
- unbindDeferredShader(*shader);
+ unbindDeferredShader(*shader);
+ }
}
else
{
--
cgit v1.2.3
From 367d6212ae9e18c398c25fe9e11646bfc801fd90 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Fri, 4 Nov 2011 17:07:40 -0500
Subject: SH-2652 Better DoF combine foo
---
indra/newview/app_settings/settings.xml | 12 ++++++++++++
indra/newview/app_settings/shaders/class1/deferred/cofF.glsl | 3 ++-
.../app_settings/shaders/class1/deferred/dofCombineF.glsl | 5 ++++-
.../app_settings/shaders/class1/deferred/postDeferredF.glsl | 5 +++--
indra/newview/pipeline.cpp | 9 ++++++++-
indra/newview/pipeline.h | 1 +
6 files changed, 30 insertions(+), 5 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index fb73ddf219..d057323e51 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -1392,6 +1392,18 @@
0.5
+ CameraMaxCoF
+
+ Comment
+ Maximum camera circle of confusion for DoF effect
+ Persist
+ 1
+ Type
+ F32
+ Value
+ 10.0
+
+
CameraFNumber
Comment
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl b/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl
index 81f00f7d0f..56fa4e693b 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl
@@ -39,6 +39,7 @@ uniform float focal_distance;
uniform float blur_constant;
uniform float tan_pixel_angle;
uniform float magnification;
+uniform float max_cof;
uniform mat4 inv_proj;
uniform vec2 screen_res;
@@ -78,7 +79,7 @@ void main()
vec4 diff = texture2DRect(diffuseRect, vary_fragcoord.xy);
float sc = calc_cof(depth);
- sc = min(abs(sc), 10.0);
+ sc = min(abs(sc), max_cof);
vec4 bloom = texture2D(bloomMap, vary_fragcoord.xy/screen_res);
gl_FragColor.rgb = diff.rgb + bloom.rgb;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl b/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl
index de0c70cfe9..c639f25fc6 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl
@@ -35,6 +35,8 @@ uniform sampler2DRect lightMap;
uniform mat4 inv_proj;
uniform vec2 screen_res;
+uniform float max_cof;
+
VARYING vec2 vary_fragcoord;
void main()
@@ -45,5 +47,6 @@ void main()
vec4 diff = texture2DRect(lightMap, vary_fragcoord.xy);
- gl_FragColor = mix(diff, dof, diff.a);
+ float a = min(diff.a * max_cof*0.125, 1.0);
+ gl_FragColor = mix(diff, dof, a);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
index 1db638b943..629648ddc3 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
@@ -33,6 +33,7 @@ uniform sampler2DRect diffuseRect;
uniform mat4 inv_proj;
uniform vec2 screen_res;
+uniform float max_cof;
VARYING vec2 vary_fragcoord;
@@ -40,7 +41,7 @@ void dofSample(inout vec4 diff, inout float w, float min_sc, vec2 tc)
{
vec4 s = texture2DRect(diffuseRect, tc);
- float sc = s.a*10.0;
+ float sc = s.a*max_cof;
if (sc > min_sc) //sampled pixel is more "out of focus" than current sample radius
{
@@ -64,7 +65,7 @@ void main()
{
float w = 1.0;
- float sc = diff.a*10.0;
+ float sc = diff.a*max_cof;
float PI = 3.14159265358979323846264;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 8ae7e97f4a..1fff954b96 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -185,6 +185,7 @@ LLVector3 LLPipeline::RenderShadowSplitExponent;
F32 LLPipeline::RenderShadowErrorCutoff;
F32 LLPipeline::RenderShadowFOVCutoff;
BOOL LLPipeline::CameraOffset;
+F32 LLPipeline::CameraMaxCoF;
const F32 BACKLIGHT_DAY_MAGNITUDE_AVATAR = 0.2f;
const F32 BACKLIGHT_NIGHT_MAGNITUDE_AVATAR = 0.1f;
@@ -926,6 +927,7 @@ void LLPipeline::refreshCachedSettings()
RenderShadowErrorCutoff = gSavedSettings.getF32("RenderShadowErrorCutoff");
RenderShadowFOVCutoff = gSavedSettings.getF32("RenderShadowFOVCutoff");
CameraOffset = gSavedSettings.getBOOL("CameraOffset");
+ CameraMaxCoF = gSavedSettings.getF32("CameraMaxCoF");
}
void LLPipeline::releaseGLBuffers()
@@ -6461,7 +6463,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
shader->uniform2f(LLShaderMgr::FXAA_RCP_SCREEN_RES, 1.f/width*scale_x, 1.f/height*scale_y);
shader->uniform4f(LLShaderMgr::FXAA_RCP_FRAME_OPT, -0.5f/width*scale_x, -0.5f/height*scale_y, 0.5f/width*scale_x, 0.5f/height*scale_y);
shader->uniform4f(LLShaderMgr::FXAA_RCP_FRAME_OPT2, -2.f/width*scale_x, -2.f/height*scale_y, 2.f/width*scale_x, 2.f/height*scale_y);
-
+
gGL.begin(LLRender::TRIANGLE_STRIP);
gGL.vertex2f(-1,-1);
gGL.vertex2f(-1,3);
@@ -6620,6 +6622,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
shader->uniform1f(LLShaderMgr::DOF_BLUR_CONSTANT, blur_constant);
shader->uniform1f(LLShaderMgr::DOF_TAN_PIXEL_ANGLE, tanf(1.f/LLDrawable::sCurPixelAngle));
shader->uniform1f(LLShaderMgr::DOF_MAGNIFICATION, magnification);
+ shader->uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF);
gGL.begin(LLRender::TRIANGLE_STRIP);
gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
@@ -6650,6 +6653,8 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
mDeferredLight.bindTexture(0, channel);
}
+ shader->uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF);
+
gGL.begin(LLRender::TRIANGLE_STRIP);
gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
gGL.vertex2f(-1,-1);
@@ -6677,6 +6682,8 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
mScreen.bindTexture(0, channel);
}
+ shader->uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF);
+
gGL.begin(LLRender::TRIANGLE_STRIP);
gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
gGL.vertex2f(-1,-1);
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index d653990977..e607e0aec6 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -845,6 +845,7 @@ public:
static F32 RenderShadowErrorCutoff;
static F32 RenderShadowFOVCutoff;
static BOOL CameraOffset;
+ static F32 CameraMaxCoF;
};
void render_bbox(const LLVector3 &min, const LLVector3 &max);
--
cgit v1.2.3
From 0a43fdd07e3b084ce230086c032ccef79f1df429 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Fri, 4 Nov 2011 17:27:33 -0500
Subject: SH-2652 Even faster DoF -- also fix for screen going black when DoF
enabled but shadows are not.
---
indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl | 4 ++--
indra/newview/pipeline.cpp | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
index 629648ddc3..bf029d1db5 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
@@ -73,7 +73,7 @@ void main()
{
while (sc > 0.5)
{
- int its = int(max(1.0,(sc*3.7)));
+ int its = int(max(1.0,(sc*3.7*0.5)));
for (int i=0; i 0 || ssao)
- { //only need mDeferredLight for shadows OR ssao
+ if (shadow_detail > 0 || ssao || RenderDepthOfField)
+ { //only need mDeferredLight for shadows OR ssao OR dof
if (!mDeferredLight.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE)) return false;
}
else
--
cgit v1.2.3
From dfd6bf6faab6803e91bc4a59de7cc4c9e668c5ec Mon Sep 17 00:00:00 2001
From: eli
Date: Fri, 4 Nov 2011 16:05:13 -0700
Subject: WIP INTL-82 LQA changes for Russian
---
.../skins/default/xui/ru/floater_joystick.xml | 24 +++++++++++-----------
.../skins/default/xui/ru/floater_preferences.xml | 4 ++--
.../default/xui/ru/panel_preferences_advanced.xml | 2 +-
.../default/xui/ru/panel_preferences_alerts.xml | 2 +-
.../default/xui/ru/panel_preferences_chat.xml | 22 ++++++++++----------
.../default/xui/ru/panel_preferences_colors.xml | 4 ++--
.../default/xui/ru/panel_preferences_general.xml | 24 +++++++++++-----------
.../default/xui/ru/panel_preferences_graphics1.xml | 12 +++++------
.../default/xui/ru/panel_preferences_move.xml | 4 ++--
.../default/xui/ru/panel_preferences_privacy.xml | 2 +-
.../default/xui/ru/panel_preferences_setup.xml | 6 +++---
.../default/xui/ru/panel_preferences_sound.xml | 10 ++++-----
.../skins/default/xui/ru/panel_sound_devices.xml | 2 +-
indra/newview/skins/default/xui/ru/strings.xml | 2 +-
14 files changed, 60 insertions(+), 60 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/skins/default/xui/ru/floater_joystick.xml b/indra/newview/skins/default/xui/ru/floater_joystick.xml
index 2390789746..cc93152225 100644
--- a/indra/newview/skins/default/xui/ru/floater_joystick.xml
+++ b/indra/newview/skins/default/xui/ru/floater_joystick.xml
@@ -4,13 +4,13 @@
устройство не выбрано
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -18,7 +18,7 @@
Режимы управления:
-
+
@@ -56,13 +56,13 @@
Невидимая зона по Z
- Невидимая зона уклона
+ Невид. зона уклона
- Невидимая зона сгиба
+ Невид. зона сгиба
- Невидимая зона вращения
+ Невид. зона вращения
Размывка краев
@@ -71,7 +71,7 @@
Масштаб
- Невидимая зона при масштабировании
+ Невид. зона масшт.
diff --git a/indra/newview/skins/default/xui/ru/floater_preferences.xml b/indra/newview/skins/default/xui/ru/floater_preferences.xml
index 31c751250e..fc244b9d8b 100644
--- a/indra/newview/skins/default/xui/ru/floater_preferences.xml
+++ b/indra/newview/skins/default/xui/ru/floater_preferences.xml
@@ -11,7 +11,7 @@
-
-
+
+
diff --git a/indra/newview/skins/default/xui/ru/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/ru/panel_preferences_advanced.xml
index ae6d8bf94d..7d8ee96924 100644
--- a/indra/newview/skins/default/xui/ru/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/ru/panel_preferences_advanced.xml
@@ -17,7 +17,7 @@
- Размер интерфейса:
+ Интерфейс:
diff --git a/indra/newview/skins/default/xui/ru/panel_preferences_alerts.xml b/indra/newview/skins/default/xui/ru/panel_preferences_alerts.xml
index e1135b5ee1..9d7ae546fd 100644
--- a/indra/newview/skins/default/xui/ru/panel_preferences_alerts.xml
+++ b/indra/newview/skins/default/xui/ru/panel_preferences_alerts.xml
@@ -3,7 +3,7 @@
Сообщать мне:
-
+
Всегда показывать:
diff --git a/indra/newview/skins/default/xui/ru/panel_preferences_chat.xml b/indra/newview/skins/default/xui/ru/panel_preferences_chat.xml
index 5e4130667f..fa08c134ad 100644
--- a/indra/newview/skins/default/xui/ru/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/ru/panel_preferences_chat.xml
@@ -4,39 +4,39 @@
Размер шрифта:
-
+
-
+
-
-
+
+
- Показать сообщения в:
+ Показывать сообщения:
(требуется перезапуск)
-
-
+
+
Включить всплывающие сообщения с новыми репликами в чате:
-
-
+
+
- Использовать машинный перевод во время общения (используется Google)
+ Использовать машинный перевод при общении (технология Google)
Переводить чат на:
-
+
diff --git a/indra/newview/skins/default/xui/ru/panel_preferences_colors.xml b/indra/newview/skins/default/xui/ru/panel_preferences_colors.xml
index 17d84e2a39..48c34fcbb2 100644
--- a/indra/newview/skins/default/xui/ru/panel_preferences_colors.xml
+++ b/indra/newview/skins/default/xui/ru/panel_preferences_colors.xml
@@ -35,9 +35,9 @@
Цвет фона тегов имен (также для чата в пузырьках):
-
+
- Прозрачность окон:
+ Непрозрачность окон:
diff --git a/indra/newview/skins/default/xui/ru/panel_preferences_general.xml b/indra/newview/skins/default/xui/ru/panel_preferences_general.xml
index 770c47b3d4..49f743a6ba 100644
--- a/indra/newview/skins/default/xui/ru/panel_preferences_general.xml
+++ b/indra/newview/skins/default/xui/ru/panel_preferences_general.xml
@@ -4,7 +4,7 @@
Язык:
-
+
@@ -22,15 +22,15 @@
(Требуется перезапуск)
- Я хочу видеть содержимое:
+ Показывать контент:
-
-
-
+
+
+
- Начальное место:
+ Место старта:
@@ -38,7 +38,7 @@
- Теги имени:
+ Теги имен:
@@ -46,10 +46,10 @@
-
-
+
+
-
+
Нажатие клавиш с буквами:
@@ -58,9 +58,9 @@
- Включение режима «Отошел» через:
+ Задержка режима «Отошел»:
-
+
diff --git a/indra/newview/skins/default/xui/ru/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/ru/panel_preferences_graphics1.xml
index 867307cc43..a7e826f5fc 100644
--- a/indra/newview/skins/default/xui/ru/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/ru/panel_preferences_graphics1.xml
@@ -42,10 +42,10 @@
- Отражения от воды:
+ Вода отражает:
-
+
@@ -99,16 +99,16 @@
- Детализация ландшафта:
+ Ландшафт:
-
-
+
+
-->
-
+
diff --git a/indra/newview/skins/default/xui/ru/panel_preferences_move.xml b/indra/newview/skins/default/xui/ru/panel_preferences_move.xml
index 8b3542a6d2..878a729113 100644
--- a/indra/newview/skins/default/xui/ru/panel_preferences_move.xml
+++ b/indra/newview/skins/default/xui/ru/panel_preferences_move.xml
@@ -5,8 +5,8 @@
Автоматическая установка позиции для:
-
-
+
+
Клавиатура:
diff --git a/indra/newview/skins/default/xui/ru/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/ru/panel_preferences_privacy.xml
index f3c7e43022..20bb839eed 100644
--- a/indra/newview/skins/default/xui/ru/panel_preferences_privacy.xml
+++ b/indra/newview/skins/default/xui/ru/panel_preferences_privacy.xml
@@ -20,7 +20,7 @@
- Размещение журналов:
+ Папка журналов:
diff --git a/indra/newview/skins/default/xui/ru/panel_preferences_setup.xml b/indra/newview/skins/default/xui/ru/panel_preferences_setup.xml
index 9f23e2f5f7..db88189169 100644
--- a/indra/newview/skins/default/xui/ru/panel_preferences_setup.xml
+++ b/indra/newview/skins/default/xui/ru/panel_preferences_setup.xml
@@ -1,10 +1,10 @@
-
+
Сеть:
- Максимальная ширина канала
+ Макс. ширина канала
Кбит/с
@@ -32,5 +32,5 @@
Настройки прокси-сервера:
-
+
diff --git a/indra/newview/skins/default/xui/ru/panel_preferences_sound.xml b/indra/newview/skins/default/xui/ru/panel_preferences_sound.xml
index 123989966c..bf673750d2 100644
--- a/indra/newview/skins/default/xui/ru/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/ru/panel_preferences_sound.xml
@@ -1,9 +1,9 @@
- Средняя кнопка мыши
+ среднюю кнопку мыши
-
+
Заглушать, когда свернуто
@@ -24,11 +24,11 @@
Настройки голосового чата
- Прослушивание с позиции:
+ Слушать с:
-
-
+
+
diff --git a/indra/newview/skins/default/xui/ru/panel_sound_devices.xml b/indra/newview/skins/default/xui/ru/panel_sound_devices.xml
index 4a57ed4f4f..98dab288a3 100644
--- a/indra/newview/skins/default/xui/ru/panel_sound_devices.xml
+++ b/indra/newview/skins/default/xui/ru/panel_sound_devices.xml
@@ -20,6 +20,6 @@
- Ожидайте
+ Подождите
diff --git a/indra/newview/skins/default/xui/ru/strings.xml b/indra/newview/skins/default/xui/ru/strings.xml
index 0134298166..df657b39c6 100644
--- a/indra/newview/skins/default/xui/ru/strings.xml
+++ b/indra/newview/skins/default/xui/ru/strings.xml
@@ -1940,7 +1940,7 @@ support@secondlife.com.
Новый скрипт
- У жителя, которому вы адресовали сообщение, задан статус «Не беспокоить». Ваше сообщение все равно будет отображено на панели IM для просмотра позже.
+ У адресата вашего сообщения задан статус «Не беспокоить». Ваше сообщение все равно будет отображено на панели IM для просмотра позже.
(по имени)
--
cgit v1.2.3
From a6e40e6e02600cb47299dc9903400720786f72f0 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Mon, 7 Nov 2011 12:34:05 -0600
Subject: SH-2652 Slightly slower DoF (quality), apply FXAA *after* DoF, fix
for some render targets not getting allocated when needed.
---
.../shaders/class1/deferred/dofCombineF.glsl | 2 +-
.../shaders/class1/deferred/postDeferredF.glsl | 4 +-
.../shaders/class1/interface/glowcombineFXAAF.glsl | 7 +-
indra/newview/llviewercontrol.cpp | 2 +
indra/newview/pipeline.cpp | 491 ++++++++++-----------
5 files changed, 248 insertions(+), 258 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl b/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl
index c639f25fc6..d2903b545c 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl
@@ -47,6 +47,6 @@ void main()
vec4 diff = texture2DRect(lightMap, vary_fragcoord.xy);
- float a = min(diff.a * max_cof*0.125, 1.0);
+ float a = min(diff.a * max_cof*0.333, 1.0);
gl_FragColor = mix(diff, dof, a);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
index bf029d1db5..629648ddc3 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
@@ -73,7 +73,7 @@ void main()
{
while (sc > 0.5)
{
- int its = int(max(1.0,(sc*3.7*0.5)));
+ int its = int(max(1.0,(sc*3.7)));
for (int i=0; igetSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("VertexShaderEnable")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2));
gSavedSettings.getControl("RenderUIBuffer")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
+ gSavedSettings.getControl("RenderDepthOfField")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
+ gSavedSettings.getControl("RenderFSAASamples")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
gSavedSettings.getControl("RenderSpecularResX")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
gSavedSettings.getControl("RenderSpecularResY")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
gSavedSettings.getControl("RenderSpecularExponent")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2));
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index d524ddd62d..59e6c3cf07 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -745,8 +745,8 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples)
mFXAABuffer.release();
}
- if (shadow_detail > 0 || ssao || RenderDepthOfField)
- { //only need mDeferredLight for shadows OR ssao OR dof
+ if (shadow_detail > 0 || ssao || RenderDepthOfField || samples > 0)
+ { //only need mDeferredLight for shadows OR ssao OR dof OR fxaa
if (!mDeferredLight.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE)) return false;
}
else
@@ -6416,308 +6416,199 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
multisample = false;
#endif
- if (multisample)
- {
- //bake out texture2D with RGBL for FXAA shader
- mFXAABuffer.bindTarget();
-
- S32 width = mScreen.getWidth();
- S32 height = mScreen.getHeight();
- glViewport(0, 0, width, height);
-
- gGlowCombineFXAAProgram.bind();
- gGlowCombineFXAAProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, width, height);
-
- gGL.getTexUnit(0)->bind(&mGlow[1]);
- gGL.getTexUnit(1)->bind(&mScreen);
-
- gGL.begin(LLRender::TRIANGLE_STRIP);
- gGL.vertex2f(-1,-1);
- gGL.vertex2f(-1,3);
- gGL.vertex2f(3,-1);
- gGL.end();
-
- gGL.flush();
-
- gGlowCombineFXAAProgram.unbind();
- mFXAABuffer.flush();
-
- if (dof_enabled)
- { //if depth of field is not enabled, this is the final pass (draw to window)
- mScreen.bindTarget();
- }
- LLGLSLShader* shader = &gFXAAProgram;
- shader->bind();
-
- S32 channel = shader->enableTexture(LLShaderMgr::DIFFUSE_MAP, mFXAABuffer.getUsage());
- if (channel > -1)
- {
- mFXAABuffer.bindTexture(0, channel);
- gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
- }
-
-
- F32 scale_x = (F32) width/mFXAABuffer.getWidth();
- F32 scale_y = (F32) height/mFXAABuffer.getHeight();
- shader->uniform2f(LLShaderMgr::FXAA_TC_SCALE, scale_x, scale_y);
- shader->uniform2f(LLShaderMgr::FXAA_RCP_SCREEN_RES, 1.f/width*scale_x, 1.f/height*scale_y);
- shader->uniform4f(LLShaderMgr::FXAA_RCP_FRAME_OPT, -0.5f/width*scale_x, -0.5f/height*scale_y, 0.5f/width*scale_x, 0.5f/height*scale_y);
- shader->uniform4f(LLShaderMgr::FXAA_RCP_FRAME_OPT2, -2.f/width*scale_x, -2.f/height*scale_y, 2.f/width*scale_x, 2.f/height*scale_y);
-
- gGL.begin(LLRender::TRIANGLE_STRIP);
- gGL.vertex2f(-1,-1);
- gGL.vertex2f(-1,3);
- gGL.vertex2f(3,-1);
- gGL.end();
-
- gGL.flush();
- if (dof_enabled)
- {
- mScreen.flush();
- }
- shader->unbind();
- }
-
gViewerWindow->setup3DViewport();
- if (dof_enabled || !multisample)
+ if (dof_enabled)
{
LLGLSLShader* shader = &gDeferredPostProgram;
- if (!dof_enabled)
- {
- shader = &gDeferredPostNoDoFProgram;
- }
-
LLGLDisable blend(GL_BLEND);
+ //depth of field focal plane calculations
+ static F32 current_distance = 16.f;
+ static F32 start_distance = 16.f;
+ static F32 transition_time = 1.f;
- if (dof_enabled)
- {
- //depth of field focal plane calculations
-
- static F32 current_distance = 16.f;
- static F32 start_distance = 16.f;
- static F32 transition_time = 1.f;
+ LLVector3 focus_point;
- LLVector3 focus_point;
-
- LLViewerObject* obj = LLViewerMediaFocus::getInstance()->getFocusedObject();
- if (obj && obj->mDrawable && obj->isSelected())
- { //focus on selected media object
- S32 face_idx = LLViewerMediaFocus::getInstance()->getFocusedFace();
- if (obj && obj->mDrawable)
+ LLViewerObject* obj = LLViewerMediaFocus::getInstance()->getFocusedObject();
+ if (obj && obj->mDrawable && obj->isSelected())
+ { //focus on selected media object
+ S32 face_idx = LLViewerMediaFocus::getInstance()->getFocusedFace();
+ if (obj && obj->mDrawable)
+ {
+ LLFace* face = obj->mDrawable->getFace(face_idx);
+ if (face)
{
- LLFace* face = obj->mDrawable->getFace(face_idx);
- if (face)
- {
- focus_point = face->getPositionAgent();
- }
+ focus_point = face->getPositionAgent();
}
}
+ }
- if (focus_point.isExactlyZero())
+ if (focus_point.isExactlyZero())
+ {
+ if (LLViewerJoystick::getInstance()->getOverrideCamera())
+ { //focus on point under cursor
+ focus_point = gDebugRaycastIntersection;
+ }
+ else if (gAgentCamera.cameraMouselook())
+ { //focus on point under mouselook crosshairs
+ gViewerWindow->cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE,
+ NULL,
+ &focus_point);
+ }
+ else
{
- if (LLViewerJoystick::getInstance()->getOverrideCamera())
- { //focus on point under cursor
- focus_point = gDebugRaycastIntersection;
- }
- else if (gAgentCamera.cameraMouselook())
- { //focus on point under mouselook crosshairs
- gViewerWindow->cursorIntersect(-1, -1, 512.f, NULL, -1, FALSE,
- NULL,
- &focus_point);
+ LLViewerObject* obj = gAgentCamera.getFocusObject();
+ if (obj)
+ { //focus on alt-zoom target
+ focus_point = LLVector3(gAgentCamera.getFocusGlobal()-gAgent.getRegion()->getOriginGlobal());
}
else
- {
- LLViewerObject* obj = gAgentCamera.getFocusObject();
- if (obj)
- { //focus on alt-zoom target
- focus_point = LLVector3(gAgentCamera.getFocusGlobal()-gAgent.getRegion()->getOriginGlobal());
- }
- else
- { //focus on your avatar
- focus_point = gAgent.getPositionAgent();
- }
+ { //focus on your avatar
+ focus_point = gAgent.getPositionAgent();
}
}
+ }
- LLVector3 eye = LLViewerCamera::getInstance()->getOrigin();
- F32 target_distance = 16.f;
- if (!focus_point.isExactlyZero())
- {
- target_distance = LLViewerCamera::getInstance()->getAtAxis() * (focus_point-eye);
- }
+ LLVector3 eye = LLViewerCamera::getInstance()->getOrigin();
+ F32 target_distance = 16.f;
+ if (!focus_point.isExactlyZero())
+ {
+ target_distance = LLViewerCamera::getInstance()->getAtAxis() * (focus_point-eye);
+ }
- if (transition_time >= 1.f &&
- fabsf(current_distance-target_distance)/current_distance > 0.01f)
- { //large shift happened, interpolate smoothly to new target distance
- transition_time = 0.f;
- start_distance = current_distance;
- }
- else if (transition_time < 1.f)
- { //currently in a transition, continue interpolating
- transition_time += 1.f/CameraFocusTransitionTime*gFrameIntervalSeconds;
- transition_time = llmin(transition_time, 1.f);
+ if (transition_time >= 1.f &&
+ fabsf(current_distance-target_distance)/current_distance > 0.01f)
+ { //large shift happened, interpolate smoothly to new target distance
+ transition_time = 0.f;
+ start_distance = current_distance;
+ }
+ else if (transition_time < 1.f)
+ { //currently in a transition, continue interpolating
+ transition_time += 1.f/CameraFocusTransitionTime*gFrameIntervalSeconds;
+ transition_time = llmin(transition_time, 1.f);
- F32 t = cosf(transition_time*F_PI+F_PI)*0.5f+0.5f;
- current_distance = start_distance + (target_distance-start_distance)*t;
- }
- else
- { //small or no change, just snap to target distance
- current_distance = target_distance;
- }
+ F32 t = cosf(transition_time*F_PI+F_PI)*0.5f+0.5f;
+ current_distance = start_distance + (target_distance-start_distance)*t;
+ }
+ else
+ { //small or no change, just snap to target distance
+ current_distance = target_distance;
+ }
- //convert to mm
- F32 subject_distance = current_distance*1000.f;
- F32 fnumber = CameraFNumber;
- F32 default_focal_length = CameraFocalLength;
+ //convert to mm
+ F32 subject_distance = current_distance*1000.f;
+ F32 fnumber = CameraFNumber;
+ F32 default_focal_length = CameraFocalLength;
- F32 fov = LLViewerCamera::getInstance()->getView();
+ F32 fov = LLViewerCamera::getInstance()->getView();
- const F32 default_fov = CameraFieldOfView * F_PI/180.f;
- //const F32 default_aspect_ratio = gSavedSettings.getF32("CameraAspectRatio");
+ const F32 default_fov = CameraFieldOfView * F_PI/180.f;
+ //const F32 default_aspect_ratio = gSavedSettings.getF32("CameraAspectRatio");
- //F32 aspect_ratio = (F32) mScreen.getWidth()/(F32)mScreen.getHeight();
+ //F32 aspect_ratio = (F32) mScreen.getWidth()/(F32)mScreen.getHeight();
- F32 dv = 2.f*default_focal_length * tanf(default_fov/2.f);
- //F32 dh = 2.f*default_focal_length * tanf(default_fov*default_aspect_ratio/2.f);
+ F32 dv = 2.f*default_focal_length * tanf(default_fov/2.f);
+ //F32 dh = 2.f*default_focal_length * tanf(default_fov*default_aspect_ratio/2.f);
- F32 focal_length = dv/(2*tanf(fov/2.f));
+ F32 focal_length = dv/(2*tanf(fov/2.f));
- //F32 tan_pixel_angle = tanf(LLDrawable::sCurPixelAngle);
+ //F32 tan_pixel_angle = tanf(LLDrawable::sCurPixelAngle);
- // from wikipedia -- c = |s2-s1|/s2 * f^2/(N(S1-f))
- // where N = fnumber
- // s2 = dot distance
- // s1 = subject distance
- // f = focal length
- //
-
- F32 blur_constant = focal_length*focal_length/(fnumber*(subject_distance-focal_length));
- blur_constant /= 1000.f; //convert to meters for shader
- F32 magnification = focal_length/(subject_distance-focal_length);
-
- { //build diffuse+bloom+CoF
- mDeferredLight.bindTarget();
- shader = &gDeferredCoFProgram;
+ // from wikipedia -- c = |s2-s1|/s2 * f^2/(N(S1-f))
+ // where N = fnumber
+ // s2 = dot distance
+ // s1 = subject distance
+ // f = focal length
+ //
- bindDeferredShader(*shader);
+ F32 blur_constant = focal_length*focal_length/(fnumber*(subject_distance-focal_length));
+ blur_constant /= 1000.f; //convert to meters for shader
+ F32 magnification = focal_length/(subject_distance-focal_length);
- S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mScreen.getUsage());
- if (channel > -1)
- {
- mScreen.bindTexture(0, channel);
- }
+ { //build diffuse+bloom+CoF
+ mDeferredLight.bindTarget();
+ shader = &gDeferredCoFProgram;
- if (multisample)
- { //bloom has already been added, bind black
- channel = shader->enableTexture(LLShaderMgr::DEFERRED_BLOOM);
- if (channel > -1)
- {
- gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sBlackImagep);
- }
- }
-
- shader->uniform1f(LLShaderMgr::DOF_FOCAL_DISTANCE, -subject_distance/1000.f);
- shader->uniform1f(LLShaderMgr::DOF_BLUR_CONSTANT, blur_constant);
- shader->uniform1f(LLShaderMgr::DOF_TAN_PIXEL_ANGLE, tanf(1.f/LLDrawable::sCurPixelAngle));
- shader->uniform1f(LLShaderMgr::DOF_MAGNIFICATION, magnification);
- shader->uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF);
-
- gGL.begin(LLRender::TRIANGLE_STRIP);
- gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
- gGL.vertex2f(-1,-1);
-
- gGL.texCoord2f(tc1.mV[0], tc2.mV[1]);
- gGL.vertex2f(-1,3);
-
- gGL.texCoord2f(tc2.mV[0], tc1.mV[1]);
- gGL.vertex2f(3,-1);
-
- gGL.end();
+ bindDeferredShader(*shader);
- unbindDeferredShader(*shader);
- mDeferredLight.flush();
+ S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mScreen.getUsage());
+ if (channel > -1)
+ {
+ mScreen.bindTexture(0, channel);
}
- { //perform DoF sampling at half-res (preserve alpha channel)
- mScreen.bindTarget();
- glViewport(0,0,mScreen.getWidth()/2, mScreen.getHeight()/2);
- gGL.setColorMask(true, false);
-
- shader = &gDeferredPostProgram;
- bindDeferredShader(*shader);
- S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mDeferredLight.getUsage());
- if (channel > -1)
- {
- mDeferredLight.bindTexture(0, channel);
- }
-
- shader->uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF);
+ shader->uniform1f(LLShaderMgr::DOF_FOCAL_DISTANCE, -subject_distance/1000.f);
+ shader->uniform1f(LLShaderMgr::DOF_BLUR_CONSTANT, blur_constant);
+ shader->uniform1f(LLShaderMgr::DOF_TAN_PIXEL_ANGLE, tanf(1.f/LLDrawable::sCurPixelAngle));
+ shader->uniform1f(LLShaderMgr::DOF_MAGNIFICATION, magnification);
+ shader->uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF);
- gGL.begin(LLRender::TRIANGLE_STRIP);
- gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
- gGL.vertex2f(-1,-1);
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+ gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
+ gGL.vertex2f(-1,-1);
- gGL.texCoord2f(tc1.mV[0], tc2.mV[1]);
- gGL.vertex2f(-1,3);
+ gGL.texCoord2f(tc1.mV[0], tc2.mV[1]);
+ gGL.vertex2f(-1,3);
- gGL.texCoord2f(tc2.mV[0], tc1.mV[1]);
- gGL.vertex2f(3,-1);
+ gGL.texCoord2f(tc2.mV[0], tc1.mV[1]);
+ gGL.vertex2f(3,-1);
- gGL.end();
+ gGL.end();
- unbindDeferredShader(*shader);
- mScreen.flush();
- gGL.setColorMask(true, true);
- }
+ unbindDeferredShader(*shader);
+ mDeferredLight.flush();
+ }
- { //combine result based on alpha
- shader = &gDeferredDoFCombineProgram;
- bindDeferredShader(*shader);
- glViewport(0, 0, mDeferredScreen.getWidth(), mDeferredScreen.getHeight());
- S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mScreen.getUsage());
- if (channel > -1)
- {
- mScreen.bindTexture(0, channel);
- }
+ { //perform DoF sampling at half-res (preserve alpha channel)
+ mScreen.bindTarget();
+ glViewport(0,0,mScreen.getWidth()/2, mScreen.getHeight()/2);
+ gGL.setColorMask(true, false);
+
+ shader = &gDeferredPostProgram;
+ bindDeferredShader(*shader);
+ S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mDeferredLight.getUsage());
+ if (channel > -1)
+ {
+ mDeferredLight.bindTexture(0, channel);
+ }
- shader->uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF);
+ shader->uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF);
- gGL.begin(LLRender::TRIANGLE_STRIP);
- gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
- gGL.vertex2f(-1,-1);
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+ gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
+ gGL.vertex2f(-1,-1);
- gGL.texCoord2f(tc1.mV[0], tc2.mV[1]);
- gGL.vertex2f(-1,3);
+ gGL.texCoord2f(tc1.mV[0], tc2.mV[1]);
+ gGL.vertex2f(-1,3);
- gGL.texCoord2f(tc2.mV[0], tc1.mV[1]);
- gGL.vertex2f(3,-1);
+ gGL.texCoord2f(tc2.mV[0], tc1.mV[1]);
+ gGL.vertex2f(3,-1);
- gGL.end();
+ gGL.end();
- unbindDeferredShader(*shader);
- }
+ unbindDeferredShader(*shader);
+ mScreen.flush();
+ gGL.setColorMask(true, true);
}
- else
- {
- bindDeferredShader(*shader);
+
+ { //combine result based on alpha
+ if (multisample)
+ {
+ mDeferredLight.bindTarget();
+ }
+ shader = &gDeferredDoFCombineProgram;
+ bindDeferredShader(*shader);
+ glViewport(0, 0, mDeferredScreen.getWidth(), mDeferredScreen.getHeight());
S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mScreen.getUsage());
if (channel > -1)
{
mScreen.bindTexture(0, channel);
}
- if (multisample)
- { //bloom has already been added, bind black
- channel = shader->enableTexture(LLShaderMgr::DEFERRED_BLOOM);
- if (channel > -1)
- {
- gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sBlackImagep);
- }
- }
-
+ shader->uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF);
+
gGL.begin(LLRender::TRIANGLE_STRIP);
gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
gGL.vertex2f(-1,-1);
@@ -6731,7 +6622,107 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
gGL.end();
unbindDeferredShader(*shader);
+
+ if (multisample)
+ {
+ mDeferredLight.flush();
+ }
+ }
+ }
+ else
+ {
+ if (multisample)
+ {
+ mDeferredLight.bindTarget();
}
+ LLGLSLShader* shader = &gDeferredPostNoDoFProgram;
+
+ bindDeferredShader(*shader);
+
+ S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mScreen.getUsage());
+ if (channel > -1)
+ {
+ mScreen.bindTexture(0, channel);
+ }
+
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+ gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
+ gGL.vertex2f(-1,-1);
+
+ gGL.texCoord2f(tc1.mV[0], tc2.mV[1]);
+ gGL.vertex2f(-1,3);
+
+ gGL.texCoord2f(tc2.mV[0], tc1.mV[1]);
+ gGL.vertex2f(3,-1);
+
+ gGL.end();
+
+ unbindDeferredShader(*shader);
+
+ if (multisample)
+ {
+ mDeferredLight.flush();
+ }
+ }
+
+ if (multisample)
+ {
+ //bake out texture2D with RGBL for FXAA shader
+ mFXAABuffer.bindTarget();
+
+ S32 width = mScreen.getWidth();
+ S32 height = mScreen.getHeight();
+ glViewport(0, 0, width, height);
+
+ LLGLSLShader* shader = &gGlowCombineFXAAProgram;
+
+ shader->bind();
+ shader->uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, width, height);
+
+ S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mDeferredLight.getUsage());
+ if (channel > -1)
+ {
+ mDeferredLight.bindTexture(0, channel);
+ }
+
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+ gGL.vertex2f(-1,-1);
+ gGL.vertex2f(-1,3);
+ gGL.vertex2f(3,-1);
+ gGL.end();
+
+ gGL.flush();
+
+ shader->disableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mDeferredLight.getUsage());
+ shader->unbind();
+
+ mFXAABuffer.flush();
+
+ shader = &gFXAAProgram;
+ shader->bind();
+
+ channel = shader->enableTexture(LLShaderMgr::DIFFUSE_MAP, mFXAABuffer.getUsage());
+ if (channel > -1)
+ {
+ mFXAABuffer.bindTexture(0, channel);
+ gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
+ }
+
+ F32 scale_x = (F32) width/mFXAABuffer.getWidth();
+ F32 scale_y = (F32) height/mFXAABuffer.getHeight();
+ shader->uniform2f(LLShaderMgr::FXAA_TC_SCALE, scale_x, scale_y);
+ shader->uniform2f(LLShaderMgr::FXAA_RCP_SCREEN_RES, 1.f/width*scale_x, 1.f/height*scale_y);
+ shader->uniform4f(LLShaderMgr::FXAA_RCP_FRAME_OPT, -0.5f/width*scale_x, -0.5f/height*scale_y, 0.5f/width*scale_x, 0.5f/height*scale_y);
+ shader->uniform4f(LLShaderMgr::FXAA_RCP_FRAME_OPT2, -2.f/width*scale_x, -2.f/height*scale_y, 2.f/width*scale_x, 2.f/height*scale_y);
+
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+ gGL.vertex2f(-1,-1);
+ gGL.vertex2f(-1,3);
+ gGL.vertex2f(3,-1);
+ gGL.end();
+
+ gGL.flush();
+ shader->unbind();
}
}
else
--
cgit v1.2.3
From 8c8edbbaeb68d82e1653e92dd7940ba0439777f2 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Mon, 7 Nov 2011 13:04:30 -0600
Subject: SH-2546 Fix for black water under terrain (use vec3 instead of float
for vary_AtmosAttenuation
---
.../shaders/class1/windlight/atmosphericsVarsWaterV.glsl | 2 --
.../shaders/class2/windlight/atmosphericsVarsWaterF.glsl | 5 ++---
.../shaders/class2/windlight/atmosphericsVarsWaterV.glsl | 4 ++--
3 files changed, 4 insertions(+), 7 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterV.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterV.glsl
index ef34c5c853..8afcc20f6d 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterV.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsVarsWaterV.glsl
@@ -25,7 +25,6 @@
VARYING vec3 vary_PositionEye;
-VARYING float fog_depth;
vec3 getPositionEye()
{
@@ -35,5 +34,4 @@ vec3 getPositionEye()
void setPositionEye(vec3 v)
{
vary_PositionEye = v;
- fog_depth = v.z;
}
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsWaterF.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsWaterF.glsl
index 23046f990d..163ef26444 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsWaterF.glsl
@@ -24,9 +24,8 @@
*/
VARYING vec3 vary_PositionEye;
-VARYING vec3 vary_SunlitColor;
VARYING vec3 vary_AdditiveColor;
-VARYING float vary_AtmosAttenuation;
+VARYING vec3 vary_AtmosAttenuation;
vec3 getSunlitColor()
{
@@ -42,7 +41,7 @@ vec3 getAdditiveColor()
}
vec3 getAtmosAttenuation()
{
- return vec3(vary_AtmosAttenuation);
+ return vary_AtmosAttenuation;
}
vec3 getPositionEye()
{
diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsWaterV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsWaterV.glsl
index 279c4dd981..553f6752e6 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsWaterV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsVarsWaterV.glsl
@@ -25,7 +25,7 @@
VARYING vec3 vary_PositionEye;
VARYING vec3 vary_AdditiveColor;
-VARYING float vary_AtmosAttenuation;
+VARYING vec3 vary_AtmosAttenuation;
vec3 atmos_attenuation;
vec3 sunlit_color;
@@ -77,5 +77,5 @@ void setAdditiveColor(vec3 v)
void setAtmosAttenuation(vec3 v)
{
atmos_attenuation = v;
- vary_AtmosAttenuation = v.r;
+ vary_AtmosAttenuation = v;
}
--
cgit v1.2.3
From 92909dae8011400c50f89d88d712398f03d6db0a Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Mon, 7 Nov 2011 15:39:32 -0600
Subject: SH-2652 For for screen going white when enabling anti-aliasing.
---
indra/newview/pipeline.cpp | 1 +
1 file changed, 1 insertion(+)
(limited to 'indra/newview')
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 59e6c3cf07..171bd2fa71 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -656,6 +656,7 @@ void LLPipeline::allocatePhysicsBuffer()
void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
{
+ refreshCachedSettings();
U32 samples = gGLManager.getNumFBOFSAASamples(RenderFSAASamples);
//try to allocate screen buffers at requested resolution and samples
--
cgit v1.2.3
From 1bd09e2e42fbde3f00be2577b719bd172b4c9496 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Mon, 7 Nov 2011 16:46:58 -0600
Subject: SH-2634 Fix for land overlay not showing colors
---
indra/newview/app_settings/shaders/class1/interface/highlightF.glsl | 4 ++--
indra/newview/lldrawpoolterrain.cpp | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl b/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl
index ecbc30f05f..574adeb50c 100644
--- a/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl
@@ -27,12 +27,12 @@
out vec4 gl_FragColor;
#endif
-uniform vec4 color;
+uniform vec4 highlight_color;
uniform sampler2D diffuseMap;
VARYING vec2 vary_texcoord0;
void main()
{
- gl_FragColor = color*texture2D(diffuseMap, vary_texcoord0.xy);
+ gl_FragColor = highlight_color*texture2D(diffuseMap, vary_texcoord0.xy);
}
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index 3e9d30283a..addb18a1d5 100644
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -244,8 +244,9 @@ void LLDrawPoolTerrain::render(S32 pass)
{ //use fullbright shader for highlighting
LLGLSLShader* old_shader = sShader;
sShader->unbind();
- sShader = &gObjectFullbrightNonIndexedProgram;
+ sShader = &gHighlightProgram;
sShader->bind();
+ sShader->uniform4f(LLShaderMgr::HIGHLIGHT_COLOR, 1,1,1,1);
LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL);
glPolygonOffset(-1.0f, -1.0f);
renderOwnership();
--
cgit v1.2.3
From 428b74f14bd3763a6209d6a2132a8d7977958902 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 8 Nov 2011 13:11:29 -0600
Subject: SH-2652 Fix for black bands in high-res normal maps (break normal map
generation up into tiles to handle the case where a normal map is higher
resolution than the current window)
---
indra/newview/lldrawpoolbump.cpp | 60 ++++++++++++++++++++++++++++++++--------
1 file changed, 48 insertions(+), 12 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 7b9fb2b34b..b696b90d84 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -1363,6 +1363,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
{
LLFastTimer t(FTM_BUMP_SOURCE_GEN_NORMAL);
gPipeline.mScreen.bindTarget();
+
LLGLDepthTest depth(GL_FALSE);
LLGLDisable cull(GL_CULL_FACE);
LLGLDisable blend(GL_BLEND);
@@ -1377,22 +1378,57 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
gGL.getTexUnit(0)->bind(bump);
- gGL.begin(LLRender::TRIANGLE_STRIP);
+ S32 width = bump->getWidth();
+ S32 height = bump->getHeight();
+
+ S32 screen_width = gPipeline.mScreen.getWidth();
+ S32 screen_height = gPipeline.mScreen.getHeight();
+
+ glViewport(0, 0, screen_width, screen_height);
+
+ for (S32 left = 0; left < width; left += screen_width)
+ {
+ S32 right = left + screen_width;
+ right = llmin(right, width);
+
+ F32 left_tc = (F32) left/ width;
+ F32 right_tc = (F32) right/width;
+
+ for (S32 bottom = 0; bottom < height; bottom += screen_height)
+ {
+ S32 top = bottom+screen_height;
+ top = llmin(top, height);
+
+ F32 bottom_tc = (F32) bottom/height;
+ F32 top_tc = (F32)(bottom+screen_height)/height;
+ top_tc = llmin(top_tc, 1.f);
- gGL.texCoord2f(0, 0);
- gGL.vertex2f(0, 0);
- gGL.texCoord2f(0, 1);
- gGL.vertex2f(0, v.mV[1]);
- gGL.texCoord2f(1, 0);
- gGL.vertex2f(v.mV[0], 0);
- gGL.texCoord2f(1, 1);
- gGL.vertex2f(v.mV[0], v.mV[1]);
+ F32 screen_right = (F32) (right-left)/screen_width;
+ F32 screen_top = (F32) (top-bottom)/screen_height;
- gGL.end();
+ gGL.begin(LLRender::TRIANGLE_STRIP);
+ gGL.texCoord2f(left_tc, bottom_tc);
+ gGL.vertex2f(0, 0);
- gGL.flush();
+ gGL.texCoord2f(left_tc, top_tc);
+ gGL.vertex2f(0, screen_top);
- glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, bump->getWidth(), bump->getHeight());
+ gGL.texCoord2f(right_tc, bottom_tc);
+ gGL.vertex2f(screen_right, 0);
+
+ gGL.texCoord2f(right_tc, top_tc);
+ gGL.vertex2f(screen_right, screen_top);
+
+ gGL.end();
+
+ gGL.flush();
+
+ S32 w = right-left;
+ S32 h = top-bottom;
+
+ glCopyTexSubImage2D(GL_TEXTURE_2D, 0, left, bottom, 0, 0, w, h);
+ }
+ }
glGenerateMipmap(GL_TEXTURE_2D);
--
cgit v1.2.3
From da092a06cf42902de4f5a042fd0b314b34e4392d Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 8 Nov 2011 14:37:50 -0600
Subject: SH-2608 Fix for debug beacons not rendering properly.
---
indra/newview/pipeline.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
(limited to 'indra/newview')
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 171bd2fa71..49f83fdb0d 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -4250,8 +4250,16 @@ void LLPipeline::renderDebug()
bool hud_only = hasRenderType(LLPipeline::RENDER_TYPE_HUD);
+
if (!hud_only && !mDebugBlips.empty())
{ //render debug blips
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.bind();
+ }
+
+ gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sWhiteImagep, true);
+
glPointSize(8.f);
LLGLDepthTest depth(GL_TRUE, GL_TRUE, GL_ALWAYS);
--
cgit v1.2.3
From ef8bdb5d95ebd869279ee4bb0510d54e51ab747f Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 8 Nov 2011 15:15:58 -0600
Subject: SH-2507 Fix for crash when rendering axes (develop->render->show
axes)
---
indra/newview/llviewerdisplay.cpp | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 86102e9a15..3f0b5bf3fb 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -1341,12 +1341,6 @@ void render_ui_3d()
// Debugging stuff goes before the UI.
- // Coordinate axes
- if (gSavedSettings.getBOOL("ShowAxes"))
- {
- draw_axes();
- }
-
stop_glerror();
if (LLGLSLShader::sNoFixedFunction)
@@ -1354,6 +1348,12 @@ void render_ui_3d()
gUIProgram.bind();
}
+ // Coordinate axes
+ if (gSavedSettings.getBOOL("ShowAxes"))
+ {
+ draw_axes();
+ }
+
gViewerWindow->renderSelections(FALSE, FALSE, TRUE); // Non HUD call in render_hud_elements
stop_glerror();
}
--
cgit v1.2.3
From db7924681d629f48f939e7d4cc55d588aa93c344 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 8 Nov 2011 17:46:43 -0600
Subject: SH-24114 Remove unused vectorization code (outdated/unused with SSE2
requirement and llvetor4a et al)
---
indra/newview/CMakeLists.txt | 17 ---
indra/newview/app_settings/settings.xml | 44 --------
indra/newview/llappviewer.cpp | 38 -------
indra/newview/llviewercontrol.cpp | 10 --
indra/newview/llviewerjointmesh.cpp | 171 +------------------------------
indra/newview/llviewerjointmesh.h | 19 +---
indra/newview/llviewerjointmesh_sse.cpp | 114 ---------------------
indra/newview/llviewerjointmesh_sse2.cpp | 121 ----------------------
indra/newview/llviewerjointmesh_vec.cpp | 97 ------------------
indra/newview/llviewermenu.cpp | 21 ----
10 files changed, 6 insertions(+), 646 deletions(-)
delete mode 100644 indra/newview/llviewerjointmesh_sse.cpp
delete mode 100644 indra/newview/llviewerjointmesh_sse2.cpp
delete mode 100644 indra/newview/llviewerjointmesh_vec.cpp
(limited to 'indra/newview')
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index fa74804314..0467a93dfe 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -540,9 +540,6 @@ set(viewer_SOURCE_FILES
llviewerjoint.cpp
llviewerjointattachment.cpp
llviewerjointmesh.cpp
- llviewerjointmesh_sse.cpp
- llviewerjointmesh_sse2.cpp
- llviewerjointmesh_vec.cpp
llviewerjoystick.cpp
llviewerkeyboard.cpp
llviewerlayer.cpp
@@ -624,20 +621,6 @@ set(viewer_SOURCE_FILES
set(VIEWER_BINARY_NAME "secondlife-bin" CACHE STRING
"The name of the viewer executable to create.")
-if (LINUX)
- # We can't set these flags for Darwin, because they get passed to
- # the PPC compiler. Ugh.
-
- set_source_files_properties(
- llviewerjointmesh_sse.cpp
- PROPERTIES COMPILE_FLAGS "-msse -mfpmath=sse"
- )
- set_source_files_properties(
- llviewerjointmesh_sse2.cpp
- PROPERTIES COMPILE_FLAGS "-msse2 -mfpmath=sse"
- )
-endif (LINUX)
-
set(viewer_HEADER_FILES
CMakeLists.txt
ViewerInstall.cmake
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index d057323e51..d07efa6a37 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -12202,50 +12202,6 @@
Value
1
- VectorizeEnable
-
- Comment
- Enable general vector operations and data alignment.
- Persist
- 1
- Type
- Boolean
- Value
- 0
-
- VectorizePerfTest
-
- Comment
- Test SSE/vectorization performance and choose fastest version.
- Persist
- 1
- Type
- Boolean
- Value
- 1
-
- VectorizeProcessor
-
- Comment
- 0=Compiler Default, 1=SSE, 2=SSE2, autodetected
- Persist
- 0
- Type
- U32
- Value
- 0
-
- VectorizeSkin
-
- Comment
- Enable vector operations for avatar skinning.
- Persist
- 1
- Type
- Boolean
- Value
- 1
-
VelocityInterpolate
Comment
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index dfb677dc2c..bab99e8a54 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -558,42 +558,6 @@ static void settings_modify()
gDebugGL = gSavedSettings.getBOOL("RenderDebugGL") || gDebugSession;
gDebugPipeline = gSavedSettings.getBOOL("RenderDebugPipeline");
gAuditTexture = gSavedSettings.getBOOL("AuditTexture");
-#if LL_VECTORIZE
- if (gSysCPU.hasAltivec())
- {
- gSavedSettings.setBOOL("VectorizeEnable", TRUE );
- gSavedSettings.setU32("VectorizeProcessor", 0 );
- }
- else
- if (gSysCPU.hasSSE2())
- {
- gSavedSettings.setBOOL("VectorizeEnable", TRUE );
- gSavedSettings.setU32("VectorizeProcessor", 2 );
- }
- else
- if (gSysCPU.hasSSE())
- {
- gSavedSettings.setBOOL("VectorizeEnable", TRUE );
- gSavedSettings.setU32("VectorizeProcessor", 1 );
- }
- else
- {
- // Don't bother testing or running if CPU doesn't support it. JC
- gSavedSettings.setBOOL("VectorizePerfTest", FALSE );
- gSavedSettings.setBOOL("VectorizeEnable", FALSE );
- gSavedSettings.setU32("VectorizeProcessor", 0 );
- gSavedSettings.setBOOL("VectorizeSkin", FALSE);
- }
-#else
- // This build target doesn't support SSE, don't test/run.
- gSavedSettings.setBOOL("VectorizePerfTest", FALSE );
- gSavedSettings.setBOOL("VectorizeEnable", FALSE );
- gSavedSettings.setU32("VectorizeProcessor", 0 );
- gSavedSettings.setBOOL("VectorizeSkin", FALSE);
-
- // disable fullscreen mode, unsupported
- //gSavedSettings.setBOOL("WindowFullScreen", FALSE);
-#endif
}
class LLFastTimerLogThread : public LLThread
@@ -877,8 +841,6 @@ bool LLAppViewer::init()
LLAgent::parseTeleportMessages("teleport_strings.xml");
- LLViewerJointMesh::updateVectorize();
-
// load MIME type -> media impl mappings
std::string mime_types_name;
#if LL_DARWIN
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 03d765eaee..73e4d11d7b 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -452,12 +452,6 @@ bool handleEffectColorChanged(const LLSD& newvalue)
return true;
}
-bool handleVectorizeChanged(const LLSD& newvalue)
-{
- LLViewerJointMesh::updateVectorize();
- return true;
-}
-
bool handleHighResSnapshotChanged(const LLSD& newvalue)
{
// High Res Snapshot active, must uncheck RenderUIInSnapshot
@@ -692,10 +686,6 @@ void settings_setup_listeners()
gSavedSettings.getControl("UserLogFile")->getSignal()->connect(boost::bind(&handleLogFileChanged, _2));
gSavedSettings.getControl("RenderHideGroupTitle")->getSignal()->connect(boost::bind(handleHideGroupTitleChanged, _2));
gSavedSettings.getControl("HighResSnapshot")->getSignal()->connect(boost::bind(handleHighResSnapshotChanged, _2));
- gSavedSettings.getControl("VectorizePerfTest")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _2));
- gSavedSettings.getControl("VectorizeEnable")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _2));
- gSavedSettings.getControl("VectorizeProcessor")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _2));
- gSavedSettings.getControl("VectorizeSkin")->getSignal()->connect(boost::bind(&handleVectorizeChanged, _2));
gSavedSettings.getControl("EnableVoiceChat")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _2));
gSavedSettings.getControl("PTTCurrentlyEnabled")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _2));
gSavedSettings.getControl("PushToTalkButton")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _2));
diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp
index 3e20abecb7..b18323bed0 100644
--- a/indra/newview/llviewerjointmesh.cpp
+++ b/indra/newview/llviewerjointmesh.cpp
@@ -766,7 +766,7 @@ BOOL LLViewerJointMesh::updateLOD(F32 pixel_area, BOOL activate)
}
// static
-void LLViewerJointMesh::updateGeometryOriginal(LLFace *mFace, LLPolyMesh *mMesh)
+void LLViewerJointMesh::updateGeometry(LLFace *mFace, LLPolyMesh *mMesh)
{
LLStrider o_vertices;
LLStrider o_normals;
@@ -832,50 +832,6 @@ static F64 sUpdateGeometryRunAvgOn[10];
static U32 sUpdateGeometryRunCount = 0 ;
static U32 sUpdateGeometryCalls = 0 ;
static U32 sUpdateGeometryLastProcessor = 0 ;
-static BOOL sVectorizePerfTest = FALSE;
-static U32 sVectorizeProcessor = 0;
-
-//static
-void (*LLViewerJointMesh::sUpdateGeometryFunc)(LLFace* face, LLPolyMesh* mesh);
-
-//static
-void LLViewerJointMesh::updateVectorize()
-{
- sVectorizePerfTest = gSavedSettings.getBOOL("VectorizePerfTest");
- sVectorizeProcessor = gSavedSettings.getU32("VectorizeProcessor");
- BOOL vectorizeEnable = gSavedSettings.getBOOL("VectorizeEnable");
- BOOL vectorizeSkin = gSavedSettings.getBOOL("VectorizeSkin");
-
- std::string vp;
- switch(sVectorizeProcessor)
- {
- case 2: vp = "SSE2"; break; // *TODO: replace the magic #s
- case 1: vp = "SSE"; break;
- default: vp = "COMPILER DEFAULT"; break;
- }
- LL_INFOS("AppInit") << "Vectorization : " << ( vectorizeEnable ? "ENABLED" : "DISABLED" ) << LL_ENDL ;
- LL_INFOS("AppInit") << "Vector Processor : " << vp << LL_ENDL ;
- LL_INFOS("AppInit") << "Vectorized Skinning : " << ( vectorizeSkin ? "ENABLED" : "DISABLED" ) << LL_ENDL ;
- if(vectorizeEnable && vectorizeSkin)
- {
- switch(sVectorizeProcessor)
- {
- case 2:
- sUpdateGeometryFunc = &updateGeometrySSE2;
- break;
- case 1:
- sUpdateGeometryFunc = &updateGeometrySSE;
- break;
- default:
- sUpdateGeometryFunc = &updateGeometryVectorized;
- break;
- }
- }
- else
- {
- sUpdateGeometryFunc = &updateGeometryOriginal;
- }
-}
void LLViewerJointMesh::updateJointGeometry()
{
@@ -889,129 +845,8 @@ void LLViewerJointMesh::updateJointGeometry()
return;
}
- if (!sVectorizePerfTest)
- {
- // Once we've measured performance, just run the specified
- // code version.
- if(sUpdateGeometryFunc == updateGeometryOriginal)
- uploadJointMatrices();
- sUpdateGeometryFunc(mFace, mMesh);
- }
- else
- {
- // At startup, measure the amount of time in skinning and choose
- // the fastest one.
- LLTimer ug_timer ;
-
- if (sUpdateGeometryCallPointer)
- {
- if(sUpdateGeometryFunc == updateGeometryOriginal)
- uploadJointMatrices();
- // call accelerated version for this processor
- sUpdateGeometryFunc(mFace, mMesh);
- }
- else
- {
- uploadJointMatrices();
- updateGeometryOriginal(mFace, mMesh);
- }
-
- sUpdateGeometryElapsedTime += ug_timer.getElapsedTimeF64();
- ++sUpdateGeometryCalls;
- if(0 != (sUpdateGeometryCalls & UPDATE_GEOMETRY_CALL_OVERFLOW))
- {
- F64 time_since_app_start = ug_timer.getElapsedSeconds();
- if(sUpdateGeometryGlobalTime == 0.0
- || sUpdateGeometryLastProcessor != sVectorizeProcessor)
- {
- sUpdateGeometryGlobalTime = time_since_app_start;
- sUpdateGeometryElapsedTime = 0;
- sUpdateGeometryCalls = 0;
- sUpdateGeometryRunCount = 0;
- sUpdateGeometryLastProcessor = sVectorizeProcessor;
- sUpdateGeometryCallPointer = false;
- return;
- }
- F64 percent_time_in_function =
- ( sUpdateGeometryElapsedTime * 100.0 ) / ( time_since_app_start - sUpdateGeometryGlobalTime ) ;
- sUpdateGeometryGlobalTime = time_since_app_start;
- if (!sUpdateGeometryCallPointer)
- {
- // First set of run data is with vectorization off.
- sUpdateGeometryCallPointer = true;
- llinfos << "profile (avg of " << sUpdateGeometryCalls << " samples) = "
- << "vectorize off " << percent_time_in_function
- << "% of time with "
- << (sUpdateGeometryElapsedTime / (F64)sUpdateGeometryCalls)
- << " seconds per call "
- << llendl;
- sUpdateGeometryRunAvgOff[sUpdateGeometryRunCount] = percent_time_in_function;
- sUpdateGeometryElapsedTimeOff += sUpdateGeometryElapsedTime;
- sUpdateGeometryCalls = 0;
- }
- else
- {
- // Second set of run data is with vectorization on.
- sUpdateGeometryCallPointer = false;
- llinfos << "profile (avg of " << sUpdateGeometryCalls << " samples) = "
- << "VEC on " << percent_time_in_function
- << "% of time with "
- << (sUpdateGeometryElapsedTime / (F64)sUpdateGeometryCalls)
- << " seconds per call "
- << llendl;
- sUpdateGeometryRunAvgOn[sUpdateGeometryRunCount] = percent_time_in_function ;
- sUpdateGeometryElapsedTimeOn += sUpdateGeometryElapsedTime;
-
- sUpdateGeometryCalls = 0;
- sUpdateGeometryRunCount++;
- F64 a = 0.0, b = 0.0;
- for(U32 i = 0; i 0.0)
- {
- llinfos << "Vectorization improves avatar skinning performance, "
- << "keeping on for future runs."
- << llendl;
- gSavedSettings.setBOOL("VectorizeSkin", TRUE);
- }
- else
- {
- // SIMD decreases performance, fall back to original code
- llinfos << "Vectorization decreases avatar skinning performance, "
- << "switching back to original code."
- << llendl;
-
- gSavedSettings.setBOOL("VectorizeSkin", FALSE);
- }
- }
- }
- sUpdateGeometryElapsedTime = 0.0f;
- }
- }
+ uploadJointMatrices();
+ updateGeometry(mFace, mMesh);
}
void LLViewerJointMesh::dump()
diff --git a/indra/newview/llviewerjointmesh.h b/indra/newview/llviewerjointmesh.h
index cab1205d61..0191f0cae8 100644
--- a/indra/newview/llviewerjointmesh.h
+++ b/indra/newview/llviewerjointmesh.h
@@ -143,23 +143,10 @@ public:
/*virtual*/ BOOL isAnimatable() const { return FALSE; }
- static void updateVectorize(); // Update globals when settings variables change
-
private:
- // Avatar vertex skinning is a significant performance issue on computers
- // with avatar vertex programs turned off (for example, most Macs). We
- // therefore have custom versions that use SIMD instructions.
- //
- // These functions require compiler options for SSE2, SSE, or neither, and
- // hence are contained in separate individual .cpp files. JC
- static void updateGeometryOriginal(LLFace* face, LLPolyMesh* mesh);
- // generic vector code, used for Altivec
- static void updateGeometryVectorized(LLFace* face, LLPolyMesh* mesh);
- static void updateGeometrySSE(LLFace* face, LLPolyMesh* mesh);
- static void updateGeometrySSE2(LLFace* face, LLPolyMesh* mesh);
-
- // Use a fuction pointer to indicate which version we are running.
- static void (*sUpdateGeometryFunc)(LLFace* face, LLPolyMesh* mesh);
+
+ //copy mesh into given face's vertex buffer, applying current animation pose
+ static void updateGeometry(LLFace* face, LLPolyMesh* mesh);
private:
// Allocate skin data
diff --git a/indra/newview/llviewerjointmesh_sse.cpp b/indra/newview/llviewerjointmesh_sse.cpp
deleted file mode 100644
index 00ed47e091..0000000000
--- a/indra/newview/llviewerjointmesh_sse.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-/**
- * @file llviewerjointmesh_sse.cpp
- * @brief SSE vectorized joint skinning code, only used when video card does
- * not support avatar vertex programs.
- *
- * *NOTE: Disabled on Windows builds. See llv4math.h for details.
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-//-----------------------------------------------------------------------------
-// Header Files
-//-----------------------------------------------------------------------------
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llviewerjointmesh.h"
-
-// project includes
-#include "llface.h"
-#include "llpolymesh.h"
-
-// library includes
-#include "lldarray.h"
-#include "llv4math.h" // for LL_VECTORIZE
-#include "llv4matrix3.h"
-#include "llv4matrix4.h"
-#include "v3math.h"
-
-
-#if LL_VECTORIZE
-
-inline void matrix_translate(LLV4Matrix4& m, const LLMatrix4* w, const LLVector3& j)
-{
- m.mV[VX] = _mm_loadu_ps(w->mMatrix[VX]);
- m.mV[VY] = _mm_loadu_ps(w->mMatrix[VY]);
- m.mV[VZ] = _mm_loadu_ps(w->mMatrix[VZ]);
- m.mV[VW] = _mm_loadu_ps(w->mMatrix[VW]);
- m.mV[VW] = _mm_add_ps(m.mV[VW], _mm_mul_ps(_mm_set1_ps(j.mV[VX]), m.mV[VX])); // ( ax * vx ) + vw
- m.mV[VW] = _mm_add_ps(m.mV[VW], _mm_mul_ps(_mm_set1_ps(j.mV[VY]), m.mV[VY]));
- m.mV[VW] = _mm_add_ps(m.mV[VW], _mm_mul_ps(_mm_set1_ps(j.mV[VZ]), m.mV[VZ]));
-}
-
-// static
-void LLViewerJointMesh::updateGeometrySSE(LLFace *face, LLPolyMesh *mesh)
-{
- // This cannot be a file-level static because it will be initialized
- // before main() using SSE code, which will crash on non-SSE processors.
- static LLV4Matrix4 sJointMat[32];
- LLDynamicArray& joint_data = mesh->getReferenceMesh()->mJointRenderData;
-
- //upload joint pivots/matrices
- for(S32 j = 0, jend = joint_data.count(); j < jend ; ++j )
- {
- matrix_translate(sJointMat[j], joint_data[j]->mWorldMatrix,
- joint_data[j]->mSkinJoint ?
- joint_data[j]->mSkinJoint->mRootToJointSkinOffset
- : joint_data[j+1]->mSkinJoint->mRootToParentJointSkinOffset);
- }
-
- F32 weight = F32_MAX;
- LLV4Matrix4 blend_mat;
-
- LLStrider o_vertices;
- LLStrider o_normals;
-
- LLVertexBuffer *buffer = face->getVertexBuffer();
- buffer->getVertexStrider(o_vertices, mesh->mFaceVertexOffset);
- buffer->getNormalStrider(o_normals, mesh->mFaceVertexOffset);
-
- const F32* weights = mesh->getWeights();
- const LLVector3* coords = (const LLVector3*)mesh->getCoords();
- const LLVector3* normals = (const LLVector3*)mesh->getNormals();
- for (U32 index = 0, index_end = mesh->getNumVertices(); index < index_end; ++index)
- {
- if( weight != weights[index])
- {
- S32 joint = llfloor(weight = weights[index]);
- blend_mat.lerp(sJointMat[joint], sJointMat[joint+1], weight - joint);
- }
- blend_mat.multiply(coords[index], o_vertices[index]);
- ((LLV4Matrix3)blend_mat).multiply(normals[index], o_normals[index]);
- }
-
- buffer->flush();
-}
-
-#else
-
-void LLViewerJointMesh::updateGeometrySSE(LLFace *face, LLPolyMesh *mesh)
-{
- LLViewerJointMesh::updateGeometryVectorized(face, mesh);
-}
-
-#endif
diff --git a/indra/newview/llviewerjointmesh_sse2.cpp b/indra/newview/llviewerjointmesh_sse2.cpp
deleted file mode 100644
index c2296dd569..0000000000
--- a/indra/newview/llviewerjointmesh_sse2.cpp
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
- * @file llviewerjointmesh_sse2.cpp
- * @brief SSE vectorized joint skinning code, only used when video card does
- * not support avatar vertex programs.
- *
- * *NOTE: Disabled on Windows builds. See llv4math.h for details.
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-// Visual Studio required settings for this file:
-// Precompiled Headers OFF
-// Code Generation: SSE2
-
-//-----------------------------------------------------------------------------
-// Header Files
-//-----------------------------------------------------------------------------
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llviewerjointmesh.h"
-
-// project includes
-#include "llface.h"
-#include "llpolymesh.h"
-
-// library includes
-#include "lldarray.h"
-#include "llstrider.h"
-#include "llv4math.h" // for LL_VECTORIZE
-#include "llv4matrix3.h"
-#include "llv4matrix4.h"
-#include "m4math.h"
-#include "v3math.h"
-
-
-#if LL_VECTORIZE
-
-
-inline void matrix_translate(LLV4Matrix4& m, const LLMatrix4* w, const LLVector3& j)
-{
- m.mV[VX] = _mm_loadu_ps(w->mMatrix[VX]);
- m.mV[VY] = _mm_loadu_ps(w->mMatrix[VY]);
- m.mV[VZ] = _mm_loadu_ps(w->mMatrix[VZ]);
- m.mV[VW] = _mm_loadu_ps(w->mMatrix[VW]);
- m.mV[VW] = _mm_add_ps(m.mV[VW], _mm_mul_ps(_mm_set1_ps(j.mV[VX]), m.mV[VX])); // ( ax * vx ) + vw
- m.mV[VW] = _mm_add_ps(m.mV[VW], _mm_mul_ps(_mm_set1_ps(j.mV[VY]), m.mV[VY]));
- m.mV[VW] = _mm_add_ps(m.mV[VW], _mm_mul_ps(_mm_set1_ps(j.mV[VZ]), m.mV[VZ]));
-}
-
-// static
-void LLViewerJointMesh::updateGeometrySSE2(LLFace *face, LLPolyMesh *mesh)
-{
- // This cannot be a file-level static because it will be initialized
- // before main() using SSE code, which will crash on non-SSE processors.
- static LLV4Matrix4 sJointMat[32];
- LLDynamicArray& joint_data = mesh->getReferenceMesh()->mJointRenderData;
-
- //upload joint pivots/matrices
- for(S32 j = 0, jend = joint_data.count(); j < jend ; ++j )
- {
- matrix_translate(sJointMat[j], joint_data[j]->mWorldMatrix,
- joint_data[j]->mSkinJoint ?
- joint_data[j]->mSkinJoint->mRootToJointSkinOffset
- : joint_data[j+1]->mSkinJoint->mRootToParentJointSkinOffset);
- }
-
- F32 weight = F32_MAX;
- LLV4Matrix4 blend_mat;
-
- LLStrider o_vertices;
- LLStrider o_normals;
-
- LLVertexBuffer *buffer = face->getVertexBuffer();
- buffer->getVertexStrider(o_vertices, mesh->mFaceVertexOffset);
- buffer->getNormalStrider(o_normals, mesh->mFaceVertexOffset);
-
- const F32* weights = mesh->getWeights();
- const LLVector3* coords = (const LLVector3*)mesh->getCoords();
- const LLVector3* normals = (const LLVector3*)mesh->getNormals();
- for (U32 index = 0, index_end = mesh->getNumVertices(); index < index_end; ++index)
- {
- if( weight != weights[index])
- {
- S32 joint = llfloor(weight = weights[index]);
- blend_mat.lerp(sJointMat[joint], sJointMat[joint+1], weight - joint);
- }
- blend_mat.multiply(coords[index], o_vertices[index]);
- ((LLV4Matrix3)blend_mat).multiply(normals[index], o_normals[index]);
- }
-
- //setBuffer(0) called in LLVOAvatar::renderSkinned
-}
-
-#else
-
-void LLViewerJointMesh::updateGeometrySSE2(LLFace *face, LLPolyMesh *mesh)
-{
- LLViewerJointMesh::updateGeometryVectorized(face, mesh);
-}
-
-#endif
diff --git a/indra/newview/llviewerjointmesh_vec.cpp b/indra/newview/llviewerjointmesh_vec.cpp
deleted file mode 100644
index a8713b6f05..0000000000
--- a/indra/newview/llviewerjointmesh_vec.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * @file llviewerjointmesh_vec.cpp
- * @brief Compiler-generated vectorized joint skinning code, works well on
- * Altivec processors (PowerPC Mac)
- *
- * *NOTE: See llv4math.h for notes on SSE/Altivec vector code.
- *
- * $LicenseInfo:firstyear=2007&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-//-----------------------------------------------------------------------------
-// Header Files
-//-----------------------------------------------------------------------------
-#include "llviewerprecompiledheaders.h"
-
-#include "llviewerjointmesh.h"
-
-#include "llface.h"
-#include "llpolymesh.h"
-#include "llv4math.h"
-#include "llv4matrix3.h"
-#include "llv4matrix4.h"
-
-// Generic vectorized code, uses compiler defaults, works well for Altivec
-// on PowerPC.
-
-// static
-void LLViewerJointMesh::updateGeometryVectorized(LLFace *face, LLPolyMesh *mesh)
-{
-#if 0
- static LLV4Matrix4 sJointMat[32];
- LLDynamicArray& joint_data = mesh->getReferenceMesh()->mJointRenderData;
- S32 j, joint_num, joint_end = joint_data.count();
- LLV4Vector3 pivot;
-
- //upload joint pivots/matrices
- for(j = joint_num = 0; joint_num < joint_end ; ++joint_num )
- {
- LLSkinJoint *sj;
- const LLMatrix4 * wm = joint_data[joint_num]->mWorldMatrix;
- if (NULL == (sj = joint_data[joint_num]->mSkinJoint))
- {
- sj = joint_data[++joint_num]->mSkinJoint;
- ((LLV4Matrix3)(sJointMat[j] = *wm)).multiply(sj->mRootToParentJointSkinOffset, pivot);
- sJointMat[j++].translate(pivot);
- wm = joint_data[joint_num]->mWorldMatrix;
- }
- ((LLV4Matrix3)(sJointMat[j] = *wm)).multiply(sj->mRootToJointSkinOffset, pivot);
- sJointMat[j++].translate(pivot);
- }
-
- F32 weight = F32_MAX;
- LLV4Matrix4 blend_mat;
-
- LLStrider o_vertices;
- LLStrider o_normals;
-
- LLVertexBuffer *buffer = face->mVertexBuffer;
- buffer->getVertexStrider(o_vertices, mesh->mFaceVertexOffset);
- buffer->getNormalStrider(o_normals, mesh->mFaceVertexOffset);
-
- const F32* weights = mesh->getWeights();
- const LLVector3* coords = mesh->getCoords();
- const LLVector3* normals = mesh->getNormals();
- for (U32 index = 0, index_end = mesh->getNumVertices(); index < index_end; ++index)
- {
- if( weight != weights[index])
- {
- S32 joint = llfloor(weight = weights[index]);
- blend_mat.lerp(sJointMat[joint], sJointMat[joint+1], weight - joint);
- }
- blend_mat.multiply(coords[index], o_vertices[index]);
- ((LLV4Matrix3)blend_mat).multiply(normals[index], o_normals[index]);
- }
-
- buffer->flush();
-#endif
-}
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 22d95563d8..9fbc28a5e1 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -1038,26 +1038,6 @@ class LLAdvancedCheckRandomizeFramerate : public view_listener_t
}
};
-void run_vectorize_perf_test(void *)
-{
- gSavedSettings.setBOOL("VectorizePerfTest", TRUE);
-}
-
-
-////////////////////////////////
-// RUN Vectorized Perform Test//
-////////////////////////////////
-
-
-class LLAdvancedVectorizePerfTest : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- run_vectorize_perf_test(NULL);
- return true;
- }
-};
-
///////////////////////////
//// PERIODIC SLOW FRAME //
///////////////////////////
@@ -8117,7 +8097,6 @@ void initialize_menus()
view_listener_t::addMenu(new LLAdvancedCheckRandomizeFramerate(), "Advanced.CheckRandomizeFramerate");
view_listener_t::addMenu(new LLAdvancedTogglePeriodicSlowFrame(), "Advanced.TogglePeriodicSlowFrame");
view_listener_t::addMenu(new LLAdvancedCheckPeriodicSlowFrame(), "Advanced.CheckPeriodicSlowFrame");
- view_listener_t::addMenu(new LLAdvancedVectorizePerfTest(), "Advanced.VectorizePerfTest");
view_listener_t::addMenu(new LLAdvancedToggleFrameTest(), "Advanced.ToggleFrameTest");
view_listener_t::addMenu(new LLAdvancedCheckFrameTest(), "Advanced.CheckFrameTest");
view_listener_t::addMenu(new LLAdvancedHandleAttachedLightParticles(), "Advanced.HandleAttachedLightParticles");
--
cgit v1.2.3
From ec2dfa968177b0a9a016238cc2a2522f08efcfed Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Wed, 9 Nov 2011 12:18:17 -0600
Subject: SH-24114 Remove unused variables
---
indra/newview/llviewerjointmesh.cpp | 13 -------------
1 file changed, 13 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp
index b18323bed0..76f4e18c27 100644
--- a/indra/newview/llviewerjointmesh.cpp
+++ b/indra/newview/llviewerjointmesh.cpp
@@ -820,19 +820,6 @@ void LLViewerJointMesh::updateGeometry(LLFace *mFace, LLPolyMesh *mMesh)
buffer->flush();
}
-const U32 UPDATE_GEOMETRY_CALL_MASK = 0x1FFF; // 8K samples before overflow
-const U32 UPDATE_GEOMETRY_CALL_OVERFLOW = ~UPDATE_GEOMETRY_CALL_MASK;
-static bool sUpdateGeometryCallPointer = false;
-static F64 sUpdateGeometryGlobalTime = 0.0 ;
-static F64 sUpdateGeometryElapsedTime = 0.0 ;
-static F64 sUpdateGeometryElapsedTimeOff = 0.0 ;
-static F64 sUpdateGeometryElapsedTimeOn = 0.0 ;
-static F64 sUpdateGeometryRunAvgOff[10];
-static F64 sUpdateGeometryRunAvgOn[10];
-static U32 sUpdateGeometryRunCount = 0 ;
-static U32 sUpdateGeometryCalls = 0 ;
-static U32 sUpdateGeometryLastProcessor = 0 ;
-
void LLViewerJointMesh::updateJointGeometry()
{
if (!(mValid
--
cgit v1.2.3
From ecadf5131a87a0bb9633a2b3875e16a410a98de5 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 10 Nov 2011 10:03:44 -0600
Subject: SH-2240 Fix for red moon.
---
indra/newview/lldrawpoolwlsky.cpp | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index f2d077030c..22b06d1aef 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -267,10 +267,6 @@ void LLDrawPoolWLSky::renderHeavenlyBodies()
if (gSky.mVOSkyp->getMoon().getDraw() && face->getGeomCount())
{
- if (gPipeline.canUseVertexShaders())
- {
- gHighlightProgram.bind();
- }
// *NOTE: even though we already bound this texture above for the
// stars register combiners, we bind again here for defensive reasons,
// since LLImageGL::bind detects that it's a noop, and optimizes it out.
@@ -284,7 +280,14 @@ void LLDrawPoolWLSky::renderHeavenlyBodies()
color.mV[3] = llclamp(a, 0.f, 1.f);
+ if (gPipeline.canUseVertexShaders())
+ {
+ gHighlightProgram.bind();
+ gHighlightProgram.uniform4fv(LLShaderMgr::HIGHLIGHT_COLOR, 1, color.mV);
+ }
+
LLFacePool::LLOverrideFaceColor color_override(this, color);
+
face->renderIndexed();
if (gPipeline.canUseVertexShaders())
--
cgit v1.2.3
From aa8f3d30704ea43a8fc2f9262a57968277c4db20 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 10 Nov 2011 10:04:44 -0600
Subject: SH-2644 WIP -- remove debug displays pertaining to upload/download
queues
---
indra/newview/llviewerwindow.cpp | 31 -------------------------------
1 file changed, 31 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index e3bf6327e7..55834f5d99 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -737,37 +737,6 @@ public:
}
}
- //temporary hack to give feedback on mesh upload progress
- if (!gMeshRepo.mUploads.empty())
- {
- for (std::vector::iterator iter = gMeshRepo.mUploads.begin();
- iter != gMeshRepo.mUploads.end(); ++iter)
- {
- LLMeshUploadThread* thread = *iter;
-
- addText(xpos, ypos, llformat("Mesh Uploads: %d",
- thread->mPendingUploads));
- ypos += y_inc;
- }
- }
-
- if (!gMeshRepo.mPendingRequests.empty() ||
- !gMeshRepo.mThread->mHeaderReqQ.empty() ||
- !gMeshRepo.mThread->mLODReqQ.empty())
- {
- LLMutexLock lock(gMeshRepo.mThread->mMutex);
- S32 pending = (S32) gMeshRepo.mPendingRequests.size();
- S32 header = (S32) gMeshRepo.mThread->mHeaderReqQ.size();
- S32 lod = (S32) gMeshRepo.mThread->mLODReqQ.size();
-
- addText(xpos, ypos, llformat ("Mesh Queue - %d pending (%d:%d header | %d:%d LOD)",
- pending,
- LLMeshRepoThread::sActiveHeaderRequests, header,
- LLMeshRepoThread::sActiveLODRequests, lod));
-
- ypos += y_inc;
- }
-
if (gSavedSettings.getBOOL("DebugShowTextureInfo"))
{
LLViewerObject* objectp = NULL ;
--
cgit v1.2.3
From c8f558f6775d62f03d6caab19668df80e95e8a8b Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 10 Nov 2011 11:39:08 -0600
Subject: SH-2240 Better fix for red moon -- stop special casing
"highlight_color" as a parameter.
---
.../newview/app_settings/shaders/class1/interface/highlightF.glsl | 4 ++--
indra/newview/lldrawpoolalpha.cpp | 3 ++-
indra/newview/lldrawpoolterrain.cpp | 2 +-
indra/newview/lldrawpoolwlsky.cpp | 1 -
indra/newview/pipeline.cpp | 7 ++-----
5 files changed, 7 insertions(+), 10 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl b/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl
index 574adeb50c..ecbc30f05f 100644
--- a/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl
@@ -27,12 +27,12 @@
out vec4 gl_FragColor;
#endif
-uniform vec4 highlight_color;
+uniform vec4 color;
uniform sampler2D diffuseMap;
VARYING vec2 vary_texcoord0;
void main()
{
- gl_FragColor = highlight_color*texture2D(diffuseMap, vary_texcoord0.xy);
+ gl_FragColor = color*texture2D(diffuseMap, vary_texcoord0.xy);
}
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 54f937d8fd..ddb7d3ceeb 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -327,8 +327,9 @@ void LLDrawPoolAlpha::render(S32 pass)
{
gPipeline.enableLightsFullbright(LLColor4(1,1,1,1));
}
+
gGL.diffuseColor4f(1,0,0,1);
-
+
LLViewerFetchedTexture::sSmokeImagep->addTextureStats(1024.f*1024.f);
gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sSmokeImagep, TRUE) ;
renderAlphaHighlight(LLVertexBuffer::MAP_VERTEX |
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index addb18a1d5..b8e653c5de 100644
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -246,7 +246,7 @@ void LLDrawPoolTerrain::render(S32 pass)
sShader->unbind();
sShader = &gHighlightProgram;
sShader->bind();
- sShader->uniform4f(LLShaderMgr::HIGHLIGHT_COLOR, 1,1,1,1);
+ gGL.diffuseColor4f(1,1,1,1);
LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL);
glPolygonOffset(-1.0f, -1.0f);
renderOwnership();
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index 22b06d1aef..caf15fe1cb 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -283,7 +283,6 @@ void LLDrawPoolWLSky::renderHeavenlyBodies()
if (gPipeline.canUseVertexShaders())
{
gHighlightProgram.bind();
- gHighlightProgram.uniform4fv(LLShaderMgr::HIGHLIGHT_COLOR, 1, color.mV);
}
LLFacePool::LLOverrideFaceColor color_override(this, color);
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 49f83fdb0d..3f91c3cddc 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -3583,7 +3583,7 @@ void LLPipeline::renderHighlights()
if ((LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0))
{
gHighlightProgram.bind();
- gHighlightProgram.uniform4f(LLShaderMgr::HIGHLIGHT_COLOR,1,1,1,0.5f);
+ gGL.diffuseColor4f(1,1,1,0.5f);
}
if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED))
@@ -3613,10 +3613,7 @@ void LLPipeline::renderHighlights()
{
// Paint 'em red!
color.setVec(1.f, 0.f, 0.f, 0.5f);
- if ((LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0))
- {
- gHighlightProgram.uniform4f(LLShaderMgr::HIGHLIGHT_COLOR,1,0,0,0.5f);
- }
+
int count = mHighlightFaces.size();
for (S32 i = 0; i < count; i++)
{
--
cgit v1.2.3
From 76bd8cee1120ac531d56b9897b135e9c1af1bb16 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 10 Nov 2011 14:48:48 -0600
Subject: SH-2644 Fix debug display that shows selection triangle count and
streaming cost
---
indra/newview/llselectmgr.cpp | 4 ++--
indra/newview/llselectmgr.h | 2 +-
indra/newview/llviewerobject.cpp | 4 ++--
indra/newview/llviewerobject.h | 4 ++--
indra/newview/llviewerwindow.cpp | 11 +++++++----
indra/newview/llvovolume.cpp | 4 ++--
indra/newview/llvovolume.h | 2 +-
7 files changed, 17 insertions(+), 14 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 2971ee710a..830a7778ac 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -6524,7 +6524,7 @@ F32 LLObjectSelection::getSelectedObjectStreamingCost(S32* total_bytes, S32* vis
return cost;
}
-U32 LLObjectSelection::getSelectedObjectTriangleCount()
+U32 LLObjectSelection::getSelectedObjectTriangleCount(S32* vcount)
{
U32 count = 0;
for (list_t::iterator iter = mList.begin(); iter != mList.end(); ++iter)
@@ -6534,7 +6534,7 @@ U32 LLObjectSelection::getSelectedObjectTriangleCount()
if (object)
{
- count += object->getTriangleCount();
+ count += object->getTriangleCount(vcount);
}
}
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index 166616e13e..87ada5ac6b 100644
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -286,7 +286,7 @@ public:
S32 getSelectedObjectRenderCost();
F32 getSelectedObjectStreamingCost(S32* total_bytes = NULL, S32* visible_bytes = NULL);
- U32 getSelectedObjectTriangleCount();
+ U32 getSelectedObjectTriangleCount(S32* vcount = NULL);
S32 getTECount();
S32 getRootObjectCount();
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index d81e67bfe2..b8772971aa 100755
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -3219,12 +3219,12 @@ F32 LLViewerObject::getLinksetPhysicsCost()
return mLinksetPhysicsCost;
}
-F32 LLViewerObject::getStreamingCost(S32* bytes, S32* visible_bytes)
+F32 LLViewerObject::getStreamingCost(S32* bytes, S32* visible_bytes, F32* unscaled_value) const
{
return 0.f;
}
-U32 LLViewerObject::getTriangleCount()
+U32 LLViewerObject::getTriangleCount(S32* vcount) const
{
return 0;
}
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index a77725c1ca..c8152e1539 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -340,8 +340,8 @@ public:
virtual void setScale(const LLVector3 &scale, BOOL damped = FALSE);
- virtual F32 getStreamingCost(S32* bytes = NULL, S32* visible_bytes = NULL);
- virtual U32 getTriangleCount();
+ virtual F32 getStreamingCost(S32* bytes = NULL, S32* visible_bytes = NULL, F32* unscaled_value = NULL) const;
+ virtual U32 getTriangleCount(S32* vcount = NULL) const;
virtual U32 getHighLODTriangleCount();
void setObjectCost(F32 cost);
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 55834f5d99..8af83246da 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -489,6 +489,7 @@ public:
{
F32 cost = 0.f;
S32 count = 0;
+ S32 vcount = 0;
S32 object_count = 0;
S32 total_bytes = 0;
S32 visible_bytes = 0;
@@ -510,7 +511,9 @@ public:
S32 bytes = 0;
S32 visible = 0;
cost += object->getStreamingCost(&bytes, &visible);
- count += object->getTriangleCount();
+ S32 vt = 0;
+ count += object->getTriangleCount(&vt);
+ vcount += vt;
total_bytes += bytes;
visible_bytes += visible;
}
@@ -521,15 +524,15 @@ public:
{
label = "Selection";
cost = LLSelectMgr::getInstance()->getSelection()->getSelectedObjectStreamingCost(&total_bytes, &visible_bytes);
- count = LLSelectMgr::getInstance()->getSelection()->getSelectedObjectTriangleCount();
+ count = LLSelectMgr::getInstance()->getSelection()->getSelectedObjectTriangleCount(&vcount);
object_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
}
addText(xpos,ypos, llformat("%s streaming cost: %.1f", label, cost));
ypos += y_inc;
- addText(xpos, ypos, llformat(" %.3f KTris, %.1f/%.1f KB, %d objects",
- count/1000.f, visible_bytes/1024.f, total_bytes/1024.f, object_count));
+ addText(xpos, ypos, llformat(" %.3f KTris, %.3f KVerts, %.1f/%.1f KB, %d objects",
+ count/1000.f, vcount/1000.f, visible_bytes/1024.f, total_bytes/1024.f, object_count));
ypos += y_inc;
}
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index b75a0a799a..827c5b9cb5 100755
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3266,13 +3266,13 @@ void LLVOVolume::updateRenderComplexity()
mRenderComplexity_current = 0;
}
-U32 LLVOVolume::getTriangleCount() const
+U32 LLVOVolume::getTriangleCount(S32* vcount) const
{
U32 count = 0;
LLVolume* volume = getVolume();
if (volume)
{
- count = volume->getNumTriangles();
+ count = volume->getNumTriangles(vcount);
}
return count;
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index b6347526ee..64457975f8 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -133,7 +133,7 @@ public:
U32 getRenderCost(texture_cost_t &textures) const;
/*virtual*/ F32 getStreamingCost(S32* bytes = NULL, S32* visible_bytes = NULL, F32* unscaled_value = NULL) const;
- /*virtual*/ U32 getTriangleCount() const;
+ /*virtual*/ U32 getTriangleCount(S32* vcount = NULL) const;
/*virtual*/ U32 getHighLODTriangleCount();
/*virtual*/ BOOL lineSegmentIntersect(const LLVector3& start, const LLVector3& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
--
cgit v1.2.3
From df546bfba965ec9ec43b7611bb25b5b5ec8f01b5 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 10 Nov 2011 16:12:50 -0600
Subject: SH-2666 Tweak depth of field optimizations based on resident
feedback.
---
indra/newview/app_settings/settings.xml | 14 +++++++++++++-
.../app_settings/shaders/class1/deferred/cofF.glsl | 2 +-
.../shaders/class1/deferred/dofCombineF.glsl | 19 +++++++++++++++++--
.../shaders/class1/deferred/postDeferredF.glsl | 1 +
indra/newview/pipeline.cpp | 8 +++++++-
indra/newview/pipeline.h | 1 +
6 files changed, 40 insertions(+), 5 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index d07efa6a37..aa08b0783e 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -8017,7 +8017,19 @@
Value
0
-
+
+ CameraDoFResScale
+
+ Comment
+ Amount to scale down depth of field resolution. Valid range is 0.25 (quarter res) to 1.0 (full res)
+ Persist
+ 1
+ Type
+ F32
+ Value
+ 0.7
+
+
RenderSpotLightsInNondeferred
Comment
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl b/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl
index 56fa4e693b..88fe3c3dee 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/cofF.glsl
@@ -83,5 +83,5 @@ void main()
vec4 bloom = texture2D(bloomMap, vary_fragcoord.xy/screen_res);
gl_FragColor.rgb = diff.rgb + bloom.rgb;
- gl_FragColor.a = sc/10.f;
+ gl_FragColor.a = sc/max_cof;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl b/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl
index d2903b545c..21453aefaa 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/dofCombineF.glsl
@@ -36,6 +36,7 @@ uniform mat4 inv_proj;
uniform vec2 screen_res;
uniform float max_cof;
+uniform float res_scale;
VARYING vec2 vary_fragcoord;
@@ -43,10 +44,24 @@ void main()
{
vec2 tc = vary_fragcoord.xy;
- vec4 dof = texture2DRect(diffuseRect, vary_fragcoord.xy*0.5);
+ vec4 dof = texture2DRect(diffuseRect, vary_fragcoord.xy*res_scale);
vec4 diff = texture2DRect(lightMap, vary_fragcoord.xy);
- float a = min(diff.a * max_cof*0.333, 1.0);
+ float a = min(diff.a * max_cof*res_scale*res_scale, 1.0);
+
+ if (a > 0.25 && a < 0.75)
+ { //help out the transition a bit
+ float sc = a/res_scale;
+
+ vec4 col;
+ col = texture2DRect(lightMap, vary_fragcoord.xy+vec2(sc,sc));
+ col += texture2DRect(lightMap, vary_fragcoord.xy+vec2(-sc,sc));
+ col += texture2DRect(lightMap, vary_fragcoord.xy+vec2(sc,-sc));
+ col += texture2DRect(lightMap, vary_fragcoord.xy+vec2(-sc,-sc));
+
+ diff = mix(diff, col*0.25, a);
+ }
+
gl_FragColor = mix(diff, dof, a);
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
index 629648ddc3..4603d99c5e 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl
@@ -34,6 +34,7 @@ uniform sampler2DRect diffuseRect;
uniform mat4 inv_proj;
uniform vec2 screen_res;
uniform float max_cof;
+uniform float res_scale;
VARYING vec2 vary_fragcoord;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 3f91c3cddc..da4ffd97de 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -186,6 +186,7 @@ F32 LLPipeline::RenderShadowErrorCutoff;
F32 LLPipeline::RenderShadowFOVCutoff;
BOOL LLPipeline::CameraOffset;
F32 LLPipeline::CameraMaxCoF;
+F32 LLPipeline::CameraDoFResScale;
const F32 BACKLIGHT_DAY_MAGNITUDE_AVATAR = 0.2f;
const F32 BACKLIGHT_NIGHT_MAGNITUDE_AVATAR = 0.1f;
@@ -929,6 +930,7 @@ void LLPipeline::refreshCachedSettings()
RenderShadowFOVCutoff = gSavedSettings.getF32("RenderShadowFOVCutoff");
CameraOffset = gSavedSettings.getBOOL("CameraOffset");
CameraMaxCoF = gSavedSettings.getF32("CameraMaxCoF");
+ CameraDoFResScale = gSavedSettings.getF32("CameraDoFResScale");
}
void LLPipeline::releaseGLBuffers()
@@ -6549,6 +6551,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
shader->uniform1f(LLShaderMgr::DOF_TAN_PIXEL_ANGLE, tanf(1.f/LLDrawable::sCurPixelAngle));
shader->uniform1f(LLShaderMgr::DOF_MAGNIFICATION, magnification);
shader->uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF);
+ shader->uniform1f(LLShaderMgr::DOF_RES_SCALE, CameraDoFResScale);
gGL.begin(LLRender::TRIANGLE_STRIP);
gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
@@ -6568,7 +6571,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
{ //perform DoF sampling at half-res (preserve alpha channel)
mScreen.bindTarget();
- glViewport(0,0,mScreen.getWidth()/2, mScreen.getHeight()/2);
+ glViewport(0,0,mScreen.getWidth()*CameraDoFResScale, mScreen.getHeight()*CameraDoFResScale);
gGL.setColorMask(true, false);
shader = &gDeferredPostProgram;
@@ -6580,6 +6583,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
}
shader->uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF);
+ shader->uniform1f(LLShaderMgr::DOF_RES_SCALE, CameraDoFResScale);
gGL.begin(LLRender::TRIANGLE_STRIP);
gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
@@ -6611,9 +6615,11 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
if (channel > -1)
{
mScreen.bindTexture(0, channel);
+ gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
}
shader->uniform1f(LLShaderMgr::DOF_MAX_COF, CameraMaxCoF);
+ shader->uniform1f(LLShaderMgr::DOF_RES_SCALE, CameraDoFResScale);
gGL.begin(LLRender::TRIANGLE_STRIP);
gGL.texCoord2f(tc1.mV[0], tc1.mV[1]);
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index e607e0aec6..8b6532ca25 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -846,6 +846,7 @@ public:
static F32 RenderShadowFOVCutoff;
static BOOL CameraOffset;
static F32 CameraMaxCoF;
+ static F32 CameraDoFResScale;
};
void render_bbox(const LLVector3 &min, const LLVector3 &max);
--
cgit v1.2.3
From e2e154d94ea0684ede8c7c1b70fff555edbd6065 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Thu, 10 Nov 2011 16:33:34 -0600
Subject: SH-2659 Fix for basic shaders having no affect when gl version < 2.0
---
indra/newview/llviewershadermgr.cpp | 4 ----
1 file changed, 4 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 32978a0d04..18ae83e3b6 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -372,10 +372,6 @@ void LLViewerShaderMgr::setShaders()
gSavedSettings.setBOOL("VertexShaderEnable", TRUE);
}
}
- else if (gGLManager.mGLVersion < 2.f)
- { //NEVER use shaders on a pre 2.0 context
- gSavedSettings.setBOOL("VertexShaderEnable", FALSE);
- }
//setup preprocessor definitions
LLShaderMgr::instance()->mDefinitions["NUM_TEX_UNITS"] = llformat("%d", gGLManager.mNumTextureImageUnits);
--
cgit v1.2.3
From fabbae5e6e22883696ec7257716be0d5bdbbcfaf Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Fri, 11 Nov 2011 16:20:55 -0600
Subject: SH-2666 Fix for pixel doubling failsafe on out out of memory.
---
indra/newview/pipeline.cpp | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index da4ffd97de..226db5a520 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -679,6 +679,8 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY)
releaseScreenBuffers();
}
+ samples = 0;
+
//reduce resolution
while (resY > 0 && resX > 0)
{
@@ -6253,8 +6255,8 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
U32 res_mod = RenderResolutionDivisor;
LLVector2 tc1(0,0);
- LLVector2 tc2((F32) gViewerWindow->getWorldViewWidthRaw()*2,
- (F32) gViewerWindow->getWorldViewHeightRaw()*2);
+ LLVector2 tc2((F32) mScreen.getWidth()*2,
+ (F32) mScreen.getHeight()*2);
if (res_mod > 1)
{
@@ -6403,8 +6405,8 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
gGLViewport[3] = gViewerWindow->getWorldViewRectRaw().getHeight();
glViewport(gGLViewport[0], gGLViewport[1], gGLViewport[2], gGLViewport[3]);
- tc2.setVec((F32) gViewerWindow->getWorldViewWidthRaw(),
- (F32) gViewerWindow->getWorldViewHeightRaw());
+ tc2.setVec((F32) mScreen.getWidth(),
+ (F32) mScreen.getHeight());
gGL.flush();
@@ -6418,7 +6420,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
RenderDepthOfField;
- bool multisample = RenderFSAASamples > 1;
+ bool multisample = RenderFSAASamples > 1 && mFXAABuffer.isComplete();
#if LL_DARWIN //force FXAA to off on OSX (SH-2620)
multisample = false;
@@ -6606,11 +6608,20 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
if (multisample)
{
mDeferredLight.bindTarget();
+ glViewport(0, 0, mDeferredScreen.getWidth(), mDeferredScreen.getHeight());
+ }
+ else
+ {
+ gGLViewport[0] = gViewerWindow->getWorldViewRectRaw().mLeft;
+ gGLViewport[1] = gViewerWindow->getWorldViewRectRaw().mBottom;
+ gGLViewport[2] = gViewerWindow->getWorldViewRectRaw().getWidth();
+ gGLViewport[3] = gViewerWindow->getWorldViewRectRaw().getHeight();
+ glViewport(gGLViewport[0], gGLViewport[1], gGLViewport[2], gGLViewport[3]);
}
shader = &gDeferredDoFCombineProgram;
bindDeferredShader(*shader);
- glViewport(0, 0, mDeferredScreen.getWidth(), mDeferredScreen.getHeight());
+
S32 channel = shader->enableTexture(LLShaderMgr::DEFERRED_DIFFUSE, mScreen.getUsage());
if (channel > -1)
{
--
cgit v1.2.3
From 84ab08d2a5ac59ea2681e3dea0e0bc48e3d99de5 Mon Sep 17 00:00:00 2001
From: Leslie Linden
Date: Fri, 11 Nov 2011 16:27:08 -0800
Subject: Assorted shader cleanup to remove a few warnings and errors for OS X.
---
.../shaders/class1/deferred/attachmentShadowV.glsl | 3 ---
.../app_settings/shaders/class1/deferred/avatarShadowV.glsl | 3 ---
.../app_settings/shaders/class1/deferred/impostorV.glsl | 4 ----
.../app_settings/shaders/class2/deferred/sunLightF.glsl | 10 +++++-----
.../app_settings/shaders/class2/deferred/sunLightSSAOF.glsl | 8 ++++----
indra/newview/app_settings/shaders/class2/windlight/skyV.glsl | 3 ---
6 files changed, 9 insertions(+), 22 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowV.glsl b/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowV.glsl
index 533babf3dc..ded6cced27 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/attachmentShadowV.glsl
@@ -31,15 +31,12 @@ ATTRIBUTE vec4 diffuse_color;
ATTRIBUTE vec2 texcoord0;
VARYING vec4 vertex_color;
-VARYING vec2 vary_texcoord0;
mat4 getObjectSkinnedTransform();
void main()
{
//transform vertex
- vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
-
mat4 mat = getObjectSkinnedTransform();
mat = modelview_matrix * mat;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarShadowV.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarShadowV.glsl
index 525acbe4ea..23feb09d72 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/avatarShadowV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/avatarShadowV.glsl
@@ -32,12 +32,9 @@ ATTRIBUTE vec3 normal;
ATTRIBUTE vec2 texcoord0;
VARYING vec4 post_pos;
-VARYING vec2 vary_texcoord0;
void main()
{
- vary_texcoord0 = texcoord0;
-
vec4 pos;
vec3 norm;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/impostorV.glsl b/indra/newview/app_settings/shaders/class1/deferred/impostorV.glsl
index 58e5dc0b56..42266e9378 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/impostorV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/impostorV.glsl
@@ -27,10 +27,8 @@ uniform mat4 texture_matrix0;
uniform mat4 modelview_projection_matrix;
ATTRIBUTE vec3 position;
-ATTRIBUTE vec4 diffuse_color;
ATTRIBUTE vec2 texcoord0;
-VARYING vec4 vertex_color;
VARYING vec2 vary_texcoord0;
void main()
@@ -38,6 +36,4 @@ void main()
//transform vertex
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
-
- vertex_color = diffuse_color;
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
index 7e62012b5d..229c2f4b67 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
@@ -99,15 +99,15 @@ float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl)
stc.xyz /= stc.w;
stc.z += spot_shadow_bias*scl;
- float cs = shadow2D(shadowMap, stc.xyz);
+ float cs = shadow2D(shadowMap, stc.xyz).x;
float shadow = cs;
vec2 off = 1.5/proj_shadow_res;
- shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, off.y, 0.0)), cs);
- shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, -off.y, 0.0)), cs);
- shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, off.y, 0.0)), cs);
- shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, -off.y, 0.0)), cs);
+ shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, off.y, 0.0)).x, cs);
+ shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, -off.y, 0.0)).x, cs);
+ shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, off.y, 0.0)).x, cs);
+ shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, -off.y, 0.0)).x, cs);
return shadow/5.0;
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
index 025ff48109..fc19f15e02 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
@@ -155,10 +155,10 @@ float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl)
vec2 off = 1.5/proj_shadow_res;
- shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, off.y, 0.0)), cs);
- shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, -off.y, 0.0)), cs);
- shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, off.y, 0.0)), cs);
- shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, -off.y, 0.0)), cs);
+ shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, off.y, 0.0)).x, cs);
+ shadow += max(shadow2D(shadowMap, stc.xyz+vec3(off.x, -off.y, 0.0)).x, cs);
+ shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, off.y, 0.0)).x, cs);
+ shadow += max(shadow2D(shadowMap, stc.xyz+vec3(-off.x, -off.y, 0.0)).x, cs);
return shadow/5.0;
diff --git a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl
index b768cc9cf3..46773cf89f 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl
@@ -26,7 +26,6 @@
uniform mat4 modelview_projection_matrix;
ATTRIBUTE vec3 position;
-ATTRIBUTE vec2 texcoord0;
// SKY ////////////////////////////////////////////////////////////////////////
// The vertex shader for creating the atmospheric sky
@@ -34,7 +33,6 @@ ATTRIBUTE vec2 texcoord0;
// Output parameters
VARYING vec4 vary_HazeColor;
-VARYING vec2 vary_texcoord0;
// Inputs
uniform vec3 camPosLocal;
@@ -62,7 +60,6 @@ void main()
// World / view / projection
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
- vary_texcoord0 = texcoord0;
// Get relative position
vec3 P = position.xyz - camPosLocal.xyz + vec3(0,50,0);
--
cgit v1.2.3
From e7daefeb4d09ff7726e8865d5323b2c1e6ffe9a8 Mon Sep 17 00:00:00 2001
From: Leslie Linden
Date: Fri, 11 Nov 2011 16:36:00 -0800
Subject: SH-2620 -- Enabled FXAA on OSX, which fixes the issue with latest
code and some assorted shader cleanup from changeset e156c46db1b2
---
indra/newview/pipeline.cpp | 4 ----
1 file changed, 4 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 226db5a520..af96a042a1 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -6422,10 +6422,6 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
bool multisample = RenderFSAASamples > 1 && mFXAABuffer.isComplete();
-#if LL_DARWIN //force FXAA to off on OSX (SH-2620)
- multisample = false;
-#endif
-
gViewerWindow->setup3DViewport();
if (dof_enabled)
--
cgit v1.2.3
From 98e067cad4f919275f170650f3c21c8986f2a0cd Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Mon, 14 Nov 2011 12:33:00 -0600
Subject: SH-2650 Fix for avatar eyeballs protruding from lower eyelids
---
indra/newview/llvoavatar.cpp | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 799e1bbfb9..a3550000df 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2138,7 +2138,15 @@ void LLVOAvatar::updateMeshData()
for(S32 k = j ; k < part_index ; k++)
{
- mMeshLOD[k]->updateFaceData(facep, mAdjustedPixelArea, k == MESH_ID_HAIR, terse_update);
+ bool rigid = false;
+ if (k == MESH_ID_EYEBALL_LEFT ||
+ k == MESH_ID_EYEBALL_RIGHT)
+ { //eyeballs can't have terse updates since they're never rendered with
+ //the hardware skinning shader
+ rigid = true;
+ }
+
+ mMeshLOD[k]->updateFaceData(facep, mAdjustedPixelArea, k == MESH_ID_HAIR, terse_update && !rigid);
}
stop_glerror();
--
cgit v1.2.3
From 961ce1c4e785103b696a8ec76674aee4c91fe011 Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 15 Nov 2011 12:24:31 -0600
Subject: SH-2591 WIP -- fix for UI disappearing, introduces some artifacts in
rotation ring, committing to debug elsewhere
---
indra/newview/llmaniprotate.cpp | 35 ++++++++++++++++++++++++++++++++---
1 file changed, 32 insertions(+), 3 deletions(-)
(limited to 'indra/newview')
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index 04dd2be583..a8da94f75e 100644
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -53,6 +53,7 @@
#include "llviewercamera.h"
#include "llviewerobject.h"
#include "llviewerobject.h"
+#include "llviewershadermgr.h"
#include "llviewerwindow.h"
#include "llworld.h"
#include "pipeline.h"
@@ -113,7 +114,7 @@ void LLManipRotate::handleSelect()
void LLManipRotate::render()
{
LLGLSUIDefault gls_ui;
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
+ gGL.getTexUnit(0)->bind(LLViewerFetchedTexture::sWhiteImagep);
LLGLDepthTest gls_depth(GL_TRUE);
LLGLEnable gl_blend(GL_BLEND);
LLGLEnable gls_alpha_test(GL_ALPHA_TEST);
@@ -147,6 +148,7 @@ void LLManipRotate::render()
gGL.pushMatrix();
{
+
// are we in the middle of a constrained drag?
if (mManipPart >= LL_ROT_X && mManipPart <= LL_ROT_Z)
{
@@ -154,6 +156,11 @@ void LLManipRotate::render()
}
else
{
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gDebugProgram.bind();
+ }
+
LLGLEnable cull_face(GL_CULL_FACE);
LLGLDepthTest gls_depth(GL_FALSE);
gGL.pushMatrix();
@@ -190,20 +197,27 @@ void LLManipRotate::render()
{
color.setVec( 0.7f, 0.7f, 0.7f, 0.6f );
}
+ gGL.diffuseColor4fv(color.mV);
gl_washer_2d(mRadiusMeters + width_meters, mRadiusMeters, CIRCLE_STEPS, color, color);
if (mManipPart == LL_NO_PART)
{
gGL.color4f( 0.7f, 0.7f, 0.7f, 0.3f );
+ gGL.diffuseColor4f(0.7f, 0.7f, 0.7f, 0.3f);
gl_circle_2d( 0, 0, mRadiusMeters, CIRCLE_STEPS, TRUE );
}
gGL.flush();
}
gGL.popMatrix();
- }
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.bind();
+ }
+ }
+
gGL.translatef( center.mV[VX], center.mV[VY], center.mV[VZ] );
LLQuaternion rot;
@@ -219,6 +233,11 @@ void LLManipRotate::render()
gGL.rotatef(angle_radians * RAD_TO_DEG, x, y, z);
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gDebugProgram.bind();
+ }
+
if (mManipPart == LL_ROT_Z)
{
mManipulatorScales = lerp(mManipulatorScales, LLVector4(1.f, 1.f, SELECTED_MANIPULATOR_SCALE, 1.f), LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
@@ -270,6 +289,7 @@ void LLManipRotate::render()
// First pass: centers. Second pass: sides.
for( S32 i=0; i<2; i++ )
{
+
gGL.pushMatrix();
{
if (mHighlightedPart == LL_ROT_Z)
@@ -286,7 +306,7 @@ void LLManipRotate::render()
}
}
gGL.popMatrix();
-
+
gGL.pushMatrix();
{
gGL.rotatef( 90.f, 1.f, 0.f, 0.f );
@@ -328,11 +348,20 @@ void LLManipRotate::render()
{
mManipulatorScales = lerp(mManipulatorScales, LLVector4(1.f, 1.f, 1.f, SELECTED_MANIPULATOR_SCALE), LLCriticalDamp::getInterpolant(MANIPULATOR_SCALE_HALF_LIFE));
}
+
}
+
}
+
+ if (LLGLSLShader::sNoFixedFunction)
+ {
+ gUIProgram.bind();
+ }
+
}
gGL.popMatrix();
gGL.popMatrix();
+
LLVector3 euler_angles;
LLQuaternion object_rot = first_object->getRotationEdit();
--
cgit v1.2.3
From bbac7e9aecf433c1a84515ede954650bd76befbf Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 15 Nov 2011 13:01:23 -0600
Subject: SH-2681 Fix for shader compiler error on GLSL 1.30 and later
---
indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
index fc19f15e02..5b207ab558 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
@@ -150,7 +150,7 @@ float pcfShadow(sampler2DShadow shadowMap, vec4 stc, float scl)
stc.xyz /= stc.w;
stc.z += spot_shadow_bias*scl;
- float cs = shadow2D(shadowMap, stc.xyz);
+ float cs = shadow2D(shadowMap, stc.xyz).x;
float shadow = cs;
vec2 off = 1.5/proj_shadow_res;
--
cgit v1.2.3
From b493b8cca491c4b7a76f4c98b34272970d3bb58b Mon Sep 17 00:00:00 2001
From: Dave Parks
Date: Tue, 15 Nov 2011 13:56:00 -0600
Subject: SH-2652 Fix for linux compile error
---
indra/newview/pipeline.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'indra/newview')
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index af96a042a1..c9e1b44b3f 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -6569,7 +6569,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield)
{ //perform DoF sampling at half-res (preserve alpha channel)
mScreen.bindTarget();
- glViewport(0,0,mScreen.getWidth()*CameraDoFResScale, mScreen.getHeight()*CameraDoFResScale);
+ glViewport(0,0,(GLsizei) (mScreen.getWidth()*CameraDoFResScale), (GLsizei) (mScreen.getHeight()*CameraDoFResScale));
gGL.setColorMask(true, false);
shader = &gDeferredPostProgram;
--
cgit v1.2.3