diff --git a/.github/workflows/cla.yaml b/.github/workflows/cla.yaml index 013adc9ca8..7866f943b5 100644 --- a/.github/workflows/cla.yaml +++ b/.github/workflows/cla.yaml @@ -23,4 +23,4 @@ jobs: path-to-signatures: signatures.json remote-organization-name: secondlife remote-repository-name: cla-signatures - allowlist: callum@mbp.localdomain + allowlist: callum@mbp.localdomain,rye@lindenlab.com diff --git a/indra/llrender/llfontbitmapcache.cpp b/indra/llrender/llfontbitmapcache.cpp index 83f5d31186..6a3af1e608 100644 --- a/indra/llrender/llfontbitmapcache.cpp +++ b/indra/llrender/llfontbitmapcache.cpp @@ -141,6 +141,7 @@ bool LLFontBitmapCache::nextOpenPos(S32 width, S32& pos_x, S32& pos_y, EFontGlyp bitmap_num = getNumBitmaps(bitmap_type) - 1; mCurrentOffsetX[bitmap_idx] += width + 1; + mGeneration++; return true; } @@ -168,6 +169,7 @@ void LLFontBitmapCache::reset() mBitmapWidth = 0; mBitmapHeight = 0; + mGeneration++; } //static diff --git a/indra/llrender/llfontbitmapcache.h b/indra/llrender/llfontbitmapcache.h index f2dfd87877..0ae4e6bed0 100644 --- a/indra/llrender/llfontbitmapcache.h +++ b/indra/llrender/llfontbitmapcache.h @@ -63,6 +63,7 @@ public: U32 getNumBitmaps(EFontGlyphType bitmapType) const { return (bitmapType < EFontGlyphType::Count) ? static_cast(mImageRawVec[static_cast(bitmapType)].size()) : 0U; } S32 getBitmapWidth() const { return mBitmapWidth; } S32 getBitmapHeight() const { return mBitmapHeight; } + S32 getCacheGeneration() const { return mGeneration; } protected: static U32 getNumComponents(EFontGlyphType bitmap_type); @@ -74,6 +75,7 @@ private: S32 mCurrentOffsetY[static_cast(EFontGlyphType::Count)] = { 1 }; S32 mMaxCharWidth = 0; S32 mMaxCharHeight = 0; + S32 mGeneration = 0; std::vector> mImageRawVec[static_cast(EFontGlyphType::Count)]; std::vector> mImageGLVec[static_cast(EFontGlyphType::Count)]; }; diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp index 90e378c20f..30c10a8a6d 100644 --- a/indra/llrender/llfontfreetype.cpp +++ b/indra/llrender/llfontfreetype.cpp @@ -149,7 +149,6 @@ LLFontFreetype::LLFontFreetype() mIsFallback(false), mFTFace(NULL), mRenderGlyphCount(0), - mAddGlyphCount(0), mStyle(0), mPointSize(0) { @@ -671,7 +670,6 @@ LLFontGlyphInfo* LLFontFreetype::addGlyphFromFont(const LLFontFreetype *fontp, l S32 pos_x, pos_y; U32 bitmap_num; mFontBitmapCachep->nextOpenPos(width, pos_x, pos_y, bitmap_glyph_type, bitmap_num); - mAddGlyphCount++; LLFontGlyphInfo* gi = new LLFontGlyphInfo(glyph_index, requested_glyph_type); gi->mXBitmapOffset = pos_x; diff --git a/indra/llrender/llfontfreetype.h b/indra/llrender/llfontfreetype.h index 573e0923b4..80cc0b2642 100644 --- a/indra/llrender/llfontfreetype.h +++ b/indra/llrender/llfontfreetype.h @@ -166,7 +166,6 @@ public: void setStyle(U8 style); U8 getStyle() const; - S32 getAddedGlyphs() const { return mAddGlyphCount; } private: void resetBitmapCache(); @@ -206,7 +205,6 @@ private: mutable LLFontBitmapCache* mFontBitmapCachep; mutable S32 mRenderGlyphCount; - mutable S32 mAddGlyphCount; // Save X-kerning data, so far only for all glyphs with index small than 256 (to not waste too much memory) // right now it is 256 slots with 256 glyphs each, maybe consider splitting it into smaller slices to use less memory if we diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index d42a3c635a..eaedf670f4 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -110,9 +110,10 @@ S32 LLFontGL::getNumFaces(const std::string& filename) return mFontFreetype->getNumFaces(filename); } -S32 LLFontGL::getKnownGlyphCount() const +S32 LLFontGL::getCacheGeneration() const { - return mFontFreetype ? mFontFreetype->getAddedGlyphs() : 0; + const LLFontBitmapCache* font_bitmap_cache = mFontFreetype->getFontBitmapCache(); + return font_bitmap_cache->getCacheGeneration(); } S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, const LLRect& rect, const LLColor4 &color, HAlign halign, VAlign valign, U8 style, diff --git a/indra/llrender/llfontgl.h b/indra/llrender/llfontgl.h index f9db3efe78..ae8128e494 100644 --- a/indra/llrender/llfontgl.h +++ b/indra/llrender/llfontgl.h @@ -90,7 +90,7 @@ public: bool loadFace(const std::string& filename, F32 point_size, const F32 vert_dpi, const F32 horz_dpi, bool is_fallback, S32 face_n); S32 getNumFaces(const std::string& filename); - S32 getKnownGlyphCount() const; + S32 getCacheGeneration() const; S32 render(const LLWString &text, S32 begin_offset, const LLRect& rect, diff --git a/indra/llrender/llfontvertexbuffer.cpp b/indra/llrender/llfontvertexbuffer.cpp index b53a841a87..a223509d30 100644 --- a/indra/llrender/llfontvertexbuffer.cpp +++ b/indra/llrender/llfontvertexbuffer.cpp @@ -148,7 +148,7 @@ S32 LLFontVertexBuffer::render( || mLastHorizDPI != LLFontGL::sHorizDPI || mLastOrigin != LLFontGL::sCurOrigin || mLastResGeneration != LLFontGL::sResolutionGeneration - || mLastFontGlyphCount != fontp->getKnownGlyphCount()) + || mLastFontCacheGen != fontp->getCacheGeneration()) { genBuffers(fontp, text, begin_offset, x, y, color, halign, valign, style, shadow, max_chars, max_pixels, right_x, use_ellipses, use_color); @@ -180,6 +180,9 @@ void LLFontVertexBuffer::genBuffers( { // todo: add a debug build assert if this triggers too often for to long? mBufferList.clear(); + // Save before rendreing, it can change mid-render, + // so will need to rerender previous characters + mLastFontCacheGen = fontp->getCacheGeneration(); gGL.beginList(&mBufferList); mChars = fontp->render(text, begin_offset, x, y, color, halign, valign, @@ -204,7 +207,6 @@ void LLFontVertexBuffer::genBuffers( mLastHorizDPI = LLFontGL::sHorizDPI; mLastOrigin = LLFontGL::sCurOrigin; mLastResGeneration = LLFontGL::sResolutionGeneration; - mLastFontGlyphCount = fontp->getKnownGlyphCount(); if (right_x) { diff --git a/indra/llrender/llfontvertexbuffer.h b/indra/llrender/llfontvertexbuffer.h index d5e1280dbf..a9e1e2337c 100644 --- a/indra/llrender/llfontvertexbuffer.h +++ b/indra/llrender/llfontvertexbuffer.h @@ -122,7 +122,7 @@ private: // Adding new characters to bitmap cache can alter value from getBitmapWidth(); // which alters whole string. So rerender when new characters were added to cache. - S32 mLastFontGlyphCount = 0; + S32 mLastFontCacheGen = 0; static bool sEnableBufferCollection; }; diff --git a/indra/llrender/llgltexture.cpp b/indra/llrender/llgltexture.cpp index 87e7400a24..89f2a75002 100644 --- a/indra/llrender/llgltexture.cpp +++ b/indra/llrender/llgltexture.cpp @@ -63,6 +63,10 @@ LLGLTexture::~LLGLTexture() void LLGLTexture::init() { mBoostLevel = LLGLTexture::BOOST_NONE; + // + // Added a previous boost level to allow for restorign boost after BOOST_SELECTED is applied + mPrevBoostLevel = LLGLTexture::BOOST_NONE; + // mFullWidth = 0; mFullHeight = 0; @@ -107,6 +111,18 @@ void LLGLTexture::setBoostLevel(S32 level) } } +// +// Changes the current boost level to the previous value +void LLGLTexture::restoreBoostLevel() +{ + mBoostLevel = mPrevBoostLevel; +} +// Stores the current boost level in a the previous boost. +void LLGLTexture::storeBoostLevel() +{ + mPrevBoostLevel = mBoostLevel; +} +// void LLGLTexture::forceActive() { mTextureState = ACTIVE ; diff --git a/indra/llrender/llgltexture.h b/indra/llrender/llgltexture.h index 48132fa956..3cf97d5c6b 100644 --- a/indra/llrender/llgltexture.h +++ b/indra/llrender/llgltexture.h @@ -101,6 +101,10 @@ public: void setBoostLevel(S32 level); S32 getBoostLevel() { return mBoostLevel; } + // + void restoreBoostLevel(); // Now restores the mBoostLevel with the mPrevBoostLevel + void storeBoostLevel(); // Stores the current mBoostLevel in mPrevBoostLevel + // S32 getFullWidth() const { return mFullWidth; } S32 getFullHeight() const { return mFullHeight; } @@ -183,6 +187,10 @@ public: protected: S32 mBoostLevel; // enum describing priority level + // + // Added previous value to allow for restoring of BOOST_SELECTED overriding current state + S32 mPrevBoostLevel; // enum describing priority level (Previous Value for BOOST_SELECTION restore) + // U32 mFullWidth; U32 mFullHeight; bool mUseMipMaps; diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index d76ea0ffeb..fea71f7d6e 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -2105,7 +2105,7 @@ void LLFolderView::onIdleUpdateMenu(void* user_data) self->updateMenuOptions(menu); menu->needsArrange(); // update menu height if needed } - gIdleCallbacks.deleteFunction(onIdleUpdateMenu, NULL); + gIdleCallbacks.deleteFunction(onIdleUpdateMenu, self); } bool LLFolderView::isFolderSelected() diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 65d7712761..18da564754 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -345,6 +345,20 @@ void LLTextEditor::setText(const LLStringExplicit &utf8str, const LLStyle::Param resetDirty(); } +// Preview button +void LLTextEditor::reparseText(const LLStringExplicit &utf8str, const LLStyle::Params& input_params) +{ + mParseOnTheFly = false; + LLTextBase::setText(utf8str, input_params); + mParseOnTheFly = true; +} + +void LLTextEditor::reparseValue(const LLSD& value) +{ + reparseText(value.asString()); +} +// + // [SL:KB] - Patch: UI-FloaterSearchReplace | Checked: 2013-12-30 (Catznip-3.6) std::string LLTextEditor::getSelectionString() const { diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index ccc902e58e..5a4790acd8 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -187,6 +187,11 @@ public: // Non-undoable void setText(const LLStringExplicit &utf8str, const LLStyle::Params& input_params = LLStyle::Params()); + // Preview button + void reparseText(const LLStringExplicit &utf8str, const LLStyle::Params& input_params = LLStyle::Params()); + void reparseValue(const LLSD& value); + // + // Removes text from the end of document // Does not change highlight or cursor position. diff --git a/indra/newview/aoengine.cpp b/indra/newview/aoengine.cpp index 33f91d556a..a66c8885b8 100644 --- a/indra/newview/aoengine.cpp +++ b/indra/newview/aoengine.cpp @@ -1629,7 +1629,7 @@ void AOEngine::update() } else if (state_params[num].substr(0, 2) == "CT") { - LLStringUtil::convertToS32(state_params[num].substr(2, state_params[num].size() - 2), state->mCycleTime); + LLStringUtil::convertToF32(state_params[num].substr(2, state_params[num].size() - 2), state->mCycleTime); LL_DEBUGS("AOEngine") << "Cycle Time specified:" << state->mCycleTime << LL_ENDL; } else @@ -1828,12 +1828,9 @@ bool AOEngine::renameSet(AOSet* set, const std::string& name) void AOEngine::saveState(const AOSet::AOState* state) { std::string stateParams = state->mName; - F32 time = (F32)state->mCycleTime; - if (time > 0.0f) + if (state->mCycleTime > 0.0f) { - std::ostringstream timeStr; - timeStr << ":CT" << state->mCycleTime; - stateParams += timeStr.str(); + stateParams += llformat(":CT%.2f", state->mCycleTime); } if (state->mCycle) { @@ -2041,7 +2038,7 @@ void AOEngine::setRandomize(AOSet::AOState* state, bool randomize) void AOEngine::setCycleTime(AOSet::AOState* state, F32 time) { - state->mCycleTime = (S32)time; + state->mCycleTime = time; state->mDirty = true; } diff --git a/indra/newview/aoset.h b/indra/newview/aoset.h index cf9cff8f10..2da7339b2b 100644 --- a/indra/newview/aoset.h +++ b/indra/newview/aoset.h @@ -85,7 +85,7 @@ class AOSet LLUUID mRemapID; bool mCycle; bool mRandom; - S32 mCycleTime; + F32 mCycleTime; std::vector mAnimations; U32 mCurrentAnimation; LLUUID mCurrentAnimationID; diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index f790953cb2..118f209adb 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11572,6 +11572,17 @@ Change of this parameter will affect the layout of buttons in notification toast Value 0 + FSFocusPointRender + + Comment + Draw a small crosshair where the DoF focus is + Persist + 1 + Type + Boolean + Value + 0 + CameraDoFResScale @@ -15212,7 +15223,7 @@ Change of this parameter will affect the layout of buttons in notification toast Type F32 Value - 8.0 + 7.0 Backup 0 @@ -21733,7 +21744,7 @@ Change of this parameter will affect the layout of buttons in notification toast CefVerboseLog Comment - Enable/disable CEF verbose loggingk + Enable/disable CEF verbose logging Persist 1 Type diff --git a/indra/newview/app_settings/shaders/class1/deferred/rlvFLegacy.glsl b/indra/newview/app_settings/shaders/class1/deferred/rlvFLegacy.glsl deleted file mode 100644 index d688b6ce8c..0000000000 --- a/indra/newview/app_settings/shaders/class1/deferred/rlvFLegacy.glsl +++ /dev/null @@ -1,174 +0,0 @@ -/** - * - * Copyright (c) 2018-2020, Kitty Barnett - * - * The source code in this file is provided to you under the terms of the - * GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt - * in this distribution, or online at http://www.gnu.org/licenses/lgpl-2.1.txt - * - * By copying, modifying or distributing this software, you acknowledge that - * you have read and understood your obligations described above, and agree to - * abide by those obligations. - * - */ - -#extension GL_ARB_texture_rectangle : enable - -/*[EXTRA_CODE_HERE]*/ - -out vec4 frag_color; - -in vec2 vary_fragcoord; - -uniform sampler2DRect diffuseRect; -uniform sampler2DRect depthMap; -uniform mat4 inv_proj; -uniform vec2 screen_res; - -uniform int rlvEffectMode; // ESphereMode -uniform vec4 rlvEffectParam1; // Sphere origin (in local coordinates) -uniform vec4 rlvEffectParam2; // Min/max dist + min/max value -uniform bvec2 rlvEffectParam3; // Min/max dist extend -uniform vec4 rlvEffectParam4; // Sphere params (=color when using blend) -uniform vec2 rlvEffectParam5; // Blur direction (not used for blend) - -#define SPHERE_ORIGIN rlvEffectParam1.xyz -#define SPHERE_DISTMIN rlvEffectParam2.y -#define SPHERE_DISTMAX rlvEffectParam2.w -#define SPHERE_DISTEXTEND rlvEffectParam3 -#define SPHERE_VALUEMIN rlvEffectParam2.x -#define SPHERE_VALUEMAX rlvEffectParam2.z -#define SPHERE_PARAMS rlvEffectParam4 -#define BLUR_DIRECTION rlvEffectParam5.xy - -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; -} - -vec3 blur13(sampler2DRect source, vec2 tc, vec2 direction) -{ - vec4 color = vec4(0.0); - vec2 off1 = vec2(1.411764705882353) * direction; - vec2 off2 = vec2(3.2941176470588234) * direction; - vec2 off3 = vec2(5.176470588235294) * direction; - - color += texture2DRect(source, tc) * 0.1964825501511404; - - color += texture2DRect(source, tc + off1) * 0.2969069646728344; - color += texture2DRect(source, tc - off1) * 0.2969069646728344; - - color += texture2DRect(source, tc + off2) * 0.09447039785044732; - color += texture2DRect(source, tc - off2) * 0.09447039785044732; - - color += texture2DRect(source, tc + off3) * 0.010381362401148057; - color += texture2DRect(source, tc - off3) * 0.010381362401148057; - - return color.xyz; -} - -const float pi = 3.14159265; - -// http://callumhay.blogspot.com/2010/09/gaussian-blur-shader-glsl.html -vec3 blurVariable(sampler2DRect source, vec2 tc, float kernelSize, vec2 direction, float strength) { - float numBlurPixelsPerSide = float(kernelSize / 2); - - // Incremental Gaussian Coefficent Calculation (See GPU Gems 3 pp. 877 - 889) - vec3 incrementalGaussian; - incrementalGaussian.x = 1.0 / (sqrt(2.0 * pi) * strength); - incrementalGaussian.y = exp(-0.5 / (strength * strength)); - incrementalGaussian.z = incrementalGaussian.y * incrementalGaussian.y; - - vec4 avgValue = vec4(0.0, 0.0, 0.0, 0.0); - float coefficientSum = 0.0; - - // Take the central sample first... - avgValue += texture2DRect(source, tc) * incrementalGaussian.x; - coefficientSum += incrementalGaussian.x; - incrementalGaussian.xy *= incrementalGaussian.yz; - - // Go through the remaining 8 vertical samples (4 on each side of the center) - for (float i = 1.0; i <= numBlurPixelsPerSide; i++) { - avgValue += texture2DRect(source, tc - i * direction) * incrementalGaussian.x; - avgValue += texture2DRect(source, tc + i * direction) * incrementalGaussian.x; - coefficientSum += 2.0 * incrementalGaussian.x; - incrementalGaussian.xy *= incrementalGaussian.yz; - } - - return (avgValue / coefficientSum).rgb; -} - -vec3 chromaticAberration(sampler2DRect source, vec2 tc, vec2 redDrift, vec2 blueDrift, float strength) -{ - vec3 sourceColor = texture2DRect(source, tc).rgb; - - // Sample the color components - vec3 driftColor; - driftColor.r = texture2DRect(source, tc + redDrift).r; - driftColor.g = sourceColor.g; - driftColor.b = texture2DRect(source, tc + blueDrift).b; - - // Adjust the strength of the effect - return mix(sourceColor, driftColor, strength); -} - -void main() -{ - vec2 fragTC = vary_fragcoord.st; - float fragDepth = texture2DRect(depthMap, fragTC).x; - vec3 fragPosLocal = getPosition_d(fragTC, fragDepth).xyz; - float distance = length(fragPosLocal.xyz - SPHERE_ORIGIN); - - // Linear non-branching interpolation of the strength of the sphere effect (replaces if/elseif/else for x < min, min <= x <= max and x > max) - float effectStrength = SPHERE_VALUEMIN + mix(0.0, SPHERE_VALUEMAX - SPHERE_VALUEMIN, (distance - SPHERE_DISTMIN) / (SPHERE_DISTMAX - SPHERE_DISTMIN)); - if (distance < SPHERE_DISTMIN) - { - effectStrength = SPHERE_DISTEXTEND.x ? SPHERE_VALUEMIN : 0.0; - } - else if (distance > SPHERE_DISTMAX) - { - effectStrength = SPHERE_DISTEXTEND.y ? SPHERE_VALUEMAX : 0.0; - } - - vec3 fragColor; - if (rlvEffectMode == 0) // Blend - { - fragColor = texture2DRect(diffuseRect, fragTC).rgb; - fragColor = mix(fragColor, SPHERE_PARAMS.rgb, effectStrength); - } - else if (rlvEffectMode == 1) // Blur (fixed) - { - fragColor = blur13(diffuseRect, fragTC, effectStrength * BLUR_DIRECTION); - } - else if (rlvEffectMode == 2) // Blur (variable) - { - fragColor = texture2DRect(diffuseRect, fragTC).rgb; - if (effectStrength > 0) - { - fragColor = blurVariable(diffuseRect, fragTC, SPHERE_PARAMS.x, BLUR_DIRECTION, effectStrength); - } - } - else if (rlvEffectMode == 3) // ChromaticAberration - { - fragColor = chromaticAberration(diffuseRect, fragTC, SPHERE_PARAMS.xy, SPHERE_PARAMS.zw, effectStrength); - } - else if (rlvEffectMode == 4) // Pixelate - { - effectStrength = sign(effectStrength); - float pixelWidth = max(1, floor(SPHERE_PARAMS.x * effectStrength)); float pixelHeight = max(1, floor(SPHERE_PARAMS.y * effectStrength)); - fragTC = vec2(pixelWidth * floor(fragTC.x / pixelWidth), pixelHeight * floor(fragTC.y / pixelHeight)); - fragColor = texture2DRect(diffuseRect, fragTC).rgb; - } - - frag_color.rgb = fragColor; - frag_color.a = 0.0; -} diff --git a/indra/newview/app_settings/shaders/class3/environment/waterF.glsl b/indra/newview/app_settings/shaders/class3/environment/waterF.glsl index 35b2f8bd10..2121088405 100644 --- a/indra/newview/app_settings/shaders/class3/environment/waterF.glsl +++ b/indra/newview/app_settings/shaders/class3/environment/waterF.glsl @@ -255,7 +255,7 @@ void main() shadow = sampleDirectionalShadow(pos.xyz, norm.xyz, distort); #endif - vec3 sunlit_linear = srgb_to_linear(sunlit); + vec3 sunlit_linear = sunlit; float fade = 1; #ifdef TRANSPARENT_WATER float depth = texture(depthMap, distort).r; @@ -317,7 +317,7 @@ void main() pbrPunctual(diffuseColor, specularColor, perceptualRoughness, metallic, normalize(wavef+up*max(dist, 32.0)/32.0*(1.0-vdu)), v, normalize(light_dir), nl, diffPunc, specPunc); - vec3 punctual = clamp(nl * (diffPunc + specPunc), vec3(0), vec3(10)) * sunlit_linear * shadow; + vec3 punctual = clamp(nl * (diffPunc + specPunc), vec3(0), vec3(10)) * sunlit_linear * shadow * atten; radiance *= df2.y; //radiance = toneMapNoExposure(radiance); vec3 color = vec3(0); diff --git a/indra/newview/fsfloaterposer.cpp b/indra/newview/fsfloaterposer.cpp index eba653938d..9b0d95ab55 100644 --- a/indra/newview/fsfloaterposer.cpp +++ b/indra/newview/fsfloaterposer.cpp @@ -1192,6 +1192,8 @@ LLSD FSFloaterPoser::createRowForJoint(const std::string& jointName, bool isHead std::string parameterName = (isHeaderRow ? XML_LIST_HEADER_STRING_PREFIX : XML_LIST_TITLE_STRING_PREFIX) + jointName; if (hasString(parameterName)) jointValue = getString(parameterName); + else + return NULL; LLSD row; row["columns"][COL_ICON]["column"] = "icon"; @@ -2403,17 +2405,18 @@ bool FSFloaterPoser::writePoseAsBvh(llofstream* fileStream, LLVOAvatar* avatar) *fileStream << "MOTION" << std::endl; *fileStream << "Frames: 2" << std::endl; *fileStream << "Frame Time: 1" << std::endl; - *fileStream << "0.000000 0.000000 0.000000 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0" << std::endl; + writeFirstFrameOfBvhMotion(fileStream, startingJoint); + *fileStream << std::endl; writeBvhMotion(fileStream, avatar, startingJoint); *fileStream << std::endl; return true; } -bool FSFloaterPoser::writeBvhFragment(llofstream* fileStream, LLVOAvatar* avatar, const FSPoserAnimator::FSPoserJoint* joint, S32 tabStops) +void FSFloaterPoser::writeBvhFragment(llofstream* fileStream, LLVOAvatar* avatar, const FSPoserAnimator::FSPoserJoint* joint, S32 tabStops) { if (!joint) - return false; + return; auto position = mPoserAnimator.getJointPosition(avatar, *joint); auto saveAxis = getBvhJointTranslation(joint->jointName()); @@ -2475,32 +2478,44 @@ bool FSFloaterPoser::writeBvhFragment(llofstream* fileStream, LLVOAvatar* avatar } else { + // append the End Site offset *fileStream << getTabs(tabStops + 1) + "End Site" << std::endl; *fileStream << getTabs(tabStops + 1) + "{" << std::endl; - - // append the 'end knot' magic number - if (strstr(joint->jointName().c_str(), "mHead")) - *fileStream << getTabs(tabStops + 2) + "OFFSET 0.000000 3.148289 0.000000" << std::endl; - if (strstr(joint->jointName().c_str(), "mWristLeft")) - *fileStream << getTabs(tabStops + 2) + "OFFSET 4.106464 0.000000 0.000000" << std::endl; - if (strstr(joint->jointName().c_str(), "mWristRight")) - *fileStream << getTabs(tabStops + 2) + "OFFSET -4.106464 0.000000 0.000000" << std::endl; - if (strstr(joint->jointName().c_str(), "mAnkleLeft")) - *fileStream << getTabs(tabStops + 2) + "OFFSET 0.000000 -2.463878 4.653993" << std::endl; - if (strstr(joint->jointName().c_str(), "mAnkleRight")) - *fileStream << getTabs(tabStops + 2) + "OFFSET 0.000000 -2.463878 4.653993" << std::endl; - + *fileStream << getTabs(tabStops + 2) + "OFFSET " + joint->bvhEndSite() << std::endl; *fileStream << getTabs(tabStops + 1) + "}" << std::endl; } *fileStream << getTabs(tabStops) + "}" << std::endl; - return true; } -bool FSFloaterPoser::writeBvhMotion(llofstream* fileStream, LLVOAvatar* avatar, const FSPoserAnimator::FSPoserJoint* joint) +void FSFloaterPoser::writeFirstFrameOfBvhMotion(llofstream* fileStream, const FSPoserAnimator::FSPoserJoint* joint) { if (!joint) - return false; + return; + + switch (joint->boneType()) + { + case WHOLEAVATAR: + *fileStream << "0.000000 0.000000 0.000000 0.0 0.0 0.0"; + break; + + default: + *fileStream << " 0.0 0.0 0.0"; + break; + } + + size_t numberOfBvhChildNodes = joint->bvhChildren().size(); + for (size_t index = 0; index != numberOfBvhChildNodes; ++index) + { + auto nextJoint = mPoserAnimator.getPoserJointByName(joint->bvhChildren()[index]); + writeFirstFrameOfBvhMotion(fileStream, nextJoint); + } +} + +void FSFloaterPoser::writeBvhMotion(llofstream* fileStream, LLVOAvatar* avatar, const FSPoserAnimator::FSPoserJoint* joint) +{ + if (!joint) + return; auto rotation = mPoserAnimator.getJointRotation(avatar, *joint, SWAP_NOTHING, NEGATE_NOTHING); auto position = mPoserAnimator.getJointPosition(avatar, *joint); @@ -2522,8 +2537,6 @@ bool FSFloaterPoser::writeBvhMotion(llofstream* fileStream, LLVOAvatar* avatar, auto nextJoint = mPoserAnimator.getPoserJointByName(joint->bvhChildren()[index]); writeBvhMotion(fileStream, avatar, nextJoint); } - - return true; } std::string FSFloaterPoser::vec3ToXYZString(const LLVector3& val) diff --git a/indra/newview/fsfloaterposer.h b/indra/newview/fsfloaterposer.h index bd8e4c09db..0dbe809af7 100644 --- a/indra/newview/fsfloaterposer.h +++ b/indra/newview/fsfloaterposer.h @@ -386,8 +386,7 @@ class FSFloaterPoser : public LLFloater /// The avatar owning the supplied joint. /// The joint whose fragment should be written, and whose child(ren) will also be written. /// The number of tab-stops to include for formatting purpose. - /// True if the fragment wrote successfully, otherwise false. - bool writeBvhFragment(llofstream* fileStream, LLVOAvatar* avatar, const FSPoserAnimator::FSPoserJoint* joint, S32 tabStops); + void writeBvhFragment(llofstream* fileStream, LLVOAvatar* avatar, const FSPoserAnimator::FSPoserJoint* joint, S32 tabStops); /// /// Writes a fragment of the 'single line' representing an animation frame within the BVH file respresenting the positions and/or @@ -396,8 +395,15 @@ class FSFloaterPoser : public LLFloater /// The stream to write the position and/or rotation to. /// The avatar owning the supplied joint. /// The joint whose position and/or rotation should be written. - /// - bool writeBvhMotion(llofstream* fileStream, LLVOAvatar* avatar, const FSPoserAnimator::FSPoserJoint* joint); + void writeBvhMotion(llofstream* fileStream, LLVOAvatar* avatar, const FSPoserAnimator::FSPoserJoint* joint); + + /// + /// Writes a fragment of the 'single line' representing the first animation frame within the BVH file respresenting the positions and/or + /// rotations. + /// + /// The stream to write the position and/or rotation to. + /// The joint whose position and/or rotation should be written. + void writeFirstFrameOfBvhMotion(llofstream* fileStream, const FSPoserAnimator::FSPoserJoint* joint); /// /// Generates a string with the supplied number of tab-chars. diff --git a/indra/newview/fsjointpose.cpp b/indra/newview/fsjointpose.cpp index b6bb99bf95..285e1c5322 100644 --- a/indra/newview/fsjointpose.cpp +++ b/indra/newview/fsjointpose.cpp @@ -196,33 +196,12 @@ void FSJointPose::mirrorRotationFrom(FSJointPose* fromJoint) mRotation.deltaRotation.mQ[VW]); } -void FSJointPose::revertJointScale() +void FSJointPose::revertJoint() { LLJoint* joint = mJointState->getJoint(); if (!joint) return; - joint->setScale(mBeginningScale); -} - -void FSJointPose::revertJointPosition() -{ - LLJoint* joint = mJointState->getJoint(); - if (!joint) - return; - - joint->setPosition(mBeginningPosition); -} - -void FSJointPose::revertCollisionVolume() -{ - if (!mIsCollisionVolume) - return; - - LLJoint* joint = mJointState->getJoint(); - if (!joint) - return; - joint->setRotation(mRotation.baseRotation); joint->setPosition(mBeginningPosition); joint->setScale(mBeginningScale); diff --git a/indra/newview/fsjointpose.h b/indra/newview/fsjointpose.h index 3983eef773..1b50f908bd 100644 --- a/indra/newview/fsjointpose.h +++ b/indra/newview/fsjointpose.h @@ -163,20 +163,10 @@ class FSJointPose void recaptureJoint(); /// - /// Restores the joint represented by this to the scale it had when this motion started. + /// Reverts the position/rotation/scale to their values when the animation begun. + /// This treatment is required for certain joints, particularly Collision Volumes and those bones not commonly animated by an AO. /// - void revertJointScale(); - - /// - /// Restores the joint represented by this to the position it had when this motion started. - /// - void revertJointPosition(); - - /// - /// Collision Volumes do not 'reset' their position/rotation when the animation stops. - /// This requires special treatment to revert changes we've made this animation session. - /// - void revertCollisionVolume(); + void revertJoint(); LLVector3 getTargetPosition() const { return mPositionDelta + mBeginningPosition; } LLQuaternion getTargetRotation() const { return mRotation.getTargetRotation(); } diff --git a/indra/newview/fsposeranimator.h b/indra/newview/fsposeranimator.h index 109044b58b..7f7ce6e334 100644 --- a/indra/newview/fsposeranimator.h +++ b/indra/newview/fsposeranimator.h @@ -118,7 +118,8 @@ public: std::string mMirrorJointName; E_BoneTypes mBoneList; std::vector mBvhChildren; - std::string bvhOffsetMagicNumber; + std::string bvhOffsetValue; + std::string bvhEndSiteOffset; bool mDontFlipOnMirror = false; public: @@ -148,9 +149,17 @@ public: std::vector bvhChildren() const { return mBvhChildren; } /// - /// Gets the bvh offset magic number for this joint. + /// Gets the bvh offset value for this joint. /// - std::string bvhOffset() const { return bvhOffsetMagicNumber; } + /// + /// These values are derived from \newview\character\avatar_skeleton.xml + /// + std::string bvhOffset() const { return bvhOffsetValue; } + + /// + /// Gets the bvh end site offset magic number for this joint. + /// + std::string bvhEndSite() const { return bvhEndSiteOffset; } /// /// Creates a new instance of a PoserJoint. @@ -165,14 +174,16 @@ public: /// The optional array of joints, needed for BVH saving, which are the direct decendent(s) of this joint. /// The option for whether this joint should rotation-flip it counterpart when mirroring the pose of the entire body. FSPoserJoint(std::string joint_name, std::string mirror_joint_name, E_BoneTypes bone_list, - std::vector bhv_children = {}, std::string bvhOffset = "", bool dont_flip_on_mirror = false) + std::vector bhv_children = {}, std::string bvhOffset = "", std::string bvhEndSiteValue = "", + bool dont_flip_on_mirror = false) { mJointName = joint_name; mMirrorJointName = mirror_joint_name; mBoneList = bone_list; mBvhChildren = bhv_children; - bvhOffsetMagicNumber = bvhOffset; + bvhOffsetValue = bvhOffset; mDontFlipOnMirror = dont_flip_on_mirror; + bvhEndSiteOffset = bvhEndSiteValue; } }; @@ -186,136 +197,155 @@ public: /// const std::vector PoserJoints{ // head, torso, legs - { "mHead", "", BODY, {}, "0.000000 3.148285 0.000000" }, - { "mNeck", "", BODY, { "mHead" }, "0.000000 10.266162 -0.273764" }, - { "mPelvis", "", WHOLEAVATAR, { "mTorso", "mHipLeft", "mHipRight" }, "0.000000 0.000000 0.000000" }, - { "mChest", "", BODY, { "mNeck", "mCollarLeft", "mCollarRight" }, "0.000000 8.486693 -0.684411" }, - { "mTorso", "", BODY, { "mChest" }, "0.000000 3.422050 0.000000" }, - { "mCollarLeft", "mCollarRight", BODY, { "mShoulderLeft" }, "3.422053 6.707223 -0.821293" }, - { "mShoulderLeft", "mShoulderRight", BODY, { "mElbowLeft" }, "3.285171 0.000000 0.000000" }, - { "mElbowLeft", "mElbowRight", BODY, { "mWristLeft" }, "10.129278 0.000000 0.000000" }, - { "mWristLeft", "mWristRight", BODY, {}, "8.486692 0.000000 0.000000" }, - { "mCollarRight", "mCollarLeft", BODY, { "mShoulderRight" }, "-3.558935 6.707223 -0.821293", true }, - { "mShoulderRight", "mShoulderLeft", BODY, { "mElbowRight" }, "-3.148289 0.000000 0.000000", true }, - { "mElbowRight", "mElbowLeft", BODY, { "mWristRight" }, "-10.266159 0.000000 0.000000", true }, - { "mWristRight", "mWristLeft", BODY, {}, "-8.349810 0.000000 0.000000", true }, - { "mHipLeft", "mHipRight", BODY, { "mKneeLeft" }, "5.338403 -1.642589 1.368821" }, - { "mKneeLeft", "mKneeRight", BODY, { "mAnkleLeft" }, "-2.053232 -20.121670 0.000000" }, - { "mAnkleLeft", "mAnkleRight", BODY, {}, "0.000000 -19.300380 -1.231939" }, - { "mHipRight", "mHipLeft", BODY, { "mKneeRight" }, "-5.338403 -1.642589 1.368821", true }, - { "mKneeRight", "mKneeLeft", BODY, { "mAnkleRight" }, "2.053232 -20.121670 0.000000", true }, - { "mAnkleRight", "mAnkleLeft", BODY, {}, "0.000000 -19.300380 -1.231939", true }, + { "mHead", "", BODY, { "mEyeLeft", "mEyeRight", "mFaceRoot" }, "0.000 0.076 0.000" }, + { "mNeck", "", BODY, { "mHead" }, "0.000 0.251 -0.010" }, + { "mPelvis", "", WHOLEAVATAR, { "mTorso", "mHipLeft", "mHipRight", "mTail1", "mGroin", "mHindLimbsRoot" }, "0.000000 0.000000 0.000000" }, + { "mChest", "", BODY, { "mNeck", "mCollarLeft", "mCollarRight", "mWingsRoot" }, "0.000 0.205 -0.015" }, + { "mTorso", "", BODY, { "mChest" }, "0.000 0.084 0.000" }, + { "mCollarLeft", "mCollarRight", BODY, { "mShoulderLeft" }, "0.085 0.165 -0.021" }, + { "mShoulderLeft", "mShoulderRight", BODY, { "mElbowLeft" }, "0.079 0.000 0.000" }, + { "mElbowLeft", "mElbowRight", BODY, { "mWristLeft" }, "0.248 0.000 0.000" }, + { "mWristLeft", "mWristRight", BODY, { "mHandThumb1Left", "mHandIndex1Left", "mHandMiddle1Left", "mHandRing1Left", "mHandPinky1Left" }, "0.205 0.000 0.000" }, + { "mCollarRight", "mCollarLeft", BODY, { "mShoulderRight" }, "-0.085 0.165 -0.021", "", true }, + { "mShoulderRight", "mShoulderLeft", BODY, { "mElbowRight" }, "-0.079 0.000 0.000", "", true }, + { "mElbowRight", "mElbowLeft", BODY, { "mWristRight" }, "-0.248 0.000 0.000", "", true }, + { "mWristRight", "mWristLeft", BODY, { "mHandThumb1Right", "mHandIndex1Right", "mHandMiddle1Right", "mHandRing1Right", "mHandPinky1Right" }, "-0.205 0.000 0.000", "", true }, + { "mHipLeft", "mHipRight", BODY, { "mKneeLeft" }, "0.127 -0.041 0.034" }, + { "mKneeLeft", "mKneeRight", BODY, { "mAnkleLeft" }, "-0.046 -0.491 -0.001" }, + { "mAnkleLeft", "mAnkleRight", BODY, {}, "0.001 -0.468 -0.029", "0.000 -0.061 0.112" }, + { "mHipRight", "mHipLeft", BODY, { "mKneeRight" }, "-0.129 -0.041 0.034", "0.000 -0.061 0.112", true }, + { "mKneeRight", "mKneeLeft", BODY, { "mAnkleRight" }, "0.049 -0.491 -0.001", "", true }, + { "mAnkleRight", "mAnkleLeft", BODY, {}, "0.000 -0.468 -0.029", "0.000 -0.061 0.112", true }, // face - { "mFaceForeheadLeft", "mFaceForeheadRight", FACE }, - { "mFaceForeheadCenter", "", FACE }, - { "mFaceForeheadRight", "mFaceForeheadLeft", FACE, {}, "", true }, - { "mFaceEyebrowOuterLeft", "mFaceEyebrowOuterRight", FACE }, - { "mFaceEyebrowCenterLeft", "mFaceEyebrowCenterRight", FACE }, - { "mFaceEyebrowInnerLeft", "mFaceEyebrowInnerRight", FACE }, - { "mFaceEyebrowOuterRight", "mFaceEyebrowOuterLeft", FACE, {}, "", true }, - { "mFaceEyebrowCenterRight", "mFaceEyebrowCenterLeft", FACE, {}, "", true }, - { "mFaceEyebrowInnerRight", "mFaceEyebrowInnerLeft", FACE, {}, "", true }, + { "mFaceRoot", + "", + FACE, + { + "mFaceForeheadLeft", "mFaceForeheadCenter", "mFaceForeheadRight", + "mFaceEyebrowOuterLeft", "mFaceEyebrowCenterLeft", "mFaceEyebrowInnerLeft", + "mFaceEyebrowOuterRight", "mFaceEyebrowCenterRight", "mFaceEyebrowInnerRight", + "mFaceEyeLidUpperLeft", "mFaceEyeLidLowerLeft", + "mFaceEyeLidUpperRight", "mFaceEyeLidLowerRight", + "mFaceEar1Left", "mFaceEar1Right", + "mFaceNoseLeft", "mFaceNoseCenter", "mFaceNoseRight", + "mFaceCheekUpperLeft", "mFaceCheekLowerLeft", + "mFaceCheekUpperRight", "mFaceCheekLowerRight", + "mFaceJaw", "mFaceTeethUpper" + }, + "0.000 0.045 0.025" }, + { "mFaceForeheadLeft", "mFaceForeheadRight", FACE, {}, "0.035 0.083 0.061", "0.004 0.018 0.024" }, + { "mFaceForeheadCenter", "", FACE, {}, "0.000 0.065 0.069", "0.000 0.000 0.036" }, + { "mFaceForeheadRight", "mFaceForeheadLeft", FACE, {}, "-0.035 0.083 0.061", "-0.004 0.018 0.024", true }, + { "mFaceEyebrowOuterLeft", "mFaceEyebrowOuterRight", FACE, {}, "0.051 0.048 0.064", "0.013 0.000 0.023" }, + { "mFaceEyebrowCenterLeft", "mFaceEyebrowCenterRight", FACE, {}, "0.043 0.056 0.070", "0.000 0.000 0.027" }, + { "mFaceEyebrowInnerLeft", "mFaceEyebrowInnerRight", FACE, {}, "0.022 0.051 0.075", "0.000 0.000 0.026" }, + { "mFaceEyebrowOuterRight", "mFaceEyebrowOuterLeft", FACE, {}, "-0.051 0.048 0.064", "-0.013 0.000 0.023", true }, + { "mFaceEyebrowCenterRight", "mFaceEyebrowCenterLeft", FACE, {}, "-0.043 0.056 0.070", "0.000 0.000 0.027", true }, + { "mFaceEyebrowInnerRight", "mFaceEyebrowInnerLeft", FACE, {}, "-0.022 0.051 0.075", "0.000 0.000 0.026", true }, - { "mEyeLeft", "mEyeRight", FACE }, - { "mEyeRight", "mEyeLeft", FACE, {}, "", true }, - { "mFaceEyeLidUpperLeft", "mFaceEyeLidUpperRight", FACE }, - { "mFaceEyeLidLowerLeft", "mFaceEyeLidLowerRight", FACE }, - { "mFaceEyeLidUpperRight", "mFaceEyeLidUpperLeft", FACE, {}, "", true }, - { "mFaceEyeLidLowerRight", "mFaceEyeLidLowerLeft", FACE, {}, "", true }, + { "mEyeLeft", "mEyeRight", FACE, {}, "-0.036 0.079 0.098", "0.000 0.000 0.025" }, + { "mEyeRight", "mEyeLeft", FACE, {}, "0.036 0.079 0.098", "0.000 0.000 0.025", true }, + { "mFaceEyeLidUpperLeft", "mFaceEyeLidUpperRight", FACE, {}, "0.036 0.034 0.073", "0.000 0.005 0.027" }, + { "mFaceEyeLidLowerLeft", "mFaceEyeLidLowerRight", FACE, {}, "0.036 0.034 0.073", "0.000 -0.007 0.024" }, + { "mFaceEyeLidUpperRight", "mFaceEyeLidUpperLeft", FACE, {}, "-0.036 0.034 0.073", "0.000 0.005 0.027", true }, + { "mFaceEyeLidLowerRight", "mFaceEyeLidLowerLeft", FACE, {}, "-0.036 0.034 0.073", "0.000 -0.007 0.024", true }, - { "mFaceEar1Left", "mFaceEar1Right", FACE }, - { "mFaceEar2Left", "mFaceEar2Right", FACE }, - { "mFaceEar1Right", "mFaceEar1Left", FACE, {}, "", true }, - { "mFaceEar2Right", "mFaceEar2Left", FACE, {}, "", true }, - { "mFaceNoseLeft", "mFaceNoseRight", FACE }, - { "mFaceNoseCenter", "", FACE }, - { "mFaceNoseRight", "mFaceNoseLeft", FACE, {}, "", true }, + { "mFaceEar1Left", "mFaceEar1Right", FACE, { "mFaceEar2Left" }, "0.080 0.002 0.000", "" }, + { "mFaceEar2Left", "mFaceEar2Right", FACE, {}, "0.018 0.025 -0.019", "0.000 0.033 0.000" }, + { "mFaceEar1Right", "mFaceEar1Left", FACE, { "mFaceEar2Right" }, "-0.080 0.002 0.000", "", true }, + { "mFaceEar2Right", "mFaceEar2Left", FACE, {}, "-0.018 0.025 -0.019", "0.000 0.033 0.000", true }, + { "mFaceNoseLeft", "mFaceNoseRight", FACE, {}, "0.015 -0.004 0.086", "0.004 0.000 0.015" }, + { "mFaceNoseCenter", "", FACE, {}, "0.000 0.000 0.102", "0.000 0.000 0.025" }, + { "mFaceNoseRight", "mFaceNoseLeft", FACE, {}, "-0.015 -0.004 0.086", "-0.004 0.000 0.015", true }, - { "mFaceCheekUpperLeft", "mFaceCheekUpperRight", FACE }, - { "mFaceCheekLowerLeft", "mFaceCheekLowerRight", FACE }, - { "mFaceCheekUpperRight", "mFaceCheekUpperLeft", FACE, {}, "", true }, - { "mFaceCheekLowerRight", "mFaceCheekLowerLeft", FACE, {}, "", true }, - { "mFaceLipUpperLeft", "mFaceLipUpperRight", FACE }, - { "mFaceLipUpperCenter", "", FACE }, - { "mFaceLipUpperRight", "mFaceLipUpperLeft", FACE, {}, "", true }, - { "mFaceLipCornerLeft", "mFaceLipCornerRight", FACE }, - { "mFaceLipCornerRight", "mFaceLipCornerLeft", FACE, {}, "", true }, - { "mFaceTongueBase", "", FACE }, - { "mFaceTongueTip", "", FACE, {}, "", true }, - { "mFaceLipLowerLeft", "mFaceLipLowerRight", FACE }, - { "mFaceLipLowerCenter", "", FACE }, - { "mFaceLipLowerRight", "mFaceLipLowerLeft", FACE, {}, "", true }, - { "mFaceJaw", "", FACE }, + { "mFaceCheekUpperLeft", "mFaceCheekUpperRight", FACE, {}, "0.034 -0.005 0.070", "0.015 0.000 0.022" }, + { "mFaceCheekLowerLeft", "mFaceCheekLowerRight", FACE, {}, "0.034 -0.031 0.050", "0.030 0.000 0.013" }, + { "mFaceCheekUpperRight", "mFaceCheekUpperLeft", FACE, {}, "-0.034 -0.005 0.070", "-0.015 0.000 0.022", true }, + { "mFaceCheekLowerRight", "mFaceCheekLowerLeft", FACE, {}, "-0.034 -0.031 0.050", "-0.030 0.000 0.013", true }, + { "mFaceLipUpperLeft", "mFaceLipUpperRight", FACE, {}, "0.000 -0.003 0.045", "0.015 0.000 0.041" }, + { "mFaceLipUpperCenter", "", FACE, {}, "0.000 -0.003 0.045", "0.000 0.002 0.043" }, + { "mFaceLipUpperRight", "mFaceLipUpperLeft", FACE, {}, "0.000 -0.003 0.045", "-0.015 0.000 0.041", true }, + { "mFaceLipCornerLeft", "mFaceLipCornerRight", FACE, {}, "-0.019 -0.010 0.028", "0.051 0.000 0.045" }, + { "mFaceLipCornerRight", "mFaceLipCornerLeft", FACE, {}, "0.019 -0.010 0.028", "-0.051 0.000 0.045", true }, + { "mFaceTeethUpper", "", FACE, { "mFaceLipUpperLeft","mFaceLipUpperCenter", "mFaceLipUpperRight", "mFaceLipCornerLeft", "mFaceLipCornerRight" }, "0.000 -0.030 0.020" }, + { "mFaceTeethLower", "", FACE, { "mFaceLipLowerLeft", "mFaceLipLowerCenter", "mFaceLipLowerRight", "mFaceTongueBase" }, "0.000 -0.039 0.021" }, + { "mFaceTongueBase", "", FACE, { "mFaceTongueTip" }, "0.000 0.005 0.039" }, + { "mFaceTongueTip", "", FACE, {}, "0.000 0.007 0.022", "0.000 0.000 0.010", true }, + { "mFaceLipLowerLeft", "mFaceLipLowerRight", FACE, {}, "0.000 0.000 0.045", "0.017 0.005 0.034" }, + { "mFaceLipLowerCenter", "", FACE, {}, "0.000 0.000 0.045", "0.000 0.002 0.040" }, + { "mFaceLipLowerRight", "mFaceLipLowerLeft", FACE, {}, "0.000 0.000 0.045", "-0.017 0.005 0.034", true }, + { "mFaceJaw", "", FACE, { "mFaceChin", "mFaceTeethLower" }, "0.000 -0.015 -0.001", "" }, + { "mFaceChin", "", FACE, {}, "0.000 -0.015 -0.001", "0.000 -0.018 0.021" }, // left hand - { "mHandThumb1Left", "mHandThumb1Right", HANDS }, - { "mHandThumb2Left", "mHandThumb2Right", HANDS }, - { "mHandThumb3Left", "mHandThumb3Right", HANDS }, - { "mHandIndex1Left", "mHandIndex1Right", HANDS }, - { "mHandIndex2Left", "mHandIndex2Right", HANDS }, - { "mHandIndex3Left", "mHandIndex3Right", HANDS }, - { "mHandMiddle1Left", "mHandMiddle1Right", HANDS }, - { "mHandMiddle2Left", "mHandMiddle2Right", HANDS }, - { "mHandMiddle3Left", "mHandMiddle3Right", HANDS }, - { "mHandRing1Left", "mHandRing1Right", HANDS }, - { "mHandRing2Left", "mHandRing2Right", HANDS }, - { "mHandRing3Left", "mHandRing3Right", HANDS }, - { "mHandPinky1Left", "mHandPinky1Right", HANDS }, - { "mHandPinky2Left", "mHandPinky2Right", HANDS }, - { "mHandPinky3Left", "mHandPinky3Right", HANDS }, + { "mHandThumb1Left", "mHandThumb1Right", HANDS, { "mHandThumb2Left" }, "0.026 0.004 0.031" }, + { "mHandThumb2Left", "mHandThumb2Right", HANDS, { "mHandThumb3Left" }, "0.032 -0.001 0.028" }, + { "mHandThumb3Left", "mHandThumb3Right", HANDS, {}, "0.031 -0.001 0.023", "0.025 0.000 0.015" }, + { "mHandIndex1Left", "mHandIndex1Right", HANDS, { "mHandIndex2Left" }, "0.097 0.015 0.038" }, + { "mHandIndex2Left", "mHandIndex2Right", HANDS, { "mHandIndex3Left" }, "0.036 -0.006 0.017" }, + { "mHandIndex3Left", "mHandIndex3Right", HANDS, {}, "0.032 -0.006 0.014", "0.025 -0.004 0.011" }, + { "mHandMiddle1Left", "mHandMiddle1Right", HANDS, { "mHandMiddle2Left" }, "0.101 0.015 0.013" }, + { "mHandMiddle2Left", "mHandMiddle2Right", HANDS, { "mHandMiddle3Left" }, "0.040 -0.006 -0.001" }, + { "mHandMiddle3Left", "mHandMiddle3Right", HANDS, {}, "0.049 -0.008 -0.001", "0.033 -0.006 -0.002" }, + { "mHandRing1Left", "mHandRing1Right", HANDS, { "mHandRing2Left" }, "0.099 0.009 -0.010" }, + { "mHandRing2Left", "mHandRing2Right", HANDS, { "mHandRing3Left" }, "0.038 -0.008 -0.013" }, + { "mHandRing3Left", "mHandRing3Right", HANDS, {}, "0.040 -0.009 -0.013", "0.028 -0.006 -0.010" }, + { "mHandPinky1Left", "mHandPinky1Right", HANDS, { "mHandPinky2Left" }, "0.095 0.003 -0.031" }, + { "mHandPinky2Left", "mHandPinky2Right", HANDS, { "mHandPinky3Left" }, "0.025 -0.006 -0.024" }, + { "mHandPinky3Left", "mHandPinky3Right", HANDS, {}, "0.018 -0.004 -0.015", "0.016 -0.004 -0.013" }, // right hand - { "mHandThumb1Right", "mHandThumb1Left", HANDS, {}, "", true }, - { "mHandThumb2Right", "mHandThumb2Left", HANDS, {}, "", true }, - { "mHandThumb3Right", "mHandThumb3Left", HANDS, {}, "", true }, - { "mHandIndex1Right", "mHandIndex1Left", HANDS, {}, "", true }, - { "mHandIndex2Right", "mHandIndex2Left", HANDS, {}, "", true }, - { "mHandIndex3Right", "mHandIndex3Left", HANDS, {}, "", true }, - { "mHandMiddle1Right", "mHandMiddle1Left", HANDS, {}, "", true }, - { "mHandMiddle2Right", "mHandMiddle2Left", HANDS, {}, "", true }, - { "mHandMiddle3Right", "mHandMiddle3Left", HANDS, {}, "", true }, - { "mHandRing1Right", "mHandRing1Left", HANDS, {}, "", true }, - { "mHandRing2Right", "mHandRing2Left", HANDS, {}, "", true }, - { "mHandRing3Right", "mHandRing3Left", HANDS, {}, "", true }, - { "mHandPinky1Right", "mHandPinky1Left", HANDS, {}, "", true }, - { "mHandPinky2Right", "mHandPinky2Left", HANDS, {}, "", true }, - { "mHandPinky3Right", "mHandPinky3Left", HANDS, {}, "", true }, + { "mHandThumb1Right", "mHandThumb1Left", HANDS, { "mHandThumb2Right" }, "-0.026 0.004 0.031", "", true }, + { "mHandThumb2Right", "mHandThumb2Left", HANDS, { "mHandThumb3Right" }, "-0.032 -0.001 0.028", "", true }, + { "mHandThumb3Right", "mHandThumb3Left", HANDS, {}, "-0.031 -0.001 0.023", "-0.025 0.000 0.015", true }, + { "mHandIndex1Right", "mHandIndex1Left", HANDS, { "mHandIndex2Right" }, "-0.097 0.015 0.038", "", true }, + { "mHandIndex2Right", "mHandIndex2Left", HANDS, { "mHandIndex3Right" }, "-0.036 -0.006 0.017", "", true }, + { "mHandIndex3Right", "mHandIndex3Left", HANDS, {}, "-0.032 -0.006 0.014", "-0.025 -0.004 0.011", true }, + { "mHandMiddle1Right", "mHandMiddle1Left", HANDS, { "mHandMiddle2Right" }, "-0.101 0.015 0.013", "", true }, + { "mHandMiddle2Right", "mHandMiddle2Left", HANDS, { "mHandMiddle3Right" }, "-0.040 -0.006 -0.001", "", true }, + { "mHandMiddle3Right", "mHandMiddle3Left", HANDS, {}, "-0.049 -0.008 -0.001", "-0.033 -0.006 -0.002", true }, + { "mHandRing1Right", "mHandRing1Left", HANDS, { "mHandRing2Right" }, "-0.099 0.009 -0.010", "", true }, + { "mHandRing2Right", "mHandRing2Left", HANDS, { "mHandRing3Right" }, "-0.038 -0.008 -0.013", "", true }, + { "mHandRing3Right", "mHandRing3Left", HANDS, {}, "-0.040 -0.009 -0.013", "-0.028 -0.006 -0.010", true }, + { "mHandPinky1Right", "mHandPinky1Left", HANDS, { "mHandPinky2Right" }, "-0.095 0.003 -0.031", "", true }, + { "mHandPinky2Right", "mHandPinky2Left", HANDS, { "mHandPinky3Right" }, "-0.025 -0.006 -0.024", "", true }, + { "mHandPinky3Right", "mHandPinky3Left", HANDS, {}, "-0.018 -0.004 -0.015", "-0.016 -0.004 -0.013", true }, // tail and hind limbs - { "mTail1", "", MISC }, - { "mTail2", "", MISC }, - { "mTail3", "", MISC }, - { "mTail4", "", MISC }, - { "mTail5", "", MISC }, - { "mTail6", "", MISC }, - { "mGroin", "", MISC }, - { "mHindLimbsRoot", "", MISC }, - { "mHindLimb1Left", "mHindLimb1Right", MISC }, - { "mHindLimb2Left", "mHindLimb2Right", MISC }, - { "mHindLimb3Left", "mHindLimb3Right", MISC }, - { "mHindLimb4Left", "mHindLimb4Right", MISC }, - { "mHindLimb1Right", "mHindLimb1Left", MISC, {}, "", true }, - { "mHindLimb2Right", "mHindLimb2Left", MISC, {}, "", true }, - { "mHindLimb3Right", "mHindLimb3Left", MISC, {}, "", true }, - { "mHindLimb4Right", "mHindLimb4Left", MISC, {}, "", true }, + { "mTail1", "", MISC, { "mTail2" }, "0.000 0.047 -0.116" }, + { "mTail2", "", MISC, { "mTail3" }, "0.000 0.000 -0.197" }, + { "mTail3", "", MISC, { "mTail4" }, "0.000 0.000 -0.168" }, + { "mTail4", "", MISC, { "mTail5" }, "0.000 0.000 -0.142" }, + { "mTail5", "", MISC, { "mTail6" }, "0.000 0.000 -0.112" }, + { "mTail6", "", MISC, {}, "0.000 0.000 -0.094", "0.000 0.000 -0.089" }, + { "mGroin", "", MISC, {}, "0.000 -0.097 0.064", "0.000 -0.066 0.004" }, + { "mHindLimbsRoot", "", MISC, { "mHindLimb1Left", "mHindLimb1Right" }, "0.000 0.084 -0.200" }, + { "mHindLimb1Left", "mHindLimb1Right", MISC, { "mHindLimb2Left" }, "0.129 -0.125 -0.204" }, + { "mHindLimb2Left", "mHindLimb2Right", MISC, { "mHindLimb3Left" }, "-0.046 -0.491 0.002" }, + { "mHindLimb3Left", "mHindLimb3Right", MISC, { "mHindLimb4Left" }, "-0.003 -0.468 -0.030" }, + { "mHindLimb4Left", "mHindLimb4Right", MISC, {}, "0.000 -0.061 0.112", "0.008 0.000 0.105" }, + { "mHindLimb1Right", "mHindLimb1Left", MISC, { "mHindLimb2Right" }, "-0.129 -0.125 -0.204", "", true }, + { "mHindLimb2Right", "mHindLimb2Left", MISC, { "mHindLimb3Right" }, "0.046 -0.491 0.002", "", true }, + { "mHindLimb3Right", "mHindLimb3Left", MISC, { "mHindLimb4Right" }, "0.003 -0.468 -0.030", "", true }, + { "mHindLimb4Right", "mHindLimb4Left", MISC, {}, "0.000 -0.061 0.112", "-0.008 0.000 0.105", true }, // wings - { "mWingsRoot", "", MISC }, - { "mWing1Left", "mWing1Right", MISC }, - { "mWing2Left", "mWing2Right", MISC }, - { "mWing3Left", "mWing3Right", MISC }, - { "mWing4Left", "mWing4Right", MISC }, - { "mWing4FanLeft", "mWing4FanRight", MISC }, - { "mWing1Right", "mWing1Left", MISC, {}, "", true }, - { "mWing2Right", "mWing2Left", MISC, {}, "", true }, - { "mWing3Right", "mWing3Left", MISC, {}, "", true }, - { "mWing4Right", "mWing4Left", MISC, {}, "", true }, - { "mWing4FanRight", "mWing4FanLeft", MISC, {}, "", true }, + { "mWingsRoot", "", MISC, { "mWing1Left", "mWing1Right" }, "0.000 0.000 -0.014" }, + { "mWing1Left", "mWing1Right", MISC, { "mWing2Left" }, "0.105 0.181 -0.099" }, + { "mWing2Left", "mWing2Right", MISC, { "mWing3Left" }, "0.169 0.067 -0.168" }, + { "mWing3Left", "mWing3Right", MISC, { "mWing4Left", "mWing4FanLeft" }, "0.183 0.000 -0.181" }, + { "mWing4Left", "mWing4Right", MISC, {}, "0.173 0.000 -0.171", "0.132 0.000 -0.146" }, + { "mWing4FanLeft", "mWing4FanRight", MISC, {}, "0.173 0.000 -0.171", "0.062 -0.159 -0.068" }, + { "mWing1Right", "mWing1Left", MISC, { "mWing2Right" }, "-0.105 0.181 -0.099", "", true }, + { "mWing2Right", "mWing2Left", MISC, { "mWing3Right" }, "-0.169 0.067 -0.168", "", true }, + { "mWing3Right", "mWing3Left", MISC, { "mWing4Right", "mWing4FanRight" }, "-0.183 0.000 -0.181", "", true }, + { "mWing4Right", "mWing4Left", MISC, {}, "-0.173 0.000 -0.171", "-0.132 0.000 -0.146", true }, + { "mWing4FanRight", "mWing4FanLeft", MISC, {}, "-0.173 0.000 -0.171", "-0.062 -0.159 -0.068", true }, // Collision Volumes { "LEFT_PEC", "RIGHT_PEC", COL_VOLUMES }, - { "RIGHT_PEC", "LEFT_PEC", COL_VOLUMES, {}, "", true }, + { "RIGHT_PEC", "LEFT_PEC", COL_VOLUMES, {}, "", "", true }, { "BELLY", "", COL_VOLUMES }, { "BUTT", "", COL_VOLUMES }, }; diff --git a/indra/newview/fsposingmotion.cpp b/indra/newview/fsposingmotion.cpp index e39c6569b0..fab282552c 100644 --- a/indra/newview/fsposingmotion.cpp +++ b/indra/newview/fsposingmotion.cpp @@ -117,17 +117,13 @@ bool FSPosingMotion::onUpdate(F32 time, U8* joint_mask) return true; } -void FSPosingMotion::onDeactivate() { revertChangesToPositionsScalesAndCollisionVolumes(); } +void FSPosingMotion::onDeactivate() { revertJointsAndCollisionVolumes(); } -void FSPosingMotion::revertChangesToPositionsScalesAndCollisionVolumes() +void FSPosingMotion::revertJointsAndCollisionVolumes() { for (FSJointPose jointPose : mJointPoses) { - jointPose.revertJointScale(); - jointPose.revertJointPosition(); - - if (jointPose.isCollisionVolume()) - jointPose.revertCollisionVolume(); + jointPose.revertJoint(); LLJoint* joint = jointPose.getJointState()->getJoint(); if (!joint) @@ -170,11 +166,7 @@ void FSPosingMotion::removeJointFromState(FSJointPose* joint) if (!avJoint) return; - joint->revertJointScale(); - joint->revertJointPosition(); - - if (joint->isCollisionVolume()) - joint->revertCollisionVolume(); + joint->revertJoint(); setJointState(avJoint, 0); } diff --git a/indra/newview/fsposingmotion.h b/indra/newview/fsposingmotion.h index 103e9bda6a..3b9d3a7a0d 100644 --- a/indra/newview/fsposingmotion.h +++ b/indra/newview/fsposingmotion.h @@ -173,7 +173,7 @@ private: /// Because changes to positions, scales and collision volumes do not end when the animation stops, /// this is required to revert them manually. /// - void revertChangesToPositionsScalesAndCollisionVolumes(); + void revertJointsAndCollisionVolumes(); /// /// Queries whether the supplied joint is being animated. diff --git a/indra/newview/gltfscenemanager.cpp b/indra/newview/gltfscenemanager.cpp index 74e14972ae..b4ab1692c3 100644 --- a/indra/newview/gltfscenemanager.cpp +++ b/indra/newview/gltfscenemanager.cpp @@ -356,8 +356,9 @@ void GLTFSceneManager::addGLTFObject(LLViewerObject* obj, LLUUID gltf_id) llassert(obj->getVolume()->getParams().getSculptID() == gltf_id); llassert(obj->getVolume()->getParams().getSculptType() == LL_SCULPT_TYPE_GLTF); - if (obj->mGLTFAsset) - { // object already has a GLTF asset, don't reload it + if (obj->mGLTFAsset || obj->mIsGLTFAssetMissing ) + { + // object already has a GLTF asset or load failed, don't reload it // TODO: below assertion fails on dupliate requests for assets -- possibly need to touch up asset loading state machine // llassert(std::find(mObjects.begin(), mObjects.end(), obj) != mObjects.end()); @@ -398,16 +399,19 @@ void GLTFSceneManager::onGLTFBinLoadComplete(const LLUUID& id, LLAssetType::ETyp } else { - LL_WARNS("GLTF") << "Failed to prepare GLTF asset: " << id << LL_ENDL; + LL_WARNS("GLTF") << "Failed to prepare GLTF asset: " << id << ". Marking as missing." << LL_ENDL; + obj->mIsGLTFAssetMissing = true; obj->mGLTFAsset = nullptr; } } } + obj->unref(); // todo: use LLPointer } } else { - LL_WARNS("GLTF") << "Failed to load GLTF asset: " << id << LL_ENDL; + LL_WARNS("GLTF") << "Failed to load GLTF asset: " << id << ". Marking as missing." << LL_ENDL; + obj->mIsGLTFAssetMissing = true; obj->unref(); } }); @@ -446,7 +450,8 @@ void GLTFSceneManager::onGLTFLoadComplete(const LLUUID& id, LLAssetType::EType a } else { - LL_WARNS("GLTF") << "Buffer URI is not a valid UUID: " << buffer.mUri << LL_ENDL; + LL_WARNS("GLTF") << "Buffer URI is not a valid UUID: " << buffer.mUri << " for asset id: " << id << ". Marking as missing." << LL_ENDL; + obj->mIsGLTFAssetMissing = true; obj->unref(); return; } @@ -455,7 +460,8 @@ void GLTFSceneManager::onGLTFLoadComplete(const LLUUID& id, LLAssetType::EType a } else { - LL_WARNS("GLTF") << "Failed to load GLTF asset: " << id << LL_ENDL; + LL_WARNS("GLTF") << "Failed to load GLTF asset: " << id << ". Marking as missing." << LL_ENDL; + obj->mIsGLTFAssetMissing = true; obj->unref(); } } @@ -517,6 +523,7 @@ void GLTFSceneManager::update() if (mUploadingObject) { mUploadingObject->mGLTFAsset = nullptr; + mUploadingObject->mIsGLTFAssetMissing = false; mUploadingObject->setGLTFAsset(assetId); mUploadingObject->markForUpdate(); mUploadingObject = nullptr; diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index cb4d9ce43a..0cf7c07d3a 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -241,8 +241,7 @@ Function CheckCPUFlagsAVX2 ; Replace %DLURL% in the language string with the URL ${WordReplace} "$(MissingAVX2)" "%DLURL%" "${DL_URL}-legacy-cpus" "+*" $3 MessageBox MB_OK "$3" - ${OpenURL} "${DL_URL}-legacy-cpus" - + MessageBox MB_YESNO $(AVX2OverrideConfirmation) IDNO NoInstall MessageBox MB_OKCANCEL $(AVX2OverrideNote) IDCANCEL NoInstall @@ -253,6 +252,7 @@ Function CheckCPUFlagsAVX2 Return NoInstall: + ${OpenURL} "${DL_URL}-legacy-cpus" Quit OK_AVX2: diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index cd55871a74..8826ba56a0 100644 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -226,7 +226,7 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass) else if (tex_b && !tex_a) { shader->bindTexture(LLViewerShaderMgr::BUMP_MAP, tex_b); - tex_a->setFilteringOption(filter_mode); + tex_b->setFilteringOption(filter_mode); blend_factor = 0; // only one tex provided, no blending } else if (tex_b != tex_a) diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp index d28c987414..a7756d61c0 100644 --- a/indra/newview/llfloaterfixedenvironment.cpp +++ b/indra/newview/llfloaterfixedenvironment.cpp @@ -419,7 +419,10 @@ bool LLFloaterFixedEnvironmentWater::postBuild() LLPanelSettingsWater * panel; panel = new LLPanelSettingsWaterMainTab; - panel->buildFromFile("panel_settings_water.xml"); + // [PhotoTools] Use FS specific panel XML for Water Settings + // panel->buildFromFile("panel_settings_water.xml"); // Original LL line - using default panel XML + panel->buildFromFile("panel_fs_settings_water.xml"); // Using FS specific panel XML + // panel->setWater(std::static_pointer_cast(mSettings)); panel->setOnDirtyFlagChanged( [this] (LLPanel *, bool value) { onPanelDirtyFlagChanged(value); }); mTab->addTabPanel(LLTabContainer::TabPanelParams().panel(panel).select_tab(true)); @@ -479,26 +482,35 @@ LLFloaterFixedEnvironmentSky::LLFloaterFixedEnvironmentSky(const LLSD &key) : LLFloaterFixedEnvironment(key) {} -bool LLFloaterFixedEnvironmentSky::postBuild() +bool LLFloaterFixedEnvironmentSky::postBuild() // <--- Corrected: Only one declaration now { if (!LLFloaterFixedEnvironment::postBuild()) return false; LLPanelSettingsSky * panel; panel = new LLPanelSettingsSkyAtmosTab; - panel->buildFromFile("panel_settings_sky_atmos.xml"); + // [PhotoTools] Use FS specific panel XML for Sky Atmosphere Settings + // panel->buildFromFile("panel_settings_sky_atmos.xml"); // Original LL line - using default panel XML + panel->buildFromFile("panel_fs_settings_sky_atmos.xml"); // Using FS specific panel XML + // panel->setSky(std::static_pointer_cast(mSettings)); panel->setOnDirtyFlagChanged([this](LLPanel *, bool value) { onPanelDirtyFlagChanged(value); }); mTab->addTabPanel(LLTabContainer::TabPanelParams().panel(panel).select_tab(true)); panel = new LLPanelSettingsSkyCloudTab; - panel->buildFromFile("panel_settings_sky_clouds.xml"); + // [PhotoTools] Use FS specific panel XML for Sky Cloud Settings + // panel->buildFromFile("panel_settings_sky_clouds.xml"); // Original LL line - using default panel XML + panel->buildFromFile("panel_fs_settings_sky_clouds.xml"); // Using FS specific panel XML + // panel->setSky(std::static_pointer_cast(mSettings)); panel->setOnDirtyFlagChanged([this](LLPanel *, bool value) { onPanelDirtyFlagChanged(value); }); mTab->addTabPanel(LLTabContainer::TabPanelParams().panel(panel).select_tab(false)); panel = new LLPanelSettingsSkySunMoonTab; - panel->buildFromFile("panel_settings_sky_sunmoon.xml"); + // [PhotoTools] Use FS specific panel XML for Sky Sun Moon Settings + // panel->buildFromFile("panel_settings_sky_sunmoon.xml"); // Original LL line - using default panel XML + panel->buildFromFile("panel_fs_settings_sky_sunmoon.xml"); // Using FS specific panel XML + // panel->setSky(std::static_pointer_cast(mSettings)); panel->setOnDirtyFlagChanged([this](LLPanel *, bool value) { onPanelDirtyFlagChanged(value); }); mTab->addTabPanel(LLTabContainer::TabPanelParams().panel(panel).select_tab(false)); diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 945b2d008d..b2d2fdeba3 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -2240,6 +2240,12 @@ void LLFloaterPreference::refreshEnabledState() max_texmem->setMinValue(MIN_VRAM_BUDGET); max_texmem->setMaxValue((F32)gGLManager.mVRAM); // + // [FIRE-35198] Limit VRAM texture usage UI control reverts to default value + static LLCachedControl max_vram_budget(gSavedSettings, "RenderMaxVRAMBudget", 0); // Get the same VRAM value that is used for the Bias calcuation + // Set the value of the UI element on after loggin in. (The value was correct and applied correctly, just the Graphics Settings slider defaulted backe to 4096 + // instead of the last set value by the user. + max_texmem->setValue((F32)max_vram_budget, false); + // [FIRE-35198] } // Support preferences search SLURLs diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 752a19b7c7..ac545cfe87 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -221,16 +221,19 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate if (!mSkipReshaping && !floaterp->isMinimized()) { LLView* controls_container = floaterp->getChild("controls_container"); + constexpr S32 THUMB_HEIGHT_LARGE = 420; + constexpr S32 THUMB_HEIGHT_SMALL = 124; + constexpr S32 THUMB_WIDTH_SMALL = 216; if (mAdvanced) { LLRect cc_rect = controls_container->getRect(); - floaterp->reshape(floater_width, 483); + floaterp->reshape(floater_width, floaterp->getOriginalHeight()); controls_container->setRect(cc_rect); controls_container->updateBoundingRect(); - thumbnail_placeholder->reshape(panel_width, 420); + thumbnail_placeholder->reshape(panel_width, THUMB_HEIGHT_LARGE); LLRect tn_rect = thumbnail_placeholder->getRect(); tn_rect.setLeftTopAndSize(215, floaterp->getRect().getHeight() - 30, tn_rect.getWidth(), tn_rect.getHeight()); @@ -244,15 +247,15 @@ void LLFloaterSnapshotBase::ImplBase::updateLayout(LLFloaterSnapshotBase* floate { LLRect cc_rect = controls_container->getRect(); - floaterp->reshape(floater_width, 613); + floaterp->reshape(floater_width,floaterp->getOriginalHeight()+THUMB_HEIGHT_SMALL); controls_container->setRect(cc_rect); controls_container->updateBoundingRect(); - thumbnail_placeholder->reshape(216, 124); + thumbnail_placeholder->reshape(THUMB_WIDTH_SMALL, THUMB_HEIGHT_SMALL); LLRect tn_rect = thumbnail_placeholder->getRect(); - tn_rect.setLeftTopAndSize(5, floaterp->getRect().getHeight() - 30, 216, 124); + tn_rect.setLeftTopAndSize(5, floaterp->getRect().getHeight() - 30, THUMB_WIDTH_SMALL, THUMB_HEIGHT_SMALL); thumbnail_placeholder->setRect(tn_rect); thumbnail_placeholder->updateBoundingRect(); @@ -1209,7 +1212,7 @@ bool LLFloaterSnapshot::postBuild() //getChild("local_size_combo")->selectNthItem(8); //getChild("local_format_combo")->selectNthItem(0); // - + mOriginalHeight = getRect().getHeight(); impl->mPreviewHandle = previewp->getHandle(); previewp->setContainer(this); impl->updateControls(this); diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h index 1fc101848c..e6c4025bb3 100644 --- a/indra/newview/llfloatersnapshot.h +++ b/indra/newview/llfloatersnapshot.h @@ -67,8 +67,9 @@ public: class ImplBase; friend class ImplBase; ImplBase* impl; - + S32 getOriginalHeight() const { return mOriginalHeight; } protected: + S32 mOriginalHeight; LLUICtrl* mThumbnailPlaceholder; LLUICtrl *mRefreshBtn, *mRefreshLabel; LLUICtrl *mSucceessLblPanel, *mFailureLblPanel; diff --git a/indra/newview/llheroprobemanager.cpp b/indra/newview/llheroprobemanager.cpp index 75268549d3..6589f18410 100644 --- a/indra/newview/llheroprobemanager.cpp +++ b/indra/newview/llheroprobemanager.cpp @@ -80,6 +80,17 @@ void LLHeroProbeManager::update() return; } + // Part of a hacky workaround to fix #3331. + // For some reason clearing shaders will cause mirrors to actually work. + // There's likely some deeper state issue that needs to be resolved. + // - Geenz 2025-02-25 + if (!mInitialized && LLStartUp::getStartupState() > STATE_PRECACHE) + { + LLViewerShaderMgr::instance()->clearShaderCache(); + LLViewerShaderMgr::instance()->setShaders(); + mInitialized = true; + } + LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY; llassert(!gCubeSnapshot); // assert a snapshot is not in progress if (LLAppViewer::instance()->logoutRequestSent()) diff --git a/indra/newview/llheroprobemanager.h b/indra/newview/llheroprobemanager.h index 58a94a3de8..2737ec5ddf 100644 --- a/indra/newview/llheroprobemanager.h +++ b/indra/newview/llheroprobemanager.h @@ -144,6 +144,7 @@ private: std::vector> mHeroVOList; LLPointer mNearestHero; - + // Part of a hacky workaround to fix #3331. + bool mInitialized = false; }; diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp index 1790bb0984..429171e6be 100644 --- a/indra/newview/llpanelprofile.cpp +++ b/indra/newview/llpanelprofile.cpp @@ -717,6 +717,7 @@ LLPanelProfileSecondLife::LLPanelProfileSecondLife() , mAllowPublish(false) , mHideAge(false) , mRlvBehaviorCallbackConnection() // RLVa support + , mPreview(false) // Preview button { } @@ -785,6 +786,7 @@ bool LLPanelProfileSecondLife::postBuild() mIMButton = getChild("im"); mOverflowButton = getChild("overflow_btn"); // + mPreviewButton = getChild("btn_preview"); // Preview button // Fix LL UI/UX design accident //mShowInSearchCombo->setCommitCallback([this](LLUICtrl*, void*) { onShowInSearchCallback(); }, nullptr); @@ -802,6 +804,9 @@ bool LLPanelProfileSecondLife::postBuild() mPayButton->setCommitCallback([this](LLUICtrl*, void*) { onCommitMenu(LLSD("pay")); }, nullptr); mIMButton->setCommitCallback([this](LLUICtrl*, void*) { onCommitMenu(LLSD("im")); }, nullptr); // + // Preview button + mPreviewButton->setCommitCallback([this](LLUICtrl*, void*) { onCommitMenu(LLSD("preview")); }, nullptr); + // mGroupList->setDoubleClickCallback([this](LLUICtrl*, S32 x, S32 y, MASK mask) { LLPanelProfileSecondLife::openGroupProfile(); }); mGroupList->setReturnCallback([this](LLUICtrl*, const LLSD&) { LLPanelProfileSecondLife::openGroupProfile(); }); mSaveDescriptionChanges->setCommitCallback([this](LLUICtrl*, void*) { onSaveDescriptionChanges(); }, nullptr); @@ -856,6 +861,7 @@ void LLPanelProfileSecondLife::onOpen(const LLSD& key) mDiscardDescriptionChanges->setVisible(own_profile); mShowInSearchCheckbox->setVisible(own_profile); // + mPreviewButton->setVisible(own_profile); // Preview button if (own_profile) { @@ -1785,6 +1791,7 @@ void LLPanelProfileSecondLife::setLoaded() //{ // mHideAgeCombo->setEnabled(true); mShowInSearchCheckbox->setEnabled(true); + mPreviewButton->setEnabled(true); // Preview button if (mHideAgeCheckbox->getVisible()) { mHideAgeCheckbox->setEnabled(true); @@ -1801,6 +1808,10 @@ void LLPanelProfileSecondLife::updateButtons() { mShowInSearchCheckbox->setVisible(true); mShowInSearchCheckbox->setEnabled(true); +// Preview button + mPreviewButton->setVisible(true); + mPreviewButton->setEnabled(true); +// mDescriptionEdit->setEnabled(true); } else @@ -2104,6 +2115,32 @@ void LLPanelProfileSecondLife::onCommitMenu(const LLSD& userdata) LLAvatarActions::report(agent_id); } // + // Preview button + else if (item_name == "preview") + { + mPreview = !mPreview; + + mDescriptionEdit->setEnabled(!mPreview); + mDescriptionEdit->setParseHTML(mPreview); + + if (mPreview) { + mPreviewButton->setImageOverlay("Profile_Group_Visibility_Off"); + if (mHasUnsavedDescriptionChanges) { + mSaveDescriptionChanges->setEnabled(false); + mDiscardDescriptionChanges->setEnabled(false); + } + mOriginalDescriptionText = mDescriptionEdit->getValue().asString(); + reparseDescriptionText(mOriginalDescriptionText); + } else { + mPreviewButton->setImageOverlay("Profile_Group_Visibility_On"); + if (mHasUnsavedDescriptionChanges) { + mSaveDescriptionChanges->setEnabled(true); + mDiscardDescriptionChanges->setEnabled(true); + } + reparseDescriptionText(mOriginalDescriptionText); + } + } + // } bool LLPanelProfileSecondLife::onEnableMenu(const LLSD& userdata) @@ -2222,6 +2259,13 @@ void LLPanelProfileSecondLife::setDescriptionText(const std::string &text) mDescriptionEdit->setValue(mDescriptionText); } +// Preview button +void LLPanelProfileSecondLife::reparseDescriptionText(const std::string &text) +{ + mDescriptionEdit->reparseValue(text); +} +// + void LLPanelProfileSecondLife::onSetDescriptionDirty() { mSaveDescriptionChanges->setEnabled(true); @@ -2679,6 +2723,7 @@ void LLPanelProfileWeb::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent e LLPanelProfileFirstLife::LLPanelProfileFirstLife() : LLPanelProfilePropertiesProcessorTab() , mHasUnsavedChanges(false) + , mPreview(false) // Preview button { } @@ -2699,12 +2744,16 @@ bool LLPanelProfileFirstLife::postBuild() mRemovePhoto = getChild("fl_remove_image"); mSaveChanges = getChild("fl_save_changes"); mDiscardChanges = getChild("fl_discard_changes"); + mPreviewButton = getChild("btn_preview"); // Preview button mUploadPhoto->setCommitCallback([this](LLUICtrl*, void*) { onUploadPhoto(); }, nullptr); mChangePhoto->setCommitCallback([this](LLUICtrl*, void*) { onChangePhoto(); }, nullptr); mRemovePhoto->setCommitCallback([this](LLUICtrl*, void*) { onRemovePhoto(); }, nullptr); mSaveChanges->setCommitCallback([this](LLUICtrl*, void*) { onSaveDescriptionChanges(); }, nullptr); mDiscardChanges->setCommitCallback([this](LLUICtrl*, void*) { onDiscardDescriptionChanges(); }, nullptr); + // Preview button + mPreviewButton->setCommitCallback([this](LLUICtrl*, void*) { onClickPreview(); }, nullptr); + // mDescriptionEdit->setKeystrokeCallback([this](LLTextEditor* caller) { onSetDescriptionDirty(); }); mPicture->setCommitCallback(boost::bind(&LLPanelProfileFirstLife::onFirstLifePicChanged, this)); // Allow proper texture swatch handling @@ -2720,6 +2769,8 @@ void LLPanelProfileFirstLife::onOpen(const LLSD& key) // Otherwise as the only focusable element it will be selected mDescriptionEdit->setTabStop(false); } + mPreviewButton->setVisible(getSelfProfile()); // Preview button + mDescriptionEdit->setParseHTML(!getSelfProfile()); // Fix FIRE-35185 (disables link rendering while editing picks or 1st life) // Allow proper texture swatch handling mPicture->setEnabled(getSelfProfile()); @@ -2893,6 +2944,13 @@ void LLPanelProfileFirstLife::setDescriptionText(const std::string &text) mDescriptionEdit->setValue(mCurrentDescription); } +// Preview button +void LLPanelProfileFirstLife::reparseDescriptionText(const std::string &text) +{ + mDescriptionEdit->reparseValue(text); +} +// + void LLPanelProfileFirstLife::onSetDescriptionDirty() { mSaveChanges->setEnabled(true); @@ -2949,6 +3007,33 @@ void LLPanelProfileFirstLife::onDiscardDescriptionChanges() setDescriptionText(mCurrentDescription); } +// Preview button +void LLPanelProfileFirstLife::onClickPreview() +{ + mPreview = !mPreview; + + mDescriptionEdit->setEnabled(!mPreview); + mDescriptionEdit->setParseHTML(mPreview); + + if (mPreview) { + mPreviewButton->setImageOverlay("Profile_Group_Visibility_Off"); + if (mHasUnsavedChanges) { + mSaveChanges->setEnabled(false); + mDiscardChanges->setEnabled(false); + } + mOriginalDescription = mDescriptionEdit->getValue().asString(); + reparseDescriptionText(mOriginalDescription); + } else { + mPreviewButton->setImageOverlay("Profile_Group_Visibility_On"); + if (mHasUnsavedChanges) { + mSaveChanges->setEnabled(true); + mDiscardChanges->setEnabled(true); + } + reparseDescriptionText(mOriginalDescription); + } +} +// + void LLPanelProfileFirstLife::processProperties(void * data, EAvatarProcessorType type) { if (APT_PROPERTIES == type) @@ -3025,6 +3110,7 @@ void LLPanelProfileFirstLife::resetData() // mSaveChanges->setVisible(getSelfProfile()); mDiscardChanges->setVisible(getSelfProfile()); + mPreviewButton->setVisible(getSelfProfile()); // Preview button } void LLPanelProfileFirstLife::setLoaded() @@ -3036,6 +3122,7 @@ void LLPanelProfileFirstLife::setLoaded() mDescriptionEdit->setEnabled(true); mPicture->setEnabled(true); mRemovePhoto->setEnabled(mImageId.notNull()); + mPreviewButton->setEnabled(true); } } diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h index d348da069a..4e7bd51dce 100644 --- a/indra/newview/llpanelprofile.h +++ b/indra/newview/llpanelprofile.h @@ -203,6 +203,9 @@ private: void onAvatarNameCacheSetName(const LLUUID& id, const LLAvatarName& av_name); void setDescriptionText(const std::string &text); + // Preview button + void reparseDescriptionText(const std::string& text); + // void onSetDescriptionDirty(); void onShowInSearchCallback(); void onHideAgeCallback(); @@ -266,6 +269,7 @@ private: LLButton* mIMButton; LLMenuButton* mOverflowButton; // + LLButton* mPreviewButton; // Preview button LLHandle mFloaterPermissionsHandle; LLHandle mFloaterProfileTextureHandle; @@ -275,8 +279,10 @@ private: bool mVoiceStatus; bool mWaitingForImageUpload; bool mAllowPublish; + bool mPreview; // Preview button bool mHideAge; std::string mDescriptionText; + std::string mOriginalDescriptionText; // Preview button LLUUID mImageId; boost::signals2::connection mAvatarNameCacheConnection; @@ -366,9 +372,13 @@ protected: void onFirstLifePicChanged(); // Allow proper texture swatch handling void onCommitPhoto(const LLUUID& id); void setDescriptionText(const std::string &text); + // Preview button + void reparseDescriptionText(const std::string& text); + // void onSetDescriptionDirty(); void onSaveDescriptionChanges(); void onDiscardDescriptionChanges(); + void onClickPreview(); // Preview button LLTextEditor* mDescriptionEdit; // Allow proper texture swatch handling @@ -380,12 +390,17 @@ protected: LLButton* mRemovePhoto; LLButton* mSaveChanges; LLButton* mDiscardChanges; + LLButton* mPreviewButton; // Preview button LLHandle mFloaterTexturePickerHandle; std::string mCurrentDescription; LLUUID mImageId; bool mHasUnsavedChanges; +// Preview button + bool mPreview; + std::string mOriginalDescription; +// }; /** diff --git a/indra/newview/llpanelprofilepicks.cpp b/indra/newview/llpanelprofilepicks.cpp index 574995c4fe..68dd18dde5 100644 --- a/indra/newview/llpanelprofilepicks.cpp +++ b/indra/newview/llpanelprofilepicks.cpp @@ -543,6 +543,9 @@ LLPanelProfilePick::LLPanelProfilePick() , mIsEditing(false) , mRegionCallbackConnection() , mParcelCallbackConnection() +// Preview button + , mPreview(false) +// { } @@ -622,6 +625,11 @@ void LLPanelProfilePick::setAvatarId(const LLUUID& avatar_id) resetDirty(); +// Preview button + mPreviewButton->setVisible(getSelfProfile()); + mPreviewButton->setEnabled(getSelfProfile()); +// + if (getSelfProfile()) { mPickName->setEnabled(true); @@ -645,6 +653,7 @@ bool LLPanelProfilePick::postBuild() mCreateButton = getChild("create_changes_btn"); mCancelButton = getChild("cancel_changes_btn"); mSetCurrentLocationButton = getChild("set_to_curr_location_btn"); // Keep set location button + mPreviewButton = getChild("btn_preview"); // Preview button mSnapshotCtrl = getChild("pick_snapshot"); mSnapshotCtrl->setCommitCallback(boost::bind(&LLPanelProfilePick::onSnapshotChanged, this)); @@ -658,6 +667,9 @@ bool LLPanelProfilePick::postBuild() mCreateButton->setCommitCallback(boost::bind(&LLPanelProfilePick::onClickSave, this)); mCancelButton->setCommitCallback(boost::bind(&LLPanelProfilePick::onClickCancel, this)); mSetCurrentLocationButton->setCommitCallback(boost::bind(&LLPanelProfilePick::onClickSetLocation, this)); // Keep set location button + // Preview button + mPreviewButton->setCommitCallback(boost::bind(&LLPanelProfilePick::onClickPreview, this)); + // mPickName->setKeystrokeCallback(boost::bind(&LLPanelProfilePick::onPickChanged, this, _1), NULL); mPickName->setEnabled(false); @@ -700,7 +712,10 @@ void LLPanelProfilePick::processProperties(void* data, EAvatarProcessorType type void LLPanelProfilePick::processProperties(const LLPickData* pick_info) { mIsEditing = false; - mPickDescription->setParseHTML(true); + // Fix FIRE-35185 (disables link rendering while editing picks or 1st life) + //mPickDescription->setParseHTML(true); + mPickDescription->setParseHTML(!getSelfProfile()); + // mParcelId = pick_info->parcel_id; setSnapshotId(pick_info->snapshot_id); if (!getSelfProfile()) @@ -752,6 +767,13 @@ void LLPanelProfilePick::setPickDesc(const std::string& desc) mPickDescription->setValue(desc); } +// Preview button +void LLPanelProfilePick::reparseDescription(const std::string& desc) +{ + mPickDescription->reparseValue(desc); +} +// + void LLPanelProfilePick::setPickLocation(const std::string& location) { getChild("pick_location")->setValue(location); @@ -848,6 +870,28 @@ void LLPanelProfilePick::onClickSetLocation() } // +// Preview button +void LLPanelProfilePick::onClickPreview() +{ + mPreview = !mPreview; + + if (mPreview) { // Then we switch to preview mode + mPreviewButton->setImageOverlay("Profile_Group_Visibility_Off"); + mOriginalPickText = mPickDescription->getValue().asString(); + mPickDescription->setEnabled(!mPreview); + mPickDescription->setParseHTML(mPreview); + reparseDescription(mOriginalPickText); + enableSaveButton(false); + } else { // we switch to edit mode, restoring the dirty state if necessary + mPreviewButton->setImageOverlay("Profile_Group_Visibility_On"); + mPickDescription->setEnabled(!mPreview); + mPickDescription->setParseHTML(mPreview); + reparseDescription(mOriginalPickText); + enableSaveButton(isDirty()); // re-check if whole pick is dirty + } +} +// + void LLPanelProfilePick::onClickSave() { if (mRegionCallbackConnection.connected()) diff --git a/indra/newview/llpanelprofilepicks.h b/indra/newview/llpanelprofilepicks.h index ed39fa6e9a..d1962e489e 100644 --- a/indra/newview/llpanelprofilepicks.h +++ b/indra/newview/llpanelprofilepicks.h @@ -173,6 +173,9 @@ public: */ virtual void setSnapshotId(const LLUUID& id); virtual void setPickDesc(const std::string& desc); + // Preview button + virtual void reparseDescription(const std::string& desc); + // virtual void setPickLocation(const std::string& location); virtual void setPosGlobal(const LLVector3d& pos) { mPosGlobal = pos; } @@ -215,6 +218,13 @@ public: void onClickSetLocation(); // + // Preview button + /** + * Callback for "Preview" button click + */ + void onClickPreview(); + // + /** * Callback for "Save" and "Create" button click */ @@ -241,6 +251,7 @@ protected: LLButton* mSaveButton; LLButton* mCreateButton; LLButton* mCancelButton; + LLButton* mPreviewButton; // Preview button LLVector3d mPosGlobal; LLUUID mParcelId; @@ -254,6 +265,10 @@ protected: bool mLocationChanged; bool mNewPick; bool mIsEditing; +// Preview button + bool mPreview; + std::string mOriginalPickText; +// void onDescriptionFocusReceived(); }; diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 7143c19ec9..b633dc4fed 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -2082,6 +2082,28 @@ LLPointer LLTextureCache::readFromFastCache(const LLUUID& id, S32& d } LLPointer raw = new LLImageRaw(data, head[0], head[1], head[2], true); + // + // This fixes the invalid discard values from being created which cause the decoder code to fail when trying to handle 6 and 7's which are above the MAX_DISCARD_LEVEL of 5 + // especially on load + // We will expand the 16x16 texture to the actual MAX_DISCARD_LEVEL texture size, it may be blurry until the user gets closer but 5 discard value should be objects far from the camera. + // So a 1024x1024 texture with a dicard of 6 will become 32x32 and a 2048x2048 texture with a discard of 7 will become a 64x64 texture. + if (discardlevel > MAX_DISCARD_LEVEL) + { + S32 w = head[0]; // Get the current width from the header (16) + S32 h = head[1]; // Get the current height from the header (16) + + // Expand the width and height by teh difference between the discard and MAX_DISCARD_LEVEL bit shifted to the left. (Expand power of 2 textures) + w <<= MAX_DISCARD_LEVEL - discardlevel; + h <<= MAX_DISCARD_LEVEL - discardlevel; + + // Set the discard level to the MAX_DISCARD_LEVEL + discardlevel = MAX_DISCARD_LEVEL; + + // Scale up the texture and scale the actual data, as we just created it above, it should be fine. + raw->scale(w, h, true); + } + // + return raw; } diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 47e5cd1053..26627e6ce4 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -711,19 +711,21 @@ void LLGLTexMemBar::draw() //text = llformat("Textures: %d Fetch: %d(%d) Pkts:%d(%d) Cache R/W: %d/%d LFS:%d RAW:%d HTP:%d DEC:%d CRE:%d ", text = llformat("Tex: %d Fetch: %d(%d) Pkts:%d(%d) CAC R/W: %d/%d LFS:%d RAW:%d HTP:%d DEC:%d CRE:%d FCA:%d ", // + // Fixed up the missing variables and converted 64bit size_t's to S32's to allow proper numbers to appear gTextureList.getNumImages(), LLAppViewer::getTextureFetch()->getNumRequests(), LLAppViewer::getTextureFetch()->getNumDeletes(), + LLAppViewer::getTextureFetch()->mPacketCount, LLAppViewer::getTextureFetch()->mBadPacketCount, LLAppViewer::getTextureCache()->getNumReads(), LLAppViewer::getTextureCache()->getNumWrites(), - LLLFSThread::sLocal->getPending(), - LLImageRaw::sRawImageCount, + (S32)LLLFSThread::sLocal->getPending(), + (S32)LLImageRaw::sRawImageCount, LLAppViewer::getTextureFetch()->getNumHTTPRequests(), - LLAppViewer::getImageDecodeThread()->getPending(), + (S32)LLAppViewer::getImageDecodeThread()->getPending(), // Fast cache stats //gTextureList.mCreateTextureList.size()); - gTextureList.mCreateTextureList.size(), - gTextureList.mFastCacheList.size()); + (S32)gTextureList.mCreateTextureList.size(), + (S32)gTextureList.mFastCacheList.size()); // - + // x_right = 550.0f; LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0.f, (F32)(v_offset + line_height*3), text_color, LLFontGL::LEFT, LLFontGL::TOP, diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 3041eda05a..ec7a57712c 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -435,9 +435,13 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("emoji_picker", "floater_emoji_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("emoji_complete", "floater_emoji_complete.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("env_post_process", "floater_post_process.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - - LLFloaterReg::add("env_fixed_environmentent_water", "floater_fixedenvironment.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("env_fixed_environmentent_sky", "floater_fixedenvironment.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + + // [PhotoTools] Use FS specific XML for Fixed Environment Floater + //LLFloaterReg::add("env_fixed_environmentent_water", "floater_fixedenvironment.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); // Commenting out original LL line + LLFloaterReg::add("env_fixed_environmentent_water", "floater_fs_fixedenvironment.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); // Using FS specific floater XML + // [PhotoTools] Use FS specific XML for Fixed Environment Floater + //LLFloaterReg::add("env_fixed_environmentent_sky", "floater_fixedenvironment.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); // Commenting out original LL line + LLFloaterReg::add("env_fixed_environmentent_sky", "floater_fs_fixedenvironment.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); // Using FS specific floater XML LLFloaterReg::add("env_adjust_snapshot", "floater_adjust_environment.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); @@ -652,7 +656,9 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("money_tracker", "floater_fs_money_tracker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("particle_editor","floater_particle_editor.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("performance", "floater_fs_performance.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add(PHOTOTOOLS_FLOATER, "floater_phototools.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + // [PhotoTools] Corrected typo in Phototools floater registration - using string literal instead of PHOTOTOOLS_FLOATER constant (likely intended). + // LLFloaterReg::add(PHOTOTOOLS_FLOATER, "floater_phototools.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); // Original line with likely typo + LLFloaterReg::add("phototools", "floater_phototools.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); // Corrected line - using string literal "phototools" LLFloaterReg::add("phototools_camera", "floater_phototools_camera.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("quickprefs", "floater_quickprefs.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("region_tracker", "floater_region_tracker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index c5a188b80e..a25ff25cee 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -8637,7 +8637,9 @@ class LLPromptShowURL : public view_listener_t { LLSD payload; payload["url"] = url; - LLNotificationsUtil::add(alert, LLSD(), payload, callback_show_url); + LLSD args; + args["UNTRUSTED_URL"] = url; + LLNotificationsUtil::add(alert, args, payload, callback_show_url); } // } diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 38b3c5d31e..5f2f5569db 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -4192,6 +4192,14 @@ void LLViewerObject::boostTexturePriority(bool boost_children /* = true */) S32 tex_count = getNumTEs(); for (i = 0; i < tex_count; i++) { + // + // This isused to fix the textures becoming blury when object interacted with by the user and unselected. + // If this is changing the boost level for the TEImage for the first time, store the boost level before modifying it. + if (getTEImage(i)->getBoostLevel() != LLGLTexture::BOOST_SELECTED) + { + getTEImage(i)->storeBoostLevel(); + } + // getTEImage(i)->setBoostLevel(LLGLTexture::BOOST_SELECTED); } @@ -4199,7 +4207,17 @@ void LLViewerObject::boostTexturePriority(bool boost_children /* = true */) { LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT); LLUUID sculpt_id = sculpt_params->getSculptTexture(); - LLViewerTextureManager::getFetchedTexture(sculpt_id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)->setBoostLevel(LLGLTexture::BOOST_SELECTED); + // + //LLViewerTextureManager::getFetchedTexture(sculpt_id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE)->setBoostLevel(LLGLTexture::BOOST_SELECTED); + // This isused to fix the textures becoming blury when object interacted with by the user and unselected. + // If this is changing the boost level for the sculpted for the first time, store the boost level before modifying it. + LLViewerFetchedTexture* sculptedTexture = LLViewerTextureManager::getFetchedTexture(sculpt_id, FTT_DEFAULT, true, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); + if (sculptedTexture->getBoostLevel() != LLGLTexture::BOOST_SELECTED) + { + sculptedTexture->storeBoostLevel(); + } + // + sculptedTexture->setBoostLevel(LLGLTexture::BOOST_SELECTED); } if (boost_children) diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 5fc289ed47..d016eef610 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -779,6 +779,7 @@ public: // Associated GLTF Asset std::shared_ptr mGLTFAsset; + bool mIsGLTFAssetMissing = false; // Pipeline classes LLPointer mDrawable; diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 7ae33fd174..9150d87f0f 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -2929,10 +2929,7 @@ bool LLViewerShaderMgr::loadShadersDeferred() gRlvSphereProgram.mFeatures.isDeferred = true; gRlvSphereProgram.mShaderFiles.clear(); gRlvSphereProgram.mShaderFiles.push_back(make_pair("deferred/rlvV.glsl", GL_VERTEX_SHADER)); - if (gGLManager.mGLVersion >= 4.5f) - gRlvSphereProgram.mShaderFiles.push_back(make_pair("deferred/rlvF.glsl", GL_FRAGMENT_SHADER)); - else - gRlvSphereProgram.mShaderFiles.push_back(make_pair("deferred/rlvFLegacy.glsl", GL_FRAGMENT_SHADER)); + gRlvSphereProgram.mShaderFiles.push_back(make_pair("deferred/rlvF.glsl", GL_FRAGMENT_SHADER)); gRlvSphereProgram.mShaderLevel = mShaderLevel[SHADER_DEFERRED]; success = gRlvSphereProgram.createShader(); } diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 58daf580bc..22f872ec3f 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -3134,7 +3134,10 @@ void LLViewerLODTexture::processTextureStats() // unset it immediately after we consume it if (getBoostLevel() == BOOST_SELECTED) { - setBoostLevel(BOOST_NONE); + // + //setBoostLevel(BOOST_NONE); + restoreBoostLevel(); + // } } diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 8f6431cee9..6376287f20 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -917,8 +917,37 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag F32 bias = llclamp(max_discard - 2.f, 1.f, LLViewerTexture::sDesiredDiscardBias); // convert bias into a vsize scaler - bias = (F32) llroundf(powf(4, bias - 1.f)); + // [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer + //bias = (F32) llroundf(powf(4, bias - 1.f)); + // Pre-divied the bias so you can just use multiiply in the loop + bias = (F32) 1.0f / llroundf(powf(4, bias - 1.f)); + // Apply new rules to bias discard, there are now 2 bias, off-screen and on-screen. + // On-screen Bias + // Only applied to LOD Textures and one that have Discard > 1 (0, 1 protected) + // + // Off-screen Bias + // Will be using the old method of applying the mMaxVirtualSize, however + // only on LOD textures and fetched textures get bias applied. + // + // Local (UI & Icons), Media and Dynamic textures should not have any discard applied to them. + // + // Without this, textures will become blurry that are on screen, which is one of the #1 + // user complaints. + + // Store a seperate max on screen vsize without bias applied. + F32 max_on_screen_vsize = 0.0f; + S32 on_screen_count = 0; + // Moved all the variables outside of the loop + bool current_on_screen = false; + F32 radius; // Moved outside the loop to save reallocation every loop + F32 cos_angle_to_view_dir; // Moved outside the loop to save reallocation every loop + F32 vsize = 0.0f; // Moved outside the loop to save reallocation every loop + F32 important_to_camera = 0.0f; + // [FIRE-35081] + // boost resolution of textures that are important to the camera + // Can instead of using max for a min of 1.0, just subtract 1 from the boost and just do a 1 + (TextureCameraBoost - 1) * importanceToCamera) + static LLCachedControl texture_camera_boost(gSavedSettings, "TextureCameraBoost", 7.f); LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE; for (U32 i = 0; i < LLRender::NUM_TEXTURE_CHANNELS; ++i) { @@ -929,8 +958,11 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag if (face && face->getViewerObject()) { ++face_count; - F32 radius; - F32 cos_angle_to_view_dir; + // [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer + // Moved outside the loop to stop createing new memory every loop + //F32 radius; + //F32 cos_angle_to_view_dir; + // [FIRE-35081] if ((gFrameCount - face->mLastTextureUpdate) > 10) { // only call calcPixelArea at most once every 10 frames for a given face @@ -940,9 +972,16 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag face->mLastTextureUpdate = gFrameCount; } - F32 vsize = face->getPixelArea(); - - on_screen = face->mInFrustum; + + // Also moved allocation outside the loop + // [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer + //F32 vsize = face->getPixelArea(); + //on_screen = face->mInFrustum; + vsize = face->getPixelArea(); + current_on_screen = face->mInFrustum; // Create a new var to store the current on screen status + on_screen_count += current_on_screen; // Count the number of on sceen faces instead of using brach + important_to_camera = face->mImportanceToCamera; // Store so we don't have to do 2 indirects later on + // [FIRE-35081] // Scale desired texture resolution higher or lower depending on texture scale // @@ -958,6 +997,8 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag min_scale = llclamp(min_scale * min_scale, texture_scale_min(), texture_scale_max()); vsize /= min_scale; + // [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer + /* // apply bias to offscreen faces all the time, but only to onscreen faces when bias is large if (!face->mInFrustum || LLViewerTexture::sDesiredDiscardBias > 2.f) { @@ -972,10 +1013,29 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag } max_vsize = llmax(max_vsize, vsize); + */ + + // Use math to skip having to use a conditaional check + // Bools are stored as 0 false, 1 true, use to cheat + // Lerp instead of doing conditional input + // If the image is import to the camera, even a little then make the on screen true + on_screen_count += S32(important_to_camera * 1000.0f); + vsize = vsize + (vsize * (1.0f + important_to_camera * texture_camera_boost) - vsize) * F32(current_on_screen); + + // Update the max on screen vsize based upon the on screen vsize + max_on_screen_vsize = llmax(max_on_screen_vsize, vsize); + max_vsize = llmax(max_vsize, vsize * bias); + // [FIRE-35081] } } } + // + // Replaced all the checks for this bool to be only in this 1 place instead of in the loop. + // If the on screen counter is greater then 0, then there was at least 1 on screen texture + on_screen = bool(on_screen_count); + // + if (face_count > 1024) { // this texture is used in so many places we should just boost it and not bother checking its vsize // this is especially important because the above is not time sliced and can hit multiple ms for a single texture @@ -993,8 +1053,30 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag imagep->mMaxVirtualSize = 0.f; } } - - imagep->addTextureStats(max_vsize); + // [FIRE-35081] Blurry prims not changing with graphics settings, not happening with SL Viewer + //imagep->addTextureStats(max_vsize); + // New logic block for the bias system + // Fetched Textures (Non LOD normal textures) Or LOD Textures with a discard level of 0 or 1 or have a Bias < 2.0 + if (imagep->getType() == LLViewerTexture::FETCHED_TEXTURE || (imagep->getType() == LLViewerTexture::LOD_TEXTURE && (imagep->getDiscardLevel() < 2 || LLViewerTexture::sDesiredDiscardBias < 2.0f))) + { + // Perform Lerp without function call + max_vsize = max_vsize + (max_on_screen_vsize - max_vsize) * F32(on_screen); + // Only apply the bias when off screen, otherwise use the non bias caculated value + imagep->addTextureStats(max_vsize); + } + // All other LOD texture textures + else if (imagep->getType() == LLViewerTexture::LOD_TEXTURE) + { + // Apply the off screen texture max virtual size + imagep->addTextureStats(max_vsize); + } + // All dynamic or local textures block + else + { + // Only apply the max on screen virtual size to textures that should not be scaled + imagep->addTextureStats(max_on_screen_vsize); + } + // [FIRE-35081] } #if 0 diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index 2303d4e378..95ef41a771 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -103,7 +103,9 @@ void LLWeb::loadURLExternal(const std::string& url, bool async, const std::strin LLSD payload; payload["url"] = url; - LLNotificationsUtil::add( "WebLaunchExternalTarget", LLSD(), payload, boost::bind(on_load_url_external_response, _1, _2, async)); + LLSD args; + args["UNTRUSTED_URL"] = url; + LLNotificationsUtil::add( "WebLaunchExternalTarget", args, payload, boost::bind(on_load_url_external_response, _1, _2, async)); } // static diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 04fe231275..b9d9830298 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -354,6 +354,9 @@ bool LLPipeline::sReflectionProbesEnabled = false; S32 LLPipeline::sVisibleLightCount = 0; bool LLPipeline::sRenderingHUDs; F32 LLPipeline::sDistortionWaterClipPlaneMargin = 1.0125f; +LLVector3 LLPipeline::sLastFocusPoint={};// FIRE-16728 focus point lock & free focus DoF +bool LLPipeline::sDoFEnabled = false; + F32 LLPipeline::sVolumeSAFrame = 0.f; // ZK LBG bool LLPipeline::sRenderParticles; // flag to hold correct, user selected, status of particles @@ -4480,6 +4483,48 @@ void LLPipeline::recordTrianglesDrawn() add(LLStatViewer::TRIANGLES_DRAWN, LLUnits::Triangles::fromValue(count)); } +// FIRE-32023 Focus Point Rendering +void LLPipeline::renderFocusPoint() +{ + + static LLCachedControl render_focus_point_crosshair(gSavedSettings, "FSFocusPointRender", false); + if ( sDoFEnabled && render_focus_point_crosshair && gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) + { + gDebugProgram.bind(); + LLVector3 focus_point = sLastFocusPoint; + F32 size = 0.02f; + LLGLDepthTest gls_depth(GL_FALSE); + gGL.pushMatrix(); + gGL.translatef(focus_point.mV[VX], focus_point.mV[VY], focus_point.mV[VZ]); + + gGL.begin(LLRender::LINES); + if (LLPipeline::FSFocusPointLocked) + { + gGL.color4f(1.0f, 0.0f, 0.0f, 0.5f); + } + else + { + gGL.color4f(1.0f, 1.0f, 0.0f, 0.5f); + } + gGL.vertex3f(-size, 0.0f, 0.0f); + gGL.vertex3f(size, 0.0f, 0.0f); + + // Y-axis (Green) + gGL.vertex3f(0.0f, -size, 0.0f); + gGL.vertex3f(0.0f, size, 0.0f); + + // Z-axis (Blue) + gGL.vertex3f(0.0f, 0.0f, -size); + gGL.vertex3f(0.0f, 0.0f, size); + + gGL.end(); + + gGL.popMatrix(); + gGL.flush(); + gDebugProgram.unbind(); + } +} +// void LLPipeline::renderPhysicsDisplay() { if (!hasRenderDebugMask(LLPipeline::RENDER_DEBUG_PHYSICS_SHAPES)) @@ -8121,14 +8166,14 @@ bool LLPipeline::renderSnapshotFrame(LLRenderTarget* src, LLRenderTarget* dst) void LLPipeline::renderDoF(LLRenderTarget* src, LLRenderTarget* dst) { { - bool dof_enabled = + sDoFEnabled = // // FIRE-32023 Render focus point (RenderDepthOfFieldInEditMode || !LLToolMgr::getInstance()->inBuildMode()) && RenderDepthOfField && !gCubeSnapshot; gViewerWindow->setup3DViewport(); - if (dof_enabled) + if (sDoFEnabled) // // FIRE-32023 Render focus point { LL_PROFILE_GPU_ZONE("dof"); LLGLDisable blend(GL_BLEND); @@ -8141,10 +8186,10 @@ void LLPipeline::renderDoF(LLRenderTarget* src, LLRenderTarget* dst) LLVector3 focus_point; // FIRE-16728 focus point lock & free focus DoF - based on a feature developed by NiranV Dean - static LLVector3 last_focus_point{}; - if (LLPipeline::FSFocusPointLocked && !last_focus_point.isExactlyZero()) + + if (LLPipeline::FSFocusPointLocked && !sLastFocusPoint.isExactlyZero()) { - focus_point = last_focus_point; + focus_point = sLastFocusPoint; } else { @@ -8191,7 +8236,7 @@ void LLPipeline::renderDoF(LLRenderTarget* src, LLRenderTarget* dst) } // FIRE-16728 Add free aim mouse and focus lock - last_focus_point = focus_point; + sLastFocusPoint = focus_point; // LLVector3 eye = LLViewerCamera::getInstance()->getOrigin(); F32 target_distance = 16.f; @@ -8489,6 +8534,8 @@ void LLPipeline::renderFinalize() gDeferredPostNoDoFNoiseProgram.unbind(); gGL.setSceneBlendType(LLRender::BT_ALPHA); + + renderFocusPoint(); // FIRE-32023 render focus point if (hasRenderDebugMask(LLPipeline::RENDER_DEBUG_PHYSICS_SHAPES)) { diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index e70737926b..3a7954b7b3 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -291,6 +291,7 @@ public: void renderGLTFObjects(U32 type, bool texture = true, bool rigged = false); void renderAlphaObjects(bool rigged = false); + void renderFocusPoint(); // FIRE-32023 Add focus point rendering void renderMaskedObjects(U32 type, bool texture = true, bool batch_texture = false, bool rigged = false); void renderFullbrightMaskedObjects(U32 type, bool texture = true, bool batch_texture = false, bool rigged = false); @@ -698,7 +699,8 @@ public: // [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0) static bool sRenderTextures; // [/SL:KB] - + static LLVector3 sLastFocusPoint;// FIRE-16728 focus point lock & free focus DoF + static bool sDoFEnabled;// FIRE-32023 focus point render static LLTrace::EventStatHandle sStatBatchSize; class RenderTargetPack diff --git a/indra/newview/skins/ansastorm/xui/it/panel_main_inventory.xml b/indra/newview/skins/ansastorm/xui/it/panel_main_inventory.xml index 1f9ce25adf..ed914da369 100644 --- a/indra/newview/skins/ansastorm/xui/it/panel_main_inventory.xml +++ b/indra/newview/skins/ansastorm/xui/it/panel_main_inventory.xml @@ -109,10 +109,12 @@ - + + + diff --git a/indra/newview/skins/default/xui/az/notifications.xml b/indra/newview/skins/default/xui/az/notifications.xml index 1b69af4ecf..70e7a08b6b 100644 --- a/indra/newview/skins/default/xui/az/notifications.xml +++ b/indra/newview/skins/default/xui/az/notifications.xml @@ -1698,6 +1698,7 @@ Davam edilsin? Bu məzmuna baxmaq üçün brauzer açılsın? Naməlum mənbələrdən veb saytların açılması kompüterinizə zərər verə bilər +URL: [UNTRUSTED_URL] diff --git a/indra/newview/skins/default/xui/da/notifications.xml b/indra/newview/skins/default/xui/da/notifications.xml index 704d7b79d2..e1a2a8d967 100644 --- a/indra/newview/skins/default/xui/da/notifications.xml +++ b/indra/newview/skins/default/xui/da/notifications.xml @@ -630,6 +630,7 @@ Du skal genstarte [APP_NAME] for at installere denne opdatering. Ønsker du at åbne din web browser for at se dette indhold? +URL: [UNTRUSTED_URL] diff --git a/indra/newview/skins/default/xui/de/floater_fs_fixedenvironment.xml b/indra/newview/skins/default/xui/de/floater_fs_fixedenvironment.xml new file mode 100644 index 0000000000..ce4cc36c53 --- /dev/null +++ b/indra/newview/skins/default/xui/de/floater_fs_fixedenvironment.xml @@ -0,0 +1,26 @@ + + + + Himmel bearbeiten: + + + Wasser bearbeiten: + + + + + Name: + + + + + + - - + - Windlight Presets + width="130"> + Environment Presets + width="130"/> - - + width="130"/> - @@ -454,9 +455,9 @@ name="P_W_Reflections" follows="top|left" layout="topleft" - top_pad="5" + top_pad="1" left="0" - width="285" + right="-1" height="22" bg_alpha_color="Phototools_Header" border_visible="true" @@ -466,11 +467,11 @@ name="T_W_Reflections" follows="left|top" layout="topleft" - left="10" + left="5" font="SansSerif" height="17" - width="230"> - Water Reflection Settings + width="280"> + Reflection Settings @@ -478,70 +479,345 @@ name="P_R_Res" follows="top|left" layout="topleft" - top_pad="5" - left="4" - width="275" - height="54" + top_pad="1" + left="3" + right="-5" + height="77" border_visible="true" background_visible="true"> + + + + + + + + + + + + + + - Resolution + left="5" + name="ReflectionDetailText" + text_readonly_color="LabelDisabledColor" + tool_tip="Determines the level of detail in reflections. 'Static Only' reflects non-moving objects, while higher settings include dynamic objects and real-time reflections." + top_pad="9" + width="162"> + Reflection Detail + + + + + + height="15" + layout="topleft" + left="5" + name="ReflectionProbeText" + text_readonly_color="LabelDisabledColor" + tool_tip="Controls how much of the scene is covered by reflections. 'Manual Only' reflects selected objects, while 'Full Scene' includes everything in view." + top_pad="4" + width="162"> + Reflection Coverage + + + + + + + + + Mirror Resolution + + + + + + + + + + Mirror Update Rate + + + + + + + + + Probe Resolution (Restart) + + + + - - + value="2048"/> - + + + + - + top_pad="10" + tool_tip="Controls the visibility range for reflections, affecting reflection detail and performance across reflection probes, mirrors, and screen space reflections. Higher values increase the distance at which reflections are visible, enhancing detail but increasing performance cost." + width="70"> + Reflect. Dist. + + + + @@ -549,17 +825,14 @@ name="P_Lighting" follows="all" layout="topleft" - width="267" - top="0" - label="Light" - left="0"> + label="Shdw"> + width="280"> Lights and Shadows Settings @@ -581,17 +854,87 @@ name="P_L_S_Settings" follows="top|left" layout="topleft" - top_pad="5" - left="4" - width="275" - height="28" + top_pad="1" + left="3" + right="-3" + height="68" border_visible="true" background_visible="true"> + + Shadow Types + + + + + + + + Point Lighting (Restart) + + + + + + - - - Shadow Types - - - - - - - - + + Loc Lights + + + + + top_pad="5" + tool_tip="Adjusts the quality and sharpness of shadows. Higher values produce more detailed shadows but can significantly impact performance, especially in complex scenes. For general use, keep this setting low to maintain smooth performance. When preparing for high-quality snapshots, set it around 1.0, then gradually increase while monitoring your framerate. Using the Statistics Bar (found under 'Aids' in 'Interface Aids') can help you find the optimal balance for your system. Caution: Increasing this setting too quickly or setting it too high may cause viewer instability or crashes." + width="70"> Shd. Res + name="SB_Shadow_Res" + control_name="RenderShadowResolutionScale" + follows="left|right" + height="16" + increment="0.5" + layout="topleft" + left_pad="0" + min_val="0" + max_val="5" + top_delta="-2" + width="127"> + + + increment="0.5"> + + + + Spot Offset + + + + + + tool_tip="Controls the depth bias applied to shadows to prevent self-shadowing artifacts (known as 'shadow acne'). Lower values create more accurate shadows, while slightly higher values can help reduce flickering or overlapping shadow issues. Adjusting this setting can also help correct shadows that appear to float above surfaces or do not touch the edges of objects properly. Adjust gradually to balance shadow accuracy and artifact prevention." + width="70"> Shd. Bias + width="107"/> + width="73" + increment="0.000001" + border_visible="false"/> + + Irrad. Max + + + + + + + Irrad. Scale + + + + + + tool_tip="Controls the intensity of the Ambient Occlusion (AO) darkening effect, which adds subtle shadows in creases, corners, and where objects meet to enhance depth and realism. Lower values create softer, more natural shading that blends seamlessly with the environment, resulting in a realistic look. Higher values produce stronger, more dramatic contrast, which can make the AO effect appear more pronounced but may look unnatural in some lighting conditions. Adjust this setting carefully to avoid overly dark or harsh shadows that can distort the scene's natural lighting. For creative or experimental effects, negative values can be used to invert the shading, creating unusual lighting results. This setting works best when fine-tuned alongside the 'AO Soften' control to balance sharpness and smoothness of the shadows." + width="70"> Effect @@ -1227,7 +1744,7 @@ name="S_Effect" top_delta="-3" label_width="0" - left_pad="3" + left_pad="0" decimal_digits="3" follows="top|right" max_val="100000" @@ -1245,6 +1762,7 @@ width="20" tool_tip="Reset to the default value."/> + + tool_tip="Adjusts the smoothness of the Ambient Occlusion effect, reducing harsh edges and noise. Works best when combined with 'Shd. Blur' set around 4.0 for balanced softness." + width="70"> AO Soften + label="VFX"> + width="280"> Depth of Field Settings @@ -1326,10 +1842,10 @@ name="P_DoF_Settings" follows="top|left" layout="topleft" - top_pad="5" - left="4" - width="275" - height="66" + top_pad="1" + left="3" + right="-3" + height="55" border_visible="true" background_visible="true"> + tool_tip="Enables Depth of Field (DoF), which simulates camera focus by blurring objects outside the focal plane, creating a realistic photographic effect. Turning this off can improve performance." + top_pad="5" + width="280"/> + control_name="FSFocusPointFollowsPointer" + enabled_control="RenderDepthOfField" + height="16" + label="Depth of Field focus follows pointer" + layout="topleft" + name="FSFocusPointFollowsPointer" + tool_tip="Allows the DoF focus point to follow your mouse cursor, similar to flycam behavior. Useful when combined with DoF focus lock for dynamic focus adjustments." + top_pad="0" + width="256"/> + + + + HDR Tone Mapping Settings + + + + + + + + + + + + HDR Tonemap Type + + + + + + + + Tone Mix + + + + + + width="280"> Glow Settings @@ -1753,35 +2425,59 @@ name="P_Glow_Quality" follows="top|left" layout="topleft" - top_pad="5" - left="4" - width="275" - height="30" + top_pad="1" + left="3" + right="-3" + height="38" border_visible="true" background_visible="true"> - + tool_tip="Activates the glow effect, causing bright objects and light sources to emit a soft halo, simulating a bloom effect. This enhances the appearance of emissive materials, reflections, and highlights, adding a more dynamic and vibrant look to illuminated areas. Disabling this option can improve performance, especially in scenes with complex lighting." + top_pad="5" + width="110"/> + + + + + + + + tool_tip="Controls the resolution at which the glow effect is rendered. Higher values (closer to 10) produce sharper, more defined glows, while lower values (closer to 8) are more performance-friendly but may appear slightly softer. The difference between settings 8 and 10 is subtle, but higher values can impact performance on less powerful systems." + width="70"> Quality - + width="127" /> - - - + + top_pad="5" + tool_tip="Determines how many times the glow effect is processed to create smoothness and spread. Lower values result in tighter, sharper glows with minimal blur, while higher values create wider, softer glow halos with a more diffused appearance. Increasing the number of iterations can enhance glow quality but may reduce performance." + width="70"> Iterations + tool_tip="Controls the intensity of the glow effect. Low values (around 0.01 to 0.05) provide subtle, natural-looking glows. Higher values make objects appear intensely bright, but excessive settings can cause unrealistic blooming or overpower the scene. Adjust this setting gradually, as small changes can significantly affect the final look." + width="70"> Strength - - Luminance - - - - - - - Warmth - - - - - + width="70"> Width - - - Alpha - - - - @@ -2131,16 +2669,14 @@ name="P_General" follows="left|top" layout="topleft" - top_pad="0" - label="Gen" - left="0"> + label="Gen"> + width="280"> General Render Settings @@ -2162,10 +2698,10 @@ name="P_General_Settings" follows="top|left" layout="topleft" - top_pad="3" - left="4" - width="275" - height="250" + top_pad="1" + left="3" + right="-3" + height="293" border_visible="true" background_visible="true"> + tool_tip="Sets the maximum distance at which objects are rendered in the scene. Increasing this value allows you to see farther into the environment, enhancing detail in large landscapes or distant objects. However, higher values significantly impact performance, reducing FPS, especially in complex areas. For better performance, use lower values in crowded regions or when using older hardware." + width="70"> Draw Dist. + tool_tip="Controls the maximum number of avatars rendered in the scene. Limiting this number improves performance, especially in crowded events or busy locations. Lower values reduce visual clutter and increase FPS, while higher values allow more avatars to be visible but may slow performance in large gatherings." + width="70"> Avi Count @@ -2244,7 +2780,7 @@ control_name="IndirectMaxNonImpostors" top_delta="-3" label_width="0" - left_pad="3" + left_pad="0" decimal_digits="0" follows="top|left" max_val="66" @@ -2263,7 +2799,7 @@ tool_tip="Reset to the default value."> + parameter="IndirectMaxNonImpostors"/> + tool_tip="Adjusts the level of detail (LOD) for avatars. Higher values improve visual quality, making legacy avatars appear more detailed even at greater distances. Lower values reduce detail to improve performance, which is useful in high-density areas or on lower-end systems. This setting primarily affects legacy (system) avatars. Mesh avatars are less affected by this setting as their detail levels are controlled by their own LOD settings within the mesh and further influenced by the Avatar Complexity settings found in the Graphics panel of the Preferences floater." + width="70"> Avi Detail + tool_tip="Controls the level of detail for avatar physics effects, such as breast physics and other mesh deformation behaviors. Higher values provide smoother, more realistic motion at the cost of performance. Lower values reduce the complexity of physics calculations, improving performance in crowded areas." + width="70"> Avi Physics + increment=".01"/> - - - - - - Vig. Amount + tool_tip="Adjusts the sharpness of the overall image using Contrast-Adaptive Sharpening (CAS). Higher values enhance image clarity by increasing contrast around edges, which can improve visual detail. Excessive sharpening may introduce artifacts or make the image look harsh." + top_pad="5" + width="70"> + Sharpening + width="127"/> + increment="0.1"/> - Vig. Power + width="70"> + Exposure + width="127"/> + increment="0.01"/> @@ -2877,10 +3357,10 @@ height="16" label="Enable Draw Distance" layout="topleft" - top_pad="10" - left="5" + top_pad="5" + left="3" name="UseFarClip" - tool_tip="Enable Draw Distance, if you disable this feature the Viewer will render past your set draw distance." + tool_tip="Enables the draw distance limit, restricting how far the viewer will render objects based on the set draw distance. Disabling this will cause the viewer to render objects beyond the defined distance, which can significantly decrease performance in large, detailed environments." width="240"/> - - - + Antialiasing Type (Restart) + + + + + + + - Anti-aliasing + tool_tip="Determines the quality of antialiasing, which smooths the edges of objects. Higher settings reduce jagged edges, providing a cleaner look. On high-end graphics cards, higher values have minimal performance impact. On lower-end systems, higher settings can reduce performance."> + Antialiasing Quality - - - - - + width="85"> + + + + + tool_tip="Controls the strength and resolution of normal and bump maps, which add texture detail to surfaces without increasing polygon count. Higher settings enhance surface detail, while lower settings improve performance by reducing visual complexity."> Texture Bumpiness + width="85"> + + Max Texture Resolution + + + + + + + + + + Avatar Display + + + + + + + + + + + + @@ -3050,16 +3630,14 @@ name="P_Aids" follows="left|top" layout="topleft" - top_pad="0" - label="Aids" - left="0"> + label="Aids"> + width="280"> Interface Aids - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + tool_tip="Displays real-time system performance statistics to help you gauge the viewer's efficiency. You can expand or collapse individual metrics by clicking their labels." + width="270"> Quick Stats + right="-4"> + width="265"> @@ -3422,16 +4024,14 @@ name="P_Cam" follows="left|top" layout="topleft" - top_pad="0" - label="Cam" - left="0"> + label="Cam"> + width="280"> 3D Mouse (Joystick) Settings @@ -3453,9 +4053,9 @@ name="P_Cam_Settings" follows="top|left" layout="topleft" - top_pad="5" - left="4" - width="275" + top_pad="1" + left="3" + right="-3" height="184" border_visible="true" background_visible="true"> @@ -3464,9 +4064,9 @@ follows="top|left" layout="topleft" left="5" - tool_tip="Adjusts the sensitivity of the Left/Right movement. If you find it difficult to move with precision, use lower scale values." + tool_tip="Adjusts the sensitivity for horizontal camera movement. Lower values allow for finer control, while higher values increase movement speed." top_pad="10" - width="80"> + width="70"> Left/Right + width="70"> Up/Down + width="70"> In/Out + width="70"> Pitch + width="70"> Yaw + width="70"> Roll - Zoom Spd + width="70"> + Zoom @@ -3799,7 +4399,7 @@ tool_tip="Reset to the default value."> + parameter="FlycamAxisDeadZone6"/> + width="70"> Feathering @@ -3870,21 +4470,21 @@ label="Zoom Axis Mapping" label_width="200" layout="topleft" - left="10" + left="5" max_val="5" min_val="-1" name="JoystickAxis6" - tool_tip="Controls which mouse axis the zooming function is mapped to (set to work with)." + tool_tip="Determines which joystick or mouse axis controls the zoom function. Set this to '4' to enable zoom via the joystick." top_pad="5" - width="255"/> + width="269"/> @@ -3958,9 +4559,9 @@ name="P_Viewer_Cam_Menu" follows="top|left" layout="topleft" - top_pad="5" + top_pad="3" left="0" - width="285" + width="288" height="22" bg_alpha_color="Phototools_Header" border_visible="true" @@ -3970,10 +4571,10 @@ name="PT_Viewer_Cam_Menu" follows="left|top" layout="topleft" - left="10" + left="7" font="SansSerif" height="17" - width="230"> + width="270"> Viewer Camera Menu Settings @@ -3982,10 +4583,10 @@ name="P_Viewer_Cam_Menu_Settings" follows="left|top" layout="topleft" - top_pad="5" - left="4" - width="275" - height="120" + top_pad="3" + left="3" + right="-3" + height="131" border_visible="true" background_visible="true"> @@ -4013,7 +4614,7 @@ name="P_Cam2" follows="left|top" layout="topleft" - top_pad="0" + top_pad="3" left="0" width="275" height="110" @@ -4022,7 +4623,7 @@ @@ -4036,11 +4637,11 @@ height="16" increment="0.002" layout="topleft" - left_delta="100" + left_pad="0" min_val="0.08" max_val="3.06" top_delta="-2" - width="135"/> + width="147"/> +