From c51608633ddfdcf9a053fff37461059398ed4500 Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Wed, 1 Dec 2010 16:02:43 -0800 Subject: CHOP-238 Fix to bug introduced by http://hg.secondlife.com/viewer-beta/changeset/4072bd5389b2 Reviewed by Brad --- indra/newview/llappviewer.cpp | 2 +- indra/newview/lllogininstance.cpp | 2 +- indra/newview/llversioninfo.cpp | 6 +++--- indra/newview/llversioninfo.h | 4 ++-- indra/newview/llviewerstats.cpp | 2 +- indra/newview/tests/lllogininstance_test.cpp | 2 +- indra/newview/tests/llversioninfo_test.cpp | 12 ++++++------ 7 files changed, 15 insertions(+), 15 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index b6f52e3e15..6c07974f69 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -906,7 +906,7 @@ bool LLAppViewer::init() // Save the current version to the prefs file gSavedSettings.setString("LastRunVersion", - LLVersionInfo::getVersionAndChannel()); + LLVersionInfo::getChannelAndVersion()); gSimLastTime = gRenderStartTime.getElapsedTimeF32(); gSimFrames = (F32)gFrameCount; diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 83a8134580..52ce932241 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -183,7 +183,7 @@ void LLLoginInstance::constructAuthParams(LLPointer user_credentia request_params["read_critical"] = false; // handleTOSResponse request_params["last_exec_event"] = mLastExecEvent; request_params["mac"] = hashed_unique_id_string; - request_params["version"] = LLVersionInfo::getVersionAndChannel(); // Includes channel name + request_params["version"] = LLVersionInfo::getChannelAndVersion(); // Includes channel name request_params["channel"] = LLVersionInfo::getChannel(); request_params["id0"] = mSerialNumber; diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp index 53994c68f2..673d0c24cf 100644 --- a/indra/newview/llversioninfo.cpp +++ b/indra/newview/llversioninfo.cpp @@ -108,15 +108,15 @@ namespace } //static -const std::string &LLVersionInfo::getVersionAndChannel() +const std::string &LLVersionInfo::getChannelAndVersion() { if (sVersionChannel.empty()) { // cache the version string std::ostringstream stream; - stream << LLVersionInfo::getVersion() + stream << LLVersionInfo::getChannel() << " " - << LLVersionInfo::getChannel(); + << LLVersionInfo::getVersion(); sVersionChannel = stream.str(); } diff --git a/indra/newview/llversioninfo.h b/indra/newview/llversioninfo.h index 36defbcd68..6f64544f3b 100644 --- a/indra/newview/llversioninfo.h +++ b/indra/newview/llversioninfo.h @@ -59,8 +59,8 @@ public: static const std::string &getShortVersion(); /// return the viewer version and channel as a string - /// like "2.0.0.200030 Second Life Release" - static const std::string &getVersionAndChannel(); + /// like "Second Life Release 2.0.0.200030" + static const std::string &getChannelAndVersion(); /// return the channel name, e.g. "Second Life" static const std::string &getChannel(); diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 402f00c5e7..546ee9a334 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -750,7 +750,7 @@ void send_stats() // send fps only for time app spends in foreground agent["fps"] = (F32)gForegroundFrameCount / gForegroundTime.getElapsedTimeF32(); - agent["version"] = LLVersionInfo::getVersionAndChannel(); + agent["version"] = LLVersionInfo::getChannelAndVersion(); std::string language = LLUI::getLanguage(); agent["language"] = language; diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index b902c7ab09..309e9e9ee3 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -181,7 +181,7 @@ void LLUIColorTable::saveUserSettings(void)const {} //----------------------------------------------------------------------------- #include "../llversioninfo.h" -const std::string &LLVersionInfo::getVersionAndChannel() { return VIEWERLOGIN_VERSION_CHANNEL; } +const std::string &LLVersionInfo::getChannelAndVersion() { return VIEWERLOGIN_VERSION_CHANNEL; } const std::string &LLVersionInfo::getChannel() { return VIEWERLOGIN_CHANNEL; } //----------------------------------------------------------------------------- diff --git a/indra/newview/tests/llversioninfo_test.cpp b/indra/newview/tests/llversioninfo_test.cpp index 8855a24ead..398d8f16ed 100644 --- a/indra/newview/tests/llversioninfo_test.cpp +++ b/indra/newview/tests/llversioninfo_test.cpp @@ -51,15 +51,15 @@ namespace tut mShortVersion = stream.str(); stream.str(""); - stream << mVersion + stream << LL_CHANNEL << " " - << LL_CHANNEL; + << mVersion; mVersionAndChannel = stream.str(); stream.str(""); - stream << mVersion + stream << mResetChannel << " " - << mResetChannel; + << mVersion; mResetVersionAndChannel = stream.str(); } std::string mResetChannel; @@ -99,7 +99,7 @@ namespace tut LLVersionInfo::getShortVersion(), mShortVersion); ensure_equals("Version and channel String", - LLVersionInfo::getVersionAndChannel(), + LLVersionInfo::getChannelAndVersion(), mVersionAndChannel); LLVersionInfo::resetChannel(mResetChannel); @@ -108,7 +108,7 @@ namespace tut mResetChannel); ensure_equals("Reset Version and channel String", - LLVersionInfo::getVersionAndChannel(), + LLVersionInfo::getChannelAndVersion(), mResetVersionAndChannel); } } -- cgit v1.2.3 From 039c0466f9759d7b966d8faf60945b3924d017a8 Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Thu, 2 Dec 2010 11:40:54 -0800 Subject: CHOP-240 Fix for incorrect use of std:multimap iterators. Rev. by Alain. --- indra/newview/llremoteparcelrequest.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llremoteparcelrequest.cpp b/indra/newview/llremoteparcelrequest.cpp index 10d4452ed2..0dff087553 100644 --- a/indra/newview/llremoteparcelrequest.cpp +++ b/indra/newview/llremoteparcelrequest.cpp @@ -78,10 +78,11 @@ void LLRemoteParcelRequestResponder::error(U32 status, const std::string& reason void LLRemoteParcelInfoProcessor::addObserver(const LLUUID& parcel_id, LLRemoteParcelInfoObserver* observer) { observer_multimap_t::iterator it; + observer_multimap_t::iterator start = mObservers.lower_bound(parcel_id); observer_multimap_t::iterator end = mObservers.upper_bound(parcel_id); // Check if the observer is already in observers list for this UUID - for(it = mObservers.find(parcel_id); it != end; ++it) + for(it = start; it != end; ++it) { if (it->second.get() == observer) { @@ -100,9 +101,10 @@ void LLRemoteParcelInfoProcessor::removeObserver(const LLUUID& parcel_id, LLRemo } observer_multimap_t::iterator it; + observer_multimap_t::iterator start = mObservers.lower_bound(parcel_id); observer_multimap_t::iterator end = mObservers.upper_bound(parcel_id); - for(it = mObservers.find(parcel_id); it != end; ++it) + for(it = start; it != end; ++it) { if (it->second.get() == observer) { @@ -139,9 +141,10 @@ void LLRemoteParcelInfoProcessor::processParcelInfoReply(LLMessageSystem* msg, v deadlist_t dead_iters; observer_multimap_t::iterator oi; + observer_multimap_t::iterator start = observers.lower_bound(parcel_data.parcel_id); observer_multimap_t::iterator end = observers.upper_bound(parcel_data.parcel_id); - for (oi = observers.find(parcel_data.parcel_id); oi != end; ++oi) + for (oi = start; oi != end; ++oi) { LLRemoteParcelInfoObserver * observer = oi->second.get(); if(observer) -- cgit v1.2.3 From 5d7fe43f64e904d5873d6c2f6e53b90e82753c7b Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 3 Dec 2010 02:40:25 -0600 Subject: Add CameraCoCRatio to make DoF depending on screen resolution. --- indra/newview/app_settings/settings.xml | 14 +++++++++++++- indra/newview/pipeline.cpp | 3 ++- 2 files changed, 15 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index ef3803aed6..10799a6ed8 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1380,7 +1380,19 @@ 0.05 - + CameraCoCRatio + + Comment + Ratio of circle of confusion to vertical resolution for DoF effect. + Persist + 1 + Type + F32 + Value + 54 + + + CertStore Comment diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 31200675fc..717c97c6d4 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -6161,8 +6161,9 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) subject_distance *= 1000.f; F32 fnumber = gSavedSettings.getF32("CameraFNumber"); F32 focal_length = gSavedSettings.getF32("CameraFocalLength"); - F32 coc = gSavedSettings.getF32("CameraCoC"); + F32 coc_ratio = gSavedSettings.getF32("CameraCoCRatio"); + F32 coc = coc_ratio/mScreen.getHeight(); F32 hyperfocal_distance = (focal_length*focal_length)/(fnumber*coc); -- cgit v1.2.3 From ec9ba94b69e259347f71fbbcec2f0f8fe43a47a7 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 3 Dec 2010 03:52:57 -0600 Subject: DoF tweaks -- halo hiding, etc. --- .../shaders/class1/deferred/postDeferredF.glsl | 14 +++++++++----- indra/newview/pipeline.cpp | 5 ++--- 2 files changed, 11 insertions(+), 8 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 77e3e41ea4..02712e0a5b 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl @@ -73,12 +73,14 @@ void main() { //pixel is behind far focal plane float w = 1.0; - float fd = far_focal_distance; + float fd = (depth[0]-far_focal_distance)*0.5+far_focal_distance; float sc = far_focal_distance - depth[0]; - sc /= -far_focal_distance; + sc /= near_focal_distance-far_focal_distance; + + sc = sqrt(sc); sc = min(sc, 8.0); - + while (sc > 1.0) { dofSample(diff,w, fd, sc,sc); @@ -104,8 +106,10 @@ void main() { //pixel is in front of near focal plane //diff.r = 1.0; float w = 1.0; - float sc = depth[0] - fd; - sc = min(-sc/fd*16.0, 8.0); + float sc = near_focal_distance-depth[0]; + sc /= near_focal_distance; + sc *= 8.0; + sc = min(sc, 8.0); fd = depth[0]; while (sc > 1.0) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index fa156c85e3..f0446b024c 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -6174,8 +6174,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) //adjust focal length for zoom F32 fov = LLViewerCamera::getInstance()->getView(); - F32 default_fov = LLViewerCamera::getInstance()->getDefaultFOV(); - focal_length *= default_fov/fov; + focal_length *= 1.f/fov; F32 near_focal_distance = hyperfocal_distance*subject_distance/(hyperfocal_distance+subject_distance); @@ -6197,7 +6196,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) if (channel > -1) { mScreen.bindTexture(0, channel); - gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR); + gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT); } gGL.begin(LLRender::TRIANGLE_STRIP); -- cgit v1.2.3 From 6cfb2c81a82693789da582492418efecf628e426 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 3 Dec 2010 15:30:00 -0600 Subject: Get rid of CameraCoC and adjust focal length and fnumber for every day use. --- indra/newview/app_settings/settings.xml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 10799a6ed8..4e5ad60513 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1353,7 +1353,7 @@ Type F32 Value - 8.0 + 11.0 CameraFocalLength @@ -1365,19 +1365,7 @@ Type F32 Value - 50 - - - CameraCoC - - Comment - Camera circle of confusion for DoF effect (in millimeters) - Persist - 1 - Type - F32 - Value - 0.05 + 35 CameraCoCRatio -- cgit v1.2.3 From c29203f3f33184b05676db413f936eaff41eab74 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 3 Dec 2010 16:36:51 -0500 Subject: Fix for clobbered deferred rendering UI. Fix for compile errors from llappviewer.cpp merge. --- indra/newview/llappviewer.cpp | 2 +- .../skins/default/xui/en/panel_preferences_graphics1.xml | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 03d3a3a180..29ffcdfbd1 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -909,7 +909,7 @@ bool LLAppViewer::init() gDebugInfo["GraphicsCard"] = LLFeatureManager::getInstance()->getGPUString(); // Save the current version to the prefs file - gSavedSettings.setString("LastRunVersion", LLVersionInfo::getVersionAndChannel()); + gSavedSettings.setString("LastRunVersion", LLVersionInfo::getChannelAndVersion()); gSimLastTime = gRenderStartTime.getElapsedTimeF32(); diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index 6573822d1a..d5bec66be2 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -192,9 +192,19 @@ layout="topleft" left_delta="0" name="BumpShiny" + width="256" /> + - + - + Date: Fri, 3 Dec 2010 16:52:23 -0500 Subject: Fix for overlapping UI elements in panel_preferences_graphics1 due to bad merge. --- indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index d5bec66be2..70db3c6592 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -192,6 +192,7 @@ layout="topleft" left_delta="0" name="BumpShiny" + top_pad="1" width="256" />