diff options
| author | Brad Linden <brad@lindenlab.com> | 2024-05-14 13:56:06 -0700 | 
|---|---|---|
| committer | Brad Linden <brad@lindenlab.com> | 2024-05-14 13:56:06 -0700 | 
| commit | 1c2cf6a0f744665eb5c805a77493258712d2c540 (patch) | |
| tree | 91521dad560f5173057b2da5ad3634b0b3e73f93 | |
| parent | 7bfb29687c2e621d3aae9e2794a57dc0168fdf1d (diff) | |
| parent | 31a3423239a1312e430909ad899d60003363541f (diff) | |
Merge branch 'brad/gltf-dev-merge-main-and-featurettes' into project/gltf_development
| -rw-r--r-- | autobuild.xml | 144 | ||||
| -rw-r--r-- | indra/llcommon/llcoros.cpp | 2 | ||||
| -rw-r--r-- | indra/llprimitive/llgltfmaterial.h | 1 | ||||
| -rw-r--r-- | indra/newview/featuretable.txt | 7 | ||||
| -rw-r--r-- | indra/newview/featuretable_mac.txt | 11 | ||||
| -rw-r--r-- | indra/newview/llheroprobemanager.cpp | 73 | ||||
| -rw-r--r-- | indra/newview/llheroprobemanager.h | 2 | ||||
| -rw-r--r-- | indra/newview/llpanelvolume.cpp | 26 | ||||
| -rwxr-xr-x | indra/newview/llviewerregion.cpp | 8 | ||||
| -rw-r--r-- | indra/newview/llvovolume.cpp | 7 | ||||
| -rw-r--r-- | indra/newview/pipeline.cpp | 3 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_tools.xml | 12 | 
12 files changed, 164 insertions, 132 deletions
| diff --git a/autobuild.xml b/autobuild.xml index fa4f118f8e..2cf5496bd0 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -483,18 +483,6 @@        </map>        <key>emoji_shortcodes</key>        <map> -        <key>canonical_repo</key> -        <string>https://github.com/secondlife/3p-emoji-shortcodes</string> -        <key>copyright</key> -        <string>Copyright 2017-2019 Miles Johnson.</string> -        <key>description</key> -        <string>Emoji shortcodes</string> -        <key>license</key> -        <string>MIT</string> -        <key>license_file</key> -        <string>LICENSES/emojibase-license.txt</string> -        <key>name</key> -        <string>emoji_shortcodes</string>          <key>platforms</key>          <map>            <key>darwin64</key> @@ -522,8 +510,20 @@              <string>windows64</string>            </map>          </map> +        <key>license</key> +        <string>MIT</string> +        <key>license_file</key> +        <string>LICENSES/emojibase-license.txt</string> +        <key>copyright</key> +        <string>Copyright 2017-2019 Miles Johnson.</string>          <key>version</key>          <string>6.1.0.579438</string> +        <key>name</key> +        <string>emoji_shortcodes</string> +        <key>canonical_repo</key> +        <string>https://github.com/secondlife/3p-emoji-shortcodes</string> +        <key>description</key> +        <string>Emoji shortcodes</string>        </map>        <key>expat</key>        <map> @@ -617,16 +617,6 @@        </map>        <key>freetype</key>        <map> -        <key>copyright</key> -        <string>Copyright 2006, 2007, 2008, 2009, 2010 by David Turner, Robert Wilhelm, and Werner Lemberg.</string> -        <key>description</key> -        <string>Font rendering library</string> -        <key>license</key> -        <string>FreeType</string> -        <key>license_file</key> -        <string>LICENSES/freetype.txt</string> -        <key>name</key> -        <string>freetype</string>          <key>platforms</key>          <map>            <key>darwin64</key> @@ -672,8 +662,18 @@              <string>windows64</string>            </map>          </map> +        <key>license</key> +        <string>FreeType</string> +        <key>license_file</key> +        <string>LICENSES/freetype.txt</string> +        <key>copyright</key> +        <string>Copyright 2006, 2007, 2008, 2009, 2010 by David Turner, Robert Wilhelm, and Werner Lemberg.</string>          <key>version</key>          <string>2.12.1.557becd</string> +        <key>name</key> +        <string>freetype</string> +        <key>description</key> +        <string>Font rendering library</string>        </map>        <key>glext</key>        <map> @@ -859,18 +859,6 @@        </map>        <key>icu4c</key>        <map> -        <key>canonical_repo</key> -        <string>https://bitbucket.org/lindenlab/3p-icu4c</string> -        <key>copyright</key> -        <string>Copyright (c) 1995-2011 International Business Machines Corporation and others <http://source.icu-project.org></string> -        <key>description</key> -        <string>ICU is a mature, widely used set of C/C++ and Java libraries providing Unicode and Globalization support for software applications. ICU is widely portable and gives applications the same results on all platforms and between C/C++ and Java software.</string> -        <key>license</key> -        <string>ICU, permissive non-copyleft free software license</string> -        <key>license_file</key> -        <string>LICENSES/icu.txt</string> -        <key>name</key> -        <string>icu4c</string>          <key>platforms</key>          <map>            <key>darwin64</key> @@ -902,8 +890,20 @@              <string>windows64</string>            </map>          </map> +        <key>license</key> +        <string>ICU, permissive non-copyleft free software license</string> +        <key>license_file</key> +        <string>LICENSES/icu.txt</string> +        <key>copyright</key> +        <string>Copyright (c) 1995-2011 International Business Machines Corporation and others <http://source.icu-project.org></string>          <key>version</key>          <string>4.8.1-7d08d82</string> +        <key>name</key> +        <string>icu4c</string> +        <key>canonical_repo</key> +        <string>https://bitbucket.org/lindenlab/3p-icu4c</string> +        <key>description</key> +        <string>ICU is a mature, widely used set of C/C++ and Java libraries providing Unicode and Globalization support for software applications. ICU is widely portable and gives applications the same results on all platforms and between C/C++ and Java software.</string>        </map>        <key>jpegencoderbasic</key>        <map> @@ -1389,15 +1389,6 @@        </map>        <key>llca</key>        <map> -        <key>copyright</key> -        <string>Copyright (c) 2016, Linden Research, Inc.; data provided by the Mozilla NSS Project. -      </string> -        <key>license</key> -        <string>mit</string> -        <key>license_file</key> -        <string>LICENSES/ca-license.txt</string> -        <key>name</key> -        <string>llca</string>          <key>platforms</key>          <map>            <key>common</key> @@ -1415,8 +1406,17 @@              <string>common</string>            </map>          </map> +        <key>license</key> +        <string>mit</string> +        <key>license_file</key> +        <string>LICENSES/ca-license.txt</string> +        <key>copyright</key> +        <string>Copyright (c) 2016, Linden Research, Inc.; data provided by the Mozilla NSS Project. +      </string>          <key>version</key>          <string>202402012004.0</string> +        <key>name</key> +        <string>llca</string>        </map>        <key>llphysicsextensions_source</key>        <map> @@ -1786,18 +1786,6 @@        </map>        <key>nanosvg</key>        <map> -        <key>canonical_repo</key> -        <string>https://bitbucket.org/lindenlab/3p-nanosvg</string> -        <key>copyright</key> -        <string>Copyright (c) 2013-14 Mikko Mononen</string> -        <key>description</key> -        <string>NanoSVG is a simple single-header-file SVG parser and rasterizer</string> -        <key>license</key> -        <string>Zlib</string> -        <key>license_file</key> -        <string>LICENSES/nanosvg.txt</string> -        <key>name</key> -        <string>nanosvg</string>          <key>platforms</key>          <map>            <key>darwin64</key> @@ -1837,8 +1825,20 @@              <string>windows64</string>            </map>          </map> +        <key>license</key> +        <string>Zlib</string> +        <key>license_file</key> +        <string>LICENSES/nanosvg.txt</string> +        <key>copyright</key> +        <string>Copyright (c) 2013-14 Mikko Mononen</string>          <key>version</key>          <string>2022.09.27</string> +        <key>name</key> +        <string>nanosvg</string> +        <key>canonical_repo</key> +        <string>https://bitbucket.org/lindenlab/3p-nanosvg</string> +        <key>description</key> +        <string>NanoSVG is a simple single-header-file SVG parser and rasterizer</string>        </map>        <key>nghttp2</key>        <map> @@ -2254,14 +2254,12 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>            <map>              <key>archive</key>              <map> -              <key>creds</key> -              <string>github</string>                <key>hash</key> -              <string>cc7c5bf53f83cff81d874ad66394df0991bd432c</string> +              <string>1e70b06fe6eb9796097010871b32d8e95167e373</string>                <key>hash_algorithm</key>                <string>sha1</string>                <key>url</key> -              <string>https://api.github.com/repos/secondlife/3p-slvoice/releases/assets/108299352</string> +              <string>https://automated-builds-secondlife-com.s3.amazonaws.com/gh/secondlife/3p-slvoice/slvoice-4.10.0000.32327.5fc3fe7c.5942f08-darwin64-5942f08.tar.zst</string>              </map>              <key>name</key>              <string>darwin64</string> @@ -2282,14 +2280,12 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>            <map>              <key>archive</key>              <map> -              <key>creds</key> -              <string>github</string>                <key>hash</key> -              <string>0c205371bb1731a9812b00556037729fdc057cbc</string> +              <string>ddfb7c30d9756915e8b26f44e2ee3a69ee87fb9a</string>                <key>hash_algorithm</key>                <string>sha1</string>                <key>url</key> -              <string>https://api.github.com/repos/secondlife/3p-slvoice/releases/assets/108299356</string> +              <string>https://automated-builds-secondlife-com.s3.amazonaws.com/gh/secondlife/3p-slvoice/slvoice-4.10.0000.32327.5fc3fe7c.5942f08-windows64-5942f08.tar.zst</string>              </map>              <key>name</key>              <string>windows64</string> @@ -2302,7 +2298,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>          <key>copyright</key>          <string>2010 Vivox, including audio coding using Polycom¨ Siren14TM (ITU-T Rec. G.722.1 Annex C)</string>          <key>version</key> -        <string>4.10.0000.32327.5fc3fe7c.571099</string> +        <string>4.10.0000.32327.5fc3fe7c.5942f08</string>          <key>name</key>          <string>slvoice</string>          <key>description</key> @@ -2548,16 +2544,6 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>        </map>        <key>viewer-fonts</key>        <map> -        <key>copyright</key> -        <string>Copyright 2016-2022 Brad Erickson CC-BY-4.0/MIT, Copyright 2016-2022 Twitter, Inc. CC-BY-4.0, Copyright 2013 Joe Loughry and Terence Eden MIT</string> -        <key>description</key> -        <string>Viewer fonts</string> -        <key>license</key> -        <string>Various open source</string> -        <key>license_file</key> -        <string>LICENSES/fonts.txt</string> -        <key>name</key> -        <string>viewer-fonts</string>          <key>platforms</key>          <map>            <key>darwin64</key> @@ -2585,8 +2571,18 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>              <string>windows64</string>            </map>          </map> +        <key>license</key> +        <string>Various open source</string> +        <key>license_file</key> +        <string>LICENSES/fonts.txt</string> +        <key>copyright</key> +        <string>Copyright 2016-2022 Brad Erickson CC-BY-4.0/MIT, Copyright 2016-2022 Twitter, Inc. CC-BY-4.0, Copyright 2013 Joe Loughry and Terence Eden MIT</string>          <key>version</key>          <string>1.579464</string> +        <key>name</key> +        <string>viewer-fonts</string> +        <key>description</key> +        <string>Viewer fonts</string>        </map>        <key>viewer-manager</key>        <map> diff --git a/indra/llcommon/llcoros.cpp b/indra/llcommon/llcoros.cpp index 219c65fbb8..23b30bcc57 100644 --- a/indra/llcommon/llcoros.cpp +++ b/indra/llcommon/llcoros.cpp @@ -140,7 +140,7 @@ LLCoros::LLCoros():      // Previously we used      // boost::context::guarded_stack_allocator::default_stacksize();      // empirically this is insufficient. -    mStackSize(900*1024), +    mStackSize(1024*1024),      // mCurrent does NOT own the current CoroData instance -- it simply      // points to it. So initialize it with a no-op deleter.      mCurrent{ [](CoroData*){} } diff --git a/indra/llprimitive/llgltfmaterial.h b/indra/llprimitive/llgltfmaterial.h index 1b0ab19f71..23a39593cf 100644 --- a/indra/llprimitive/llgltfmaterial.h +++ b/indra/llprimitive/llgltfmaterial.h @@ -125,7 +125,6 @@ public:      //       heightmaps cannot currently be described as finite enclosed      //       volumes.      // See also LLPanelRegionTerrainInfo::validateMaterials -  public:      // get a UUID based on a hash of this LLGLTFMaterial diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index 3e1e235fcd..8950770172 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -75,6 +75,7 @@ RenderGLMultiThreadedTextures      1   0  RenderGLMultiThreadedMedia         1   1  RenderReflectionProbeResolution 1 128  RenderScreenSpaceReflections 1  1 +RenderMirrors				1	1  // @@ -251,8 +252,8 @@ RenderReflectionsEnabled    1   1  RenderReflectionProbeDetail	1	1  RenderScreenSpaceReflections 1  0  RenderReflectionProbeLevel  1   3 -RenderMirrors				1	0 -RenderHeroProbeResolution	1	1024 +RenderMirrors				1	1 +RenderHeroProbeResolution	1	512  RenderHeroProbeDistance		1	8  RenderHeroProbeUpdateRate	1	2  RenderHeroProbeConservativeUpdateMultiplier 1 8 @@ -287,7 +288,7 @@ RenderReflectionsEnabled    1   1  RenderReflectionProbeDetail	1	1  RenderScreenSpaceReflections 1  0  RenderReflectionProbeLevel  1   3 -RenderMirrors				1	0 +RenderMirrors				1	1  RenderHeroProbeResolution	1	1024  RenderHeroProbeDistance		1	16  RenderHeroProbeUpdateRate	1	1 diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index 2ffefadcc1..8c71235f37 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -74,6 +74,7 @@ RenderReflectionsEnabled    1   1  RenderReflectionProbeDetail	1	2  RenderScreenSpaceReflections 1  1  RenderReflectionProbeLevel  1   3 +RenderMirrors				1	1  //  // Low Graphics Settings @@ -249,8 +250,8 @@ RenderReflectionsEnabled    1   1  RenderReflectionProbeDetail	1	1  RenderScreenSpaceReflections 1  0  RenderReflectionProbeLevel  1   1 -RenderMirrors				1	0 -RenderHeroProbeResolution	1	1024 +RenderMirrors				1	1 +RenderHeroProbeResolution	1	512  RenderHeroProbeDistance		1	8  RenderHeroProbeUpdateRate	1	2  RenderHeroProbeConservativeUpdateMultiplier 1 8 @@ -285,8 +286,8 @@ RenderReflectionsEnabled    1   1  RenderReflectionProbeDetail	1	1  RenderScreenSpaceReflections 1  0  RenderReflectionProbeLevel  1   2 -RenderMirrors				1	0 -RenderHeroProbeResolution	1	1024 +RenderMirrors				1	1 +RenderHeroProbeResolution	1	512  RenderHeroProbeDistance		1	16  RenderHeroProbeUpdateRate	1	1  RenderHeroProbeConservativeUpdateMultiplier 1 4 @@ -322,7 +323,7 @@ RenderReflectionProbeDetail	1	1  RenderScreenSpaceReflections 1  0  RenderReflectionProbeLevel  1   3  RenderMirrors				1	1 -RenderHeroProbeResolution	1	2048 +RenderHeroProbeResolution	1	1024  RenderHeroProbeDistance		1	16  RenderHeroProbeUpdateRate	1	1  RenderHeroProbeConservativeUpdateMultiplier 1 4 diff --git a/indra/newview/llheroprobemanager.cpp b/indra/newview/llheroprobemanager.cpp index cd7ee4736a..af66867e7c 100644 --- a/indra/newview/llheroprobemanager.cpp +++ b/indra/newview/llheroprobemanager.cpp @@ -113,22 +113,40 @@ void LLHeroProbeManager::update()      LLVector4a probe_pos;      LLVector3 camera_pos = LLViewerCamera::instance().mOrigin;      F32        near_clip  = 0.1f; +    bool       probe_present = false; +    LLQuaternion cameraOrientation = LLViewerCamera::instance().getQuaternion(); +    LLVector3    cameraDirection   = LLVector3::z_axis * cameraOrientation; +      if (mHeroVOList.size() > 0)      {          // Find our nearest hero candidate. -          float last_distance = 99999.f; - +        float camera_center_distance = 99999.f;          for (auto vo : mHeroVOList)          {              if (vo && !vo->isDead() && vo->mDrawable.notNull())              {                  float distance = (LLViewerCamera::instance().getOrigin() - vo->getPositionAgent()).magVec(); -                if (distance < last_distance) +                float center_distance = cameraDirection * (vo->getPositionAgent() - camera_pos); + +                if (distance > LLViewerCamera::instance().getFar()) +					continue; + +                LLVector4a center; +                center.load3(vo->getPositionAgent().mV); +                LLVector4a size; + +                size.load3(vo->getScale().mV); + +                bool visible = LLViewerCamera::instance().AABBInFrustum(center, size); + +                if (distance < last_distance && center_distance < camera_center_distance && visible)                  { -                    mNearestHero = vo; -                    last_distance = distance; -                } +					probe_present = true; +					mNearestHero = vo; +					last_distance = distance; +                    camera_center_distance = center_distance; +				}              }              else              { @@ -136,6 +154,10 @@ void LLHeroProbeManager::update()              }          } +        // Don't even try to do anything if we didn't find a single mirror present. +        if (!probe_present) +            return; +          if (mNearestHero != nullptr && !mNearestHero->isDead() && mNearestHero->mDrawable.notNull())          {              LLVector3 hero_pos = mNearestHero->getPositionAgent(); @@ -152,14 +174,12 @@ void LLHeroProbeManager::update()              mCurrentClipPlane.setVec(hero_pos, face_normal);              mMirrorPosition = hero_pos;              mMirrorNormal   = face_normal; -                      probe_pos.load3(point.mV); -            // Collect the list of faces that need updating based upon the camera's rotation. -            LLVector3 cam_direction = LLVector3(0, 0, 1) * LLViewerCamera::instance().getQuaternion(); -            cam_direction.normalize(); +            // Detect visible faces of a cube based on camera direction and distance +            // Define the cube faces              static LLVector3 cubeFaces[6] = {                   LLVector3(1, 0, 0),                   LLVector3(-1, 0, 0), @@ -169,17 +189,21 @@ void LLHeroProbeManager::update()                  LLVector3(0, 0, -1)              }; +            // Iterate through each face of the cube              for (int i = 0; i < 6; i++)              { -                float shouldUpdate = fminf(1, (fmaxf(-1, cam_direction * cubeFaces[i]) * 0.5 + 0.5)); -                 -                int updateRate = ceilf((1 - shouldUpdate) * gPipeline.RenderHeroProbeConservativeUpdateMultiplier); -                 -                // Chances are this is a face that's non-visible to the camera when it's being reflected. -                // Set it to 0.  It will be skipped below. -                if (updateRate == gPipeline.RenderHeroProbeConservativeUpdateMultiplier) +                float cube_facing = fmax(-1, fmin(1.0f, cameraDirection * cubeFaces[i])) * 0.6 + 0.4; +                     +                float updateRate; +                if (cube_facing < 0.1f) +                {                      updateRate = 0; -                 +                } +                else +                { +                    updateRate = ceilf(cube_facing * gPipeline.RenderHeroProbeConservativeUpdateMultiplier); +                } +                  mFaceUpdateList[i] = updateRate;              }          } @@ -199,6 +223,7 @@ void LLHeroProbeManager::update()      static LLCachedControl<S32> sDetail(gSavedSettings, "RenderHeroReflectionProbeDetail", -1);      static LLCachedControl<S32> sLevel(gSavedSettings, "RenderHeroReflectionProbeLevel", 3); +    if (mNearestHero != nullptr)      {          LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("hpmu - realtime");          // Probe 0 is always our mirror probe. @@ -208,13 +233,16 @@ void LLHeroProbeManager::update()          gPipeline.mReflectionMapManager.mRadiancePass = true;          mRenderingMirror = true; + +        doOcclusion(); +          for (U32 j = 0; j < mProbes.size(); j++)          {              for (U32 i = 0; i < 6; ++i)              {                  if (mFaceUpdateList[i] > 0 && mCurrentProbeUpdateFrame % mFaceUpdateList[i] == 0)                  { -                    updateProbeFace(mProbes[j], i, near_clip); +                    updateProbeFace(mProbes[j], i, mNearestHero->getReflectionProbeIsDynamic() && sDetail > 0, near_clip);                      mCurrentProbeUpdateFrame = 0;                  }              } @@ -239,18 +267,17 @@ void LLHeroProbeManager::update()  // The next six passes render the scene with both radiance and irradiance into the same scratch space cube map and generate a simple mip chain.  // At the end of these passes, a radiance map is generated for this probe and placed into the radiance cube map array at the index for this probe.  // In effect this simulates single-bounce lighting. -void LLHeroProbeManager::updateProbeFace(LLReflectionMap* probe, U32 face, F32 near_clip) +void LLHeroProbeManager::updateProbeFace(LLReflectionMap* probe, U32 face, bool is_dynamic, F32 near_clip)  {      // hacky hot-swap of camera specific render targets      gPipeline.mRT = &gPipeline.mHeroProbeRT; -    probe->update(mRenderTarget.getWidth(), face, true, near_clip); +    probe->update(mRenderTarget.getWidth(), face, is_dynamic, near_clip);      gPipeline.mRT = &gPipeline.mMainRT;      S32 sourceIdx = mReflectionProbeCount; -          // Unlike the reflectionmap manager, all probes are considered "realtime" for hero probes.      sourceIdx += 1; @@ -371,8 +398,6 @@ void LLHeroProbeManager::generateRadiance(LLReflectionMap* probe)          static LLStaticHashedString sSourceIdx("sourceIdx");          { - -              // generate radiance map (even if this is not the irradiance map, we need the mip chain for the irradiance map)              gHeroRadianceGenProgram.bind();              mVertexBuffer->setBuffer(); diff --git a/indra/newview/llheroprobemanager.h b/indra/newview/llheroprobemanager.h index d5e720e8e8..5df146f2f1 100644 --- a/indra/newview/llheroprobemanager.h +++ b/indra/newview/llheroprobemanager.h @@ -116,7 +116,7 @@ private:      // update the specified face of the specified probe -    void updateProbeFace(LLReflectionMap* probe, U32 face, F32 near_clip); +    void updateProbeFace(LLReflectionMap* probe, U32 face, bool is_dynamic, F32 near_clip);      void generateRadiance(LLReflectionMap *probe);      // list of active reflection maps diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index ac7bf0c2dc..ee0b001843 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -424,19 +424,21 @@ void LLPanelVolume::getState( )              volume_type = "Sphere";          } -		std::string update_type; -        if (volobjp->getReflectionProbeIsDynamic()) + +		std::string update_type = "Static"; + +        if (volobjp->getReflectionProbeIsDynamic() && !volobjp->getReflectionProbeIsMirror())          {              update_type = "Dynamic";          } -        else if (volobjp->getReflectionProbeIsMirror()) +        else if (volobjp->getReflectionProbeIsMirror() && !volobjp->getReflectionProbeIsDynamic())          {              update_type = "Mirror";          } -        else -        { -            update_type = "Static"; +        else if (volobjp->getReflectionProbeIsDynamic() && volobjp->getReflectionProbeIsMirror()) +		{ +			update_type = "Dynamic Mirror";  		}          getChildView("Probe Ambiance")->setEnabled(update_type != "Mirror"); @@ -1200,6 +1202,7 @@ void LLPanelVolume::onCopyLight()          clipboard["reflection_probe"]["ambiance"] = volobjp->getReflectionProbeAmbiance();          clipboard["reflection_probe"]["near_clip"] = volobjp->getReflectionProbeNearClip();          clipboard["reflection_probe"]["dynamic"] = volobjp->getReflectionProbeIsDynamic(); +        clipboard["reflection_probe"]["mirror"]    = volobjp->getReflectionProbeIsMirror();      }      mClipboardParams["light"] = clipboard; @@ -1257,6 +1260,7 @@ void LLPanelVolume::onPasteLight()              volobjp->setReflectionProbeAmbiance((F32)clipboard["reflection_probe"]["ambiance"].asReal());              volobjp->setReflectionProbeNearClip((F32)clipboard["reflection_probe"]["near_clip"].asReal());              volobjp->setReflectionProbeIsDynamic(clipboard["reflection_probe"]["dynamic"].asBoolean()); +            volobjp->setReflectionProbeIsMirror(clipboard["reflection_probe"]["mirror"].asBoolean());          }          else          { @@ -1428,11 +1432,13 @@ void LLPanelVolume::onCommitProbe(LLUICtrl* ctrl, void* userdata)      std::string update_type = self->getChild<LLUICtrl>("Probe Update Type")->getValue().asString(); -	volobjp->setReflectionProbeIsDynamic(update_type == "Dynamic"); -    volobjp->setReflectionProbeIsMirror(update_type == "Mirror"); +	bool is_mirror = update_type.find("Mirror") != std::string::npos; + +	volobjp->setReflectionProbeIsDynamic(update_type.find("Dynamic") != std::string::npos); +    volobjp->setReflectionProbeIsMirror(is_mirror); -    self->getChildView("Probe Ambiance")->setEnabled(update_type != "Mirror"); -    self->getChildView("Probe Near Clip")->setEnabled(update_type != "Mirror"); +    self->getChildView("Probe Ambiance")->setEnabled(!is_mirror); +    self->getChildView("Probe Near Clip")->setEnabled(!is_mirror);      std::string shape_type = self->getChild<LLUICtrl>("Probe Volume Type")->getValue().asString(); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 8b5ffcb5e9..6668384f52 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -2466,14 +2466,6 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features)                  gSavedSettings.setS32("max_texture_dimension_Y", 1024);              } -            bool mirrors_enabled = false; -            if (features.has("MirrorsEnabled")) -            { -                mirrors_enabled = features["MirrorsEnabled"].asBoolean(); -            } - -            gSavedSettings.setBOOL("RenderMirrors", mirrors_enabled); -              if (features.has("PBRTerrainEnabled"))              {                  bool enabled = features["PBRTerrainEnabled"]; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 78df9aa9cf..a4835849eb 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -3422,8 +3422,15 @@ bool LLVOVolume::setReflectionProbeIsMirror(bool is_mirror)      {          if (param_block->getIsMirror() != is_mirror)          { +            LL_INFOS() << "Setting reflection probe mirror to " << is_mirror << LL_ENDL;              param_block->setIsMirror(is_mirror);              parameterChanged(LLNetworkData::PARAMS_REFLECTION_PROBE, true); + +			if (!is_mirror) +				gPipeline.mHeroProbeManager.unregisterViewerObject(this); +			else +				gPipeline.mHeroProbeManager.registerViewerObject(this); +              return true;          }      } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 66797cd127..d17bb904cf 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2268,7 +2268,8 @@ static LLTrace::BlockTimerStatHandle FTM_CULL("Object Culling");  // static  bool LLPipeline::isWaterClip()  { -	return (!sRenderTransparentWater || gCubeSnapshot) && !sRenderingHUDs; +    // We always pretend that we're not clipping water when rendering mirrors. +	return (gPipeline.mHeroProbeManager.isMirrorPass()) ? false : (!sRenderTransparentWater || gCubeSnapshot) && !sRenderingHUDs;  }  void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result) diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 3ee4a354d4..e43143c8c3 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -2549,7 +2549,7 @@ even though the user gets a free copy.  			   follows="left|top"  			   name="Probe Volume Type"  			   tool_tip="Choose the probe influence volume" -			   width="108"> +			   width="140">              <combo_box.item               label="Sphere"               name="Sphere" @@ -2589,8 +2589,8 @@ even though the user gets a free copy.           left="144"  			   follows="left|top"  			   name="Probe Update Type" -			   tool_tip="Determines how the probe updates.  Static updates the slowest and without avatars.  Dynamic updates more frequently, with avatars visible in the probes.  Mirror turns this probe into a realtime planar projected mirror probe, but does not calculate ambiance." -			   width="108"> +			   tool_tip="Determines how the probe updates.  Static updates the slowest and without avatars.  Dynamic updates more frequently, with avatars visible in the probes.  Mirror (Environment) turns this probe into a realtime planar projected probe that only reflects the environment, but does not calculate ambiance.  Mirror (Everything) is similar to Mirror (Environment), but it reflects particles and avatars." +			   width="140">              <combo_box.item               label="Static"               name="Static" @@ -2600,9 +2600,13 @@ even though the user gets a free copy.               name="Dynamic"               value="Dynamic"/>              <combo_box.item -             label="Mirror" +             label="Mirror (Environment)"               name="Mirror"               value="Mirror"/> +            <combo_box.item +             label="Mirror (Everything)" +             name="Dynamic Mirror" +             value="Dynamic Mirror"/>            </combo_box>            <spinner bottom_delta="17"                     decimal_digits="3" | 
