From 3446f708ff5132a23606cc7c097c1a7811832a36 Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Mon, 6 Jan 2014 20:27:17 +0100 Subject: [PATCH 01/19] Syncronized max bandwith const with prefs panel max --- indra/newview/llviewerthrottle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llviewerthrottle.cpp b/indra/newview/llviewerthrottle.cpp index 73065c5c0..8fe13ed1b 100644 --- a/indra/newview/llviewerthrottle.cpp +++ b/indra/newview/llviewerthrottle.cpp @@ -52,7 +52,7 @@ const F32 MAX_FRACTIONAL = 1.5f; const F32 MIN_FRACTIONAL = 0.2f; const F32 MIN_BANDWIDTH = 50.f; -const F32 MAX_BANDWIDTH = 1500.f; +const F32 MAX_BANDWIDTH = 5000.f; const F32 STEP_FRACTIONAL = 0.1f; const F32 TIGHTEN_THROTTLE_THRESHOLD = 3.0f; // packet loss % per s const F32 EASE_THROTTLE_THRESHOLD = 0.5f; // packet loss % per s From 75109e14c3c3c0b94be092c61449b16b8df53138 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Wed, 15 Jan 2014 20:15:53 -0500 Subject: [PATCH 02/19] Italics hotfix Restores use of the old slant_amt offset for italicizing fonts by slanting quads. Note that this is the wrong way to fix the issue and should eventually be removed. --- indra/llrender/llfontgl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 2c1842a74..31d48f2ab 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -1349,12 +1349,12 @@ void LLFontGL::renderQuad(LLVector4a* vertex_out, LLVector2* uv_out, LLColor4U* colors_out[index] = color; index++; - vertex_out[index].set(screen_rect.mLeft, screen_rect.mBottom, 0.f); + vertex_out[index].set(screen_rect.mLeft + slant_amt, screen_rect.mBottom, 0.f); uv_out[index] = LLVector2(uv_rect.mLeft, uv_rect.mBottom); colors_out[index] = color; index++; - vertex_out[index].set(screen_rect.mRight, screen_rect.mBottom, 0.f); + vertex_out[index].set(screen_rect.mRight + slant_amt, screen_rect.mBottom, 0.f); uv_out[index] = LLVector2(uv_rect.mRight, uv_rect.mBottom); colors_out[index] = color; } From 7ac0330e4b244f66bef7b5cbe495368cb2879d81 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Wed, 22 Jan 2014 00:57:15 -0500 Subject: [PATCH 03/19] Fix a rare glitch where mouselook zoomed field of view would be maintained upon leaving mouselook --- indra/newview/lltoolcomp.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/lltoolcomp.cpp b/indra/newview/lltoolcomp.cpp index 46ea53339..3f3470e04 100644 --- a/indra/newview/lltoolcomp.cpp +++ b/indra/newview/lltoolcomp.cpp @@ -780,6 +780,7 @@ void LLToolCompGun::handleSelect() void LLToolCompGun::handleDeselect() { LLToolComposite::handleDeselect(); + LLViewerCamera::getInstance()->loadDefaultFOV(); // Singu Note: Load Default FOV in case we were zoomed in setMouseCapture(FALSE); } From 655081365fde1fd54735e8d3f54b7c4615dda449 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Thu, 23 Jan 2014 17:42:08 -0500 Subject: [PATCH 04/19] focusFirstItem was no longer being overridden here, this function has proven not needed, thus. --- indra/newview/llimpanel.cpp | 11 ----------- indra/newview/llimpanel.h | 2 -- 2 files changed, 13 deletions(-) diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index abae430f6..82fde5f31 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1576,17 +1576,6 @@ const bool LLFloaterIMPanel::isModerator(const LLUUID& speaker_id) return false; } -BOOL LLFloaterIMPanel::focusFirstItem(BOOL prefer_text_fields, BOOL focus_flash ) -{ - if (getVisible() && mInputEditor->getVisible()) - { - setInputFocus(true); - return TRUE; - } - - return LLUICtrl::focusFirstItem(prefer_text_fields, focus_flash); -} - void LLFloaterIMPanel::onFocusReceived() { mNumUnreadMessages = 0; diff --git a/indra/newview/llimpanel.h b/indra/newview/llimpanel.h index bee650d7b..cf7048a47 100644 --- a/indra/newview/llimpanel.h +++ b/indra/newview/llimpanel.h @@ -94,8 +94,6 @@ public: void *cargo_data, EAcceptance *accept, std::string& tooltip_msg); - BOOL focusFirstItem(BOOL prefer_text_fields = FALSE, BOOL focus_flash = TRUE ); - void onFocusReceived(); void onInputEditorFocusReceived(); void onInputEditorKeystroke(LLLineEditor* caller); From 63379105b5b3df299db8b81a42a1d172ca3e7644 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Thu, 23 Jan 2014 19:06:33 -0500 Subject: [PATCH 05/19] Fix the local chat focu bug, yay! --- indra/llui/lluictrl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h index aae767e1a..5ae818d87 100644 --- a/indra/llui/lluictrl.h +++ b/indra/llui/lluictrl.h @@ -209,6 +209,7 @@ public: BOOL focusNextItem(BOOL text_entry_only); BOOL focusPrevItem(BOOL text_entry_only); + virtual // Singu Note: focusFirstItem is overridden for our old chat ui to prevent focusing on topmost uictrls. BOOL focusFirstItem(BOOL prefer_text_fields = FALSE, BOOL focus_flash = TRUE ); BOOL focusLastItem(BOOL prefer_text_fields = FALSE); From 7572674fdb1d52d1c3f85420cdc3787d07e853f8 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Thu, 23 Jan 2014 19:07:53 -0500 Subject: [PATCH 06/19] Enforce xml follows flags in scroll containers, and allow the appearance floater to resize, enforcing minimum dimensions of its default size It was requested to let people resize the height to easily display more sections, and well, this is the easiest fix, if width changes in a nasty way, it can just be fixed since default is min. --- indra/llui/llscrollcontainer.cpp | 6 +++++- indra/newview/skins/default/xui/en-us/floater_customize.xml | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/indra/llui/llscrollcontainer.cpp b/indra/llui/llscrollcontainer.cpp index f8998e40a..f7a658ad6 100644 --- a/indra/llui/llscrollcontainer.cpp +++ b/indra/llui/llscrollcontainer.cpp @@ -760,7 +760,7 @@ LLView* LLScrollContainer::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFa node->getAttributeString("name", name); LLRect rect; - createRect(node, rect, parent, LLRect()); + U32 follows_flags = createRect(node, rect, parent, LLRect()); BOOL opaque = FALSE; node->getAttributeBOOL("opaque", opaque); @@ -771,6 +771,10 @@ LLView* LLScrollContainer::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFa // Create the scroll view LLScrollContainer *ret = new LLScrollContainer(name, rect, (LLPanel*)NULL, opaque, color); + // Obey xml follows + ret->setFollows(follows_flags); + ret->parseFollowsFlags(node); + LLPanel* panelp = NULL; // Find a child panel to add diff --git a/indra/newview/skins/default/xui/en-us/floater_customize.xml b/indra/newview/skins/default/xui/en-us/floater_customize.xml index cf223811b..aa49a6cb5 100644 --- a/indra/newview/skins/default/xui/en-us/floater_customize.xml +++ b/indra/newview/skins/default/xui/en-us/floater_customize.xml @@ -1,7 +1,7 @@ Date: Fri, 24 Jan 2014 01:11:27 +0100 Subject: [PATCH 07/19] Fitted mesh --- indra/llrender/llshadermgr.cpp | 1 + indra/llrender/llshadermgr.h | 1 + .../shaders/class1/avatar/objectSkinV.glsl | 51 +++-- indra/newview/character/avatar_lad.xml | 181 ++++++++++++++++-- indra/newview/character/avatar_skeleton.xml | 9 +- indra/newview/lldrawpoolavatar.cpp | 46 ++++- indra/newview/llspatialpartition.cpp | 2 +- indra/newview/llviewermenu.cpp | 3 + indra/newview/llvoavatar.cpp | 97 +++++++++- indra/newview/llvoavatar.h | 1 + indra/newview/pipeline.h | 18 +- 11 files changed, 360 insertions(+), 50 deletions(-) diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index c9cb86cfa..8dab8bbc8 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -1224,6 +1224,7 @@ void LLShaderMgr::initAttribsAndUniforms() mReservedUniforms.push_back("env_intensity"); mReservedUniforms.push_back("matrixPalette"); + mReservedUniforms.push_back("translationPalette"); mReservedUniforms.push_back("screenTex"); mReservedUniforms.push_back("screenDepth"); diff --git a/indra/llrender/llshadermgr.h b/indra/llrender/llshadermgr.h index 7dccf47b1..5cf22f58f 100644 --- a/indra/llrender/llshadermgr.h +++ b/indra/llrender/llshadermgr.h @@ -178,6 +178,7 @@ public: ENVIRONMENT_INTENSITY, AVATAR_MATRIX, + AVATAR_TRANSLATION, WATER_SCREENTEX, WATER_SCREENDEPTH, diff --git a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl index 4005341c6..972d10b32 100644 --- a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl +++ b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl @@ -26,26 +26,45 @@ ATTRIBUTE vec4 weight4; -uniform mat4 matrixPalette[32]; +uniform mat3 matrixPalette[64]; +uniform vec3 translationPalette[64]; + mat4 getObjectSkinnedTransform() { - float w0 = fract(weight4.x); - float w1 = fract(weight4.y); - float w2 = fract(weight4.z); - float w3 = fract(weight4.w); + int i; - int i0 = int(floor(weight4.x)); - int i1 = int(floor(weight4.y)); - int i2 = int(floor(weight4.z)); - int i3 = int(floor(weight4.w)); + vec4 w = fract(weight4); + vec4 index = floor(weight4); - //float scale = 1.0/(w.x+w.y+w.z+w.w); - //w *= scale; - mat4 mat = matrixPalette[i0]*w0; - mat += matrixPalette[i1]*w1; - mat += matrixPalette[i2]*w2; - mat += matrixPalette[i3]*w3; + index = min(index, vec4(63.0)); + index = max(index, vec4( 0.0)); - return mat; + float scale = 1.0/(w.x+w.y+w.z+w.w); + w *= scale; + + int i1 = int(index.x); + int i2 = int(index.y); + int i3 = int(index.z); + int i4 = int(index.w); + + mat3 mat = matrixPalette[i1]*w.x; + mat += matrixPalette[i2]*w.y; + mat += matrixPalette[i3]*w.z; + mat += matrixPalette[i4]*w.w; + + vec3 trans = translationPalette[i1]*w.x; + trans += translationPalette[i2]*w.y; + trans += translationPalette[i3]*w.z; + trans += translationPalette[i4]*w.w; + + mat4 ret; + + ret[0] = vec4(mat[0], 0); + ret[1] = vec4(mat[1], 0); + ret[2] = vec4(mat[2], 0); + ret[3] = vec4(trans, 1.0); + + return ret; } + diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml index 48e6205bc..d65f1e09b 100644 --- a/indra/newview/character/avatar_lad.xml +++ b/indra/newview/character/avatar_lad.xml @@ -3563,7 +3563,11 @@ + pos="0.07 0 -0.02"/> + @@ -3582,7 +3586,16 @@ camera_elevation=".1" camera_distance="1" camera_angle="15"> - + + + + - + + + + - + + + + + @@ -3732,6 +3767,10 @@ scale="-0.01 -0.01 0.0" pos="0.01 0.0 0"/> + @@ -3780,6 +3819,32 @@ scale="0.02 0.03 0.03" pos="0 0 -0.03"/> + + + + + + + @@ -3832,7 +3897,16 @@ value_max="2" camera_elevation=".3" camera_distance=".8"> - + + + + + + + @@ -3901,7 +3984,16 @@ value_max="1.3" camera_elevation=".3" camera_distance=".8"> - + + + + - + + + + llXorBase64 + + llScaleByFactor + + llGetMinScaleFactor + + llGetMaxScaleFactor + diff --git a/indra/newview/skins/default/xui/en-us/strings.xml b/indra/newview/skins/default/xui/en-us/strings.xml index 28b3562d8..9d1da2465 100644 --- a/indra/newview/skins/default/xui/en-us/strings.xml +++ b/indra/newview/skins/default/xui/en-us/strings.xml @@ -2095,6 +2095,21 @@ Returns all objects of a particular owner in the given scope or an ERR_* flag. string llXorBase64(string str1, string str2) Returns a string that is a Base64 XOR of Base64-formatted input strings. + +integer llScaleByFactor(float scaling_factor) +Returns a string that is a Base64 XOR of Base64-formatted input strings. +Uniformly resizes the linkset by the given multiplicative scale factor (e.g. 2.0 to double the scale in all dimensions) +Returns TRUE if rescaling was successful or FALSE otherwise +This function only succeeds in non-physical objects + + +float llGetMinScaleFactor() +Returns the minimum multiplicative scale factor which can be used by llScaleByFactor(); i.e. such that every prim in the linkset is >=1cm in scale + + +float llGetMaxScaleFactor() +Returns the maximum multiplicative scale factor which can be used by llScaleByFactor(); i.e. such that every prim in the linkset is <=64m and the resulting linkset meets the linkability requirements + llGodLikeRezObject( key inventory, vector pos ) From cc9f6b7b7b672f45300358aa640389d5f3545393 Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Fri, 24 Jan 2014 05:51:26 +0100 Subject: [PATCH 17/19] Fitted mesh fixup: change in llvoavatar.cpp enabled extra information for avatar look at targets which is not something users expect, disabling for now --- indra/newview/llhudeffectlookat.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp index 2a180897b..eef650101 100644 --- a/indra/newview/llhudeffectlookat.cpp +++ b/indra/newview/llhudeffectlookat.cpp @@ -619,10 +619,14 @@ void LLHUDEffectLookAt::update() } } + // Singu note: this displays extra information for look at targets. Due to the bug in llvoavatar.cpp + // it was never displayed before and is not something users exect: turning it off for now +#if 0 if (show_look_at) { ((LLVOAvatar*)(LLViewerObject*)mSourceObject)->addDebugText((*mAttentions)[mTargetType].mName); } +#endif } /** From 282df98d09435e42606324293149b76609a1629a Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Fri, 24 Jan 2014 01:29:38 -0500 Subject: [PATCH 18/19] Complete resize-friendly appearance mode UI --- .../default/xui/en-us/floater_customize.xml | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/indra/newview/skins/default/xui/en-us/floater_customize.xml b/indra/newview/skins/default/xui/en-us/floater_customize.xml index aa49a6cb5..65485a9aa 100644 --- a/indra/newview/skins/default/xui/en-us/floater_customize.xml +++ b/indra/newview/skins/default/xui/en-us/floater_customize.xml @@ -4,7 +4,7 @@ min_width="494" mouse_opaque="true" name="floater customize" rect_control="FloaterCustomizeAppearanceRect" title="Appearance" width="494"> - @@ -101,7 +101,7 @@ scratch and wear it. You do not have permission to modify this wearable. Shape: @@ -110,19 +110,19 @@ scratch and wear it. label="Create New Shape" label_selected="Create New Shape" left="160" mouse_opaque="true" name="Create New" scale_image="true" width="170" /> Height: [AVHEIGHT] (includes shoes) @@ -199,7 +199,7 @@ scratch and wear it. You do not have permission to modify this wearable. Skin: @@ -294,7 +294,7 @@ scratch and wear it. You do not have permission to modify this wearable. Hair: @@ -369,7 +369,7 @@ scratch and wear it. You do not have permission to modify this wearable. Eyes: @@ -453,7 +453,7 @@ scratch and wear it. mouse_opaque="true" name="path" v_pad="0" width="373"> Located in [PATH] - + Shirt: @@ -535,7 +535,7 @@ scratch and wear it. mouse_opaque="true" name="path" v_pad="0" width="373"> Located in [PATH] - + Pants: @@ -594,7 +594,7 @@ scratch and wear it. mouse_opaque="true" name="path" v_pad="0" width="373"> Located in [PATH] - + Shoes: @@ -676,7 +676,7 @@ scratch and wear it. mouse_opaque="true" name="path" v_pad="0" width="373"> Located in [PATH] - + Socks: @@ -758,7 +758,7 @@ scratch and wear it. mouse_opaque="true" name="path" v_pad="0" width="373"> Located in [PATH] - + Jacket: @@ -844,7 +844,7 @@ scratch and wear it. mouse_opaque="true" name="path" v_pad="0" width="373"> Located in [PATH] - + Gloves: @@ -927,7 +927,7 @@ scratch and wear it. mouse_opaque="true" name="path" v_pad="0" width="373"> Located in [PATH] - + Undershirt: @@ -1011,7 +1011,7 @@ one from scratch and wear it. mouse_opaque="true" name="path" v_pad="0" width="373"> Located in [PATH] - + Underpants: @@ -1094,7 +1094,7 @@ one from scratch and wear it. mouse_opaque="true" name="path" v_pad="0" width="373"> Located in [PATH] - + Skirt: @@ -1176,7 +1176,7 @@ scratch and wear it. mouse_opaque="true" name="path" v_pad="0" width="373"> Located in [PATH] - + Tattoo: @@ -1259,7 +1259,7 @@ scratch and wear it. mouse_opaque="true" name="path" v_pad="0" width="373"> Located in [PATH] - + Alpha: @@ -1378,7 +1378,7 @@ one from scratch and wear it. mouse_opaque="true" name="path" v_pad="0" width="373"> Located in [PATH] - + Physics: From aaf06fa2ccd7d9922547c8fbbd886f16852b23c2 Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Fri, 24 Jan 2014 12:26:43 +0100 Subject: [PATCH 19/19] FITMESH-6, FITMESH-20 Fix for some objects disappearing when hardware skinning enabled and ALM disabled. NOTE: There appears to be a driver bug on some AMD systems that will cause hardware skinning to break given different combinations of shaders. Users should be advised that if they see improper skinning on their avatars, they should either enable advanced lighting model, or disable atmospheric shaders or hardware skinning. davep --- .../shaders/class1/avatar/objectSkinV.glsl | 9 +++------ indra/newview/lldrawpoolavatar.cpp | 16 ++++++++-------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl index 972d10b32..8eb5a977b 100644 --- a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl +++ b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl @@ -22,17 +22,14 @@ * $/LicenseInfo$ */ - - ATTRIBUTE vec4 weight4; -uniform mat3 matrixPalette[64]; -uniform vec3 translationPalette[64]; - +uniform mat3 matrixPalette[52]; +uniform vec3 translationPalette[52]; mat4 getObjectSkinnedTransform() { - int i; + int i; vec4 w = fract(weight4); vec4 index = floor(weight4); diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 84b7c8d7d..77dbbaae2 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -61,6 +61,7 @@ static U32 sDataMask = LLDrawPoolAvatar::VERTEX_DATA_MASK; static U32 sBufferUsage = GL_STREAM_DRAW_ARB; static U32 sShaderLevel = 0; +#define JOINT_COUNT 52 LLGLSLShader* LLDrawPoolAvatar::sVertexProgram = NULL; BOOL LLDrawPoolAvatar::sSkipOpaque = FALSE; @@ -1566,12 +1567,10 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace* LLVector4a* norm = has_normal ? (LLVector4a*) normal.get() : NULL; //build matrix palette - static const size_t kMaxJoints = 64; - LLMatrix4a mp[kMaxJoints]; + LLMatrix4a mp[JOINT_COUNT]; LLMatrix4* mat = (LLMatrix4*) mp; - U32 maxJoints = llmin(skin->mJointNames.size(), kMaxJoints); - for (U32 j = 0; j < maxJoints; ++j) + for (U32 j = 0; j < skin->mJointNames.size(); ++j) { LLJoint* joint = avatar->getJoint(skin->mJointNames[j]); if (joint) @@ -1628,6 +1627,7 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace* LLVector4a& n = vol_face.mNormals[j]; bind_shape_matrix.rotate(n, t); final_mat.rotate(t, dst); + dst.normalize3fast(); norm[j] = dst; } } @@ -1694,9 +1694,9 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) { if (sShaderLevel > 0) { //upload matrix palette to shader - LLMatrix4 mat[64]; + LLMatrix4 mat[JOINT_COUNT]; - U32 count = llmin((U32) skin->mJointNames.size(), (U32) 64); + U32 count = llmin((U32) skin->mJointNames.size(), (U32) JOINT_COUNT); for (U32 i = 0; i < count; ++i) { @@ -1710,9 +1710,9 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) stop_glerror(); - F32 mp[64*9]; + F32 mp[JOINT_COUNT*9]; - F32 transp[64*3]; + F32 transp[JOINT_COUNT*3]; for (U32 i = 0; i < count; ++i) {