summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl16
-rw-r--r--indra/newview/llagentwearables.cpp6
-rw-r--r--indra/newview/llagentwearables.h1
-rw-r--r--indra/newview/lltexlayerparams.cpp17
-rw-r--r--indra/newview/lltexlayerparams.h1
-rw-r--r--indra/newview/llvoavatarself.cpp3
6 files changed, 27 insertions, 17 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl
index 8bd702a8da..28908a311d 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/blurLightF.glsl
@@ -46,11 +46,15 @@ void main()
dlt /= max(-pos.z*dist_factor, 1.0);
- vec2 defined_weight = kern[0].xy; // special case the first (centre) sample's weight in the blur; we have to sample it anyway so we get it for 'free'
+ vec2 defined_weight = kern[0].xy; // special case the kern[0] (centre) sample's weight in the blur; we have to sample it anyway so we get it for 'free'
vec4 col = defined_weight.xyxx * ccol;
+
+ float center_e = 1.0 - (texture2DRect(edgeMap, vary_fragcoord.xy).a+
+ texture2DRect(edgeMap, vary_fragcoord.xy+dlt*0.333).a+
+ texture2DRect(edgeMap, vary_fragcoord.xy-dlt*0.333).a);
- float e = 1.0;
- for (int i = 0; i < 4; i++)
+ float e = center_e;
+ for (int i = 1; i < 4; i++)
{
vec2 tc = vary_fragcoord.xy + kern[i].z*dlt;
@@ -67,10 +71,8 @@ void main()
texture2DRect(edgeMap, tc.xy-dlt*0.333).a;
}
-
- e = 1.0;
-
- for (int i = 0; i < 4; i++)
+ e = center_e;
+ for (int i = 1; i < 4; i++)
{
vec2 tc = vary_fragcoord.xy - kern[i].z*dlt;
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index b976e6b2bd..b9a0b4293d 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -649,6 +649,7 @@ void LLAgentWearables::setWearable(const EWearableType type, U32 index, LLWearab
else
{
wearable_vec[index] = wearable;
+ mAvatarObject->wearableUpdated(wearable->getType());
}
}
@@ -663,6 +664,7 @@ U32 LLAgentWearables::pushWearable(const EWearableType type, LLWearable *wearabl
if (type < WT_COUNT || mWearableDatas[type].size() < MAX_WEARABLES_PER_TYPE)
{
mWearableDatas[type].push_back(wearable);
+ mAvatarObject->wearableUpdated(wearable->getType());
return mWearableDatas[type].size()-1;
}
return MAX_WEARABLES_PER_TYPE;
@@ -687,9 +689,11 @@ void LLAgentWearables::popWearable(LLWearable *wearable)
void LLAgentWearables::popWearable(const EWearableType type, U32 index)
{
- if (getWearable(type, index))
+ LLWearable *wearable = getWearable(type, index);
+ if (wearable)
{
mWearableDatas[type].erase(mWearableDatas[type].begin() + index);
+ mAvatarObject->wearableUpdated(wearable->getType());
}
}
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index 8e1bef88c3..667cb94552 100644
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -114,6 +114,7 @@ public:
void setWearableName(const LLUUID& item_id, const std::string& new_name);
void addLocalTextureObject(const EWearableType wearable_type, const LLVOAvatarDefines::ETextureIndex texture_type, U32 wearable_index);
U32 getWearableIndex(LLWearable *wearable);
+
protected:
void setWearableFinal(LLInventoryItem* new_item, LLWearable* new_wearable, bool do_append = false);
static bool onSetWearableDialog(const LLSD& notification, const LLSD& response, LLWearable* wearable);
diff --git a/indra/newview/lltexlayerparams.cpp b/indra/newview/lltexlayerparams.cpp
index ca888899ed..e1643af71d 100644
--- a/indra/newview/lltexlayerparams.cpp
+++ b/indra/newview/lltexlayerparams.cpp
@@ -42,7 +42,8 @@
//-----------------------------------------------------------------------------
LLTexLayerParam::LLTexLayerParam(LLTexLayerInterface *layer) :
mTexLayer(layer),
- mAvatar(NULL)
+ mAvatar(NULL),
+ mIsWearableParam(TRUE)
{
if (mTexLayer != NULL)
{
@@ -55,7 +56,8 @@ LLTexLayerParam::LLTexLayerParam(LLTexLayerInterface *layer) :
}
LLTexLayerParam::LLTexLayerParam(LLVOAvatar *avatar) :
- mTexLayer(NULL)
+ mTexLayer(NULL),
+ mIsWearableParam(FALSE)
{
mAvatar = avatar;
}
@@ -175,16 +177,15 @@ void LLTexLayerParamAlpha::setWeight(F32 weight, BOOL set_by_user)
{
mCurWeight = new_weight;
- LLVOAvatar* avatar = mTexLayer->getTexLayerSet()->getAvatar();
- if (avatar->getSex() & getSex())
+ if ((mAvatar->getSex() & getSex()) && !mIsWearableParam) // only trigger a baked texture update if we're changing a wearable's visual param.
{
if (gAgent.cameraCustomizeAvatar())
{
set_by_user = FALSE;
}
- avatar->invalidateComposite(mTexLayer->getTexLayerSet(), set_by_user);
+ mAvatar->invalidateComposite(mTexLayer->getTexLayerSet(), set_by_user);
mTexLayer->invalidateMorphMasks();
- avatar->updateMeshTextures();
+ mAvatar->updateMeshTextures();
}
}
}
@@ -467,14 +468,16 @@ void LLTexLayerParamColor::setWeight(F32 weight, BOOL set_by_user)
return;
}
- if (mAvatar->getSex() & getSex())
+ if ((mAvatar->getSex() & getSex()) && !mIsWearableParam) // only trigger a baked texture update if we're changing a wearable's visual param.
{
onGlobalColorChanged(set_by_user);
if (mTexLayer)
{
mAvatar->invalidateComposite(mTexLayer->getTexLayerSet(), set_by_user);
+ mAvatar->updateMeshTextures();
}
}
+
// llinfos << "param " << mName << " = " << new_weight << llendl;
}
}
diff --git a/indra/newview/lltexlayerparams.h b/indra/newview/lltexlayerparams.h
index 98365864f9..dcb108bbf6 100644
--- a/indra/newview/lltexlayerparams.h
+++ b/indra/newview/lltexlayerparams.h
@@ -49,6 +49,7 @@ public:
protected:
LLTexLayerInterface* mTexLayer;
LLVOAvatar* mAvatar;
+ BOOL mIsWearableParam;
};
//-----------------------------------------------------------------------------
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 2b2ac81487..4760d5a472 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -973,8 +973,7 @@ void LLVOAvatarSelf::wearableUpdated( EWearableType type )
{
if (mBakedTextureDatas[index].mTexLayerSet)
{
- mBakedTextureDatas[index].mTexLayerSet->requestUpdate();
- mBakedTextureDatas[index].mTexLayerSet->requestUpload();
+ invalidateComposite(mBakedTextureDatas[index].mTexLayerSet, TRUE);
}
break;
}