diff options
21 files changed, 123 insertions, 96 deletions
| diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 81a97c7661..ae5d2ad0b3 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -969,7 +969,8 @@ void LLGLManager::initExtensions()  	mHasSync = ExtensionExists("GL_ARB_sync", gGLHExts.mSysExts);  	mHasMapBufferRange = ExtensionExists("GL_ARB_map_buffer_range", gGLHExts.mSysExts);  	mHasFlushBufferRange = ExtensionExists("GL_APPLE_flush_buffer_range", gGLHExts.mSysExts); -	mHasDepthClamp = ExtensionExists("GL_ARB_depth_clamp", gGLHExts.mSysExts) || ExtensionExists("GL_NV_depth_clamp", gGLHExts.mSysExts); +	//mHasDepthClamp = ExtensionExists("GL_ARB_depth_clamp", gGLHExts.mSysExts) || ExtensionExists("GL_NV_depth_clamp", gGLHExts.mSysExts); +	mHasDepthClamp = FALSE;  	// mask out FBO support when packed_depth_stencil isn't there 'cause we need it for LLRenderTarget -Brad  #ifdef GL_ARB_framebuffer_object  	mHasFramebufferObject = ExtensionExists("GL_ARB_framebuffer_object", gGLHExts.mSysExts); diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index eb5c9cc5c0..c064b420f3 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8471,7 +8471,7 @@      <key>Type</key>      <string>U32</string>      <key>Value</key> -    <real>512</real> +    <real>1024</real>    </map>    <key>RenderSpecularResY</key> @@ -8483,7 +8483,7 @@      <key>Type</key>      <string>U32</string>      <key>Value</key> -    <real>128</real> +    <real>256</real>    </map>    <key>RenderSpecularExponent</key> diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl index 20a756530a..49ad064364 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/skyF.glsl @@ -61,6 +61,6 @@ void main()  	/// Gamma correct for WL (soft clip effect).  	frag_data[0] = vec4(scaleSoftClip(color.rgb), 1.0);  	frag_data[1] = vec4(0.0,0.0,0.0,0.0); -	frag_data[2] = vec4(0.5,0.5,0.5,0); +	frag_data[2] = vec4(0.5,0.5,0.0,0);  } diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl index 97ea1a3fe5..5d936233fe 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl @@ -297,7 +297,6 @@ void main()  	vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy);  	vec3 col;  	float bloom = 0.0; -	if (diffuse.a < 0.9)  	{  		calcAtmospherics(pos.xyz, 1.0); @@ -322,23 +321,19 @@ void main()  			col += spec_contrib;  		} +		col = mix(col.rgb, diffuse.rgb, diffuse.a); +  		if (envIntensity > 0.0)  		{ //add environmentmap  			vec3 env_vec = env_mat * refnormpersp;  			col = mix(col.rgb, pow(textureCube(environmentMap, env_vec).rgb, vec3(2.2)) * 2.2,  -				max(envIntensity-diffuse.a*2.0, 0.0));  +				envIntensity);   		}  		col = atmosLighting(col);  		col = scaleSoftClip(col); - -		col = mix(col.rgb, diffuse.rgb, diffuse.a);  	} -	else -	{ -		col = diffuse.rgb; -	} - +	  	frag_color.rgb = col;  	//frag_color.a = bloom; diff --git a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl index 3427d6db57..de858b34b5 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/waterF.glsl @@ -67,6 +67,12 @@ VARYING vec4 littleWave;  VARYING vec4 view;  VARYING vec4 vary_position; +vec2 encode_normal(vec3 n) +{ +	float f = sqrt(8 * n.z + 8); +	return n.xy / f + 0.5; +} +  void main()   {  	vec4 color; @@ -161,5 +167,5 @@ void main()  	frag_data[0] = vec4(color.rgb, 0.5); // diffuse  	frag_data[1] = vec4(0.5,0.5,0.5, 0.95); // speccolor*spec, spec -	frag_data[2] = vec4(screenspacewavef.xyz*0.5+0.5, screenspacewavef.z*0.5); // normalxyz, displace +	frag_data[2] = vec4(encode_normal(screenspacewavef), 0.0, 0.0); // normalxyz, displace  } diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl index 777c8b45bb..c8282e9a51 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl @@ -50,7 +50,7 @@ void fullbright_shiny_lighting()  	color.rgb = fullbrightScaleSoftClip(color.rgb); -	color.a = max(color.a, vertex_color.a); +	color.a = 1.0;  	frag_color = color;  } diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyNonIndexedF.glsl index 4fa3b1d939..e7dbd4bbd2 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyNonIndexedF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyNonIndexedF.glsl @@ -51,7 +51,7 @@ void fullbright_shiny_lighting()  	color.rgb = fullbrightScaleSoftClip(color.rgb); -	color.a = max(color.a, vertex_color.a); +	color.a = 1.0;  	frag_color = color;  } diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl index 58984a4263..5886fc65be 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterF.glsl @@ -48,7 +48,7 @@ void fullbright_shiny_lighting_water()  	color.rgb = fullbrightShinyAtmosTransport(color.rgb);  	color.rgb = fullbrightScaleSoftClip(color.rgb); -	color.a = max(color.a, vertex_color.a); +	color.a = 1.0;  	frag_color = applyWaterFog(color);  } diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterNonIndexedF.glsl index a39b7205d7..cddc7d8df8 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterNonIndexedF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyWaterNonIndexedF.glsl @@ -49,7 +49,7 @@ void fullbright_shiny_lighting_water()  	color.rgb = fullbrightShinyAtmosTransport(color.rgb);  	color.rgb = fullbrightScaleSoftClip(color.rgb); -	color.a = max(color.a, vertex_color.a); +	color.a = 1.0;  	frag_color = applyWaterFog(color);  } diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl index 52e3b2ad02..9208c148ef 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightShinyF.glsl @@ -50,7 +50,7 @@ void shiny_lighting()  	color.rgb = atmosLighting(color.rgb);  	color.rgb = scaleSoftClip(color.rgb); -	color.a = max(color.a, vertex_color.a); +	color.a = 1.0;  	frag_color = color;  } diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyNonIndexedF.glsl index 474d5ea496..92628faa68 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightShinyNonIndexedF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightShinyNonIndexedF.glsl @@ -51,7 +51,7 @@ void shiny_lighting()  	color.rgb = atmosLighting(color.rgb);  	color.rgb = scaleSoftClip(color.rgb); -	color.a = max(color.a, vertex_color.a); +	color.a = 1.0;  	frag_color = color;  } diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl index d2a4c47aac..61841674e2 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterF.glsl @@ -47,7 +47,7 @@ void shiny_lighting_water()  	color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a);  	color.rgb = atmosLighting(color.rgb); -	color.a = max(color.a, vertex_color.a); +	color.a = 1.0;  	frag_color = applyWaterFog(color);  } diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterNonIndexedF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterNonIndexedF.glsl index f3bd662364..0b6e835fd0 100644 --- a/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterNonIndexedF.glsl +++ b/indra/newview/app_settings/shaders/class1/lighting/lightShinyWaterNonIndexedF.glsl @@ -48,7 +48,7 @@ void shiny_lighting_water()  	color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a);  	color.rgb = atmosLighting(color.rgb); -	color.a = max(color.a, vertex_color.a); +	color.a = 1.0;  	frag_color = applyWaterFog(color);  } diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl index f95fe59be2..15584548cc 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl @@ -300,7 +300,6 @@ void main()  	vec3 col;  	float bloom = 0.0; -	if (diffuse.a < 0.9)  	{  		vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy); @@ -331,22 +330,19 @@ void main()  			col += spec_contrib;  		} +		col = mix(col, diffuse.rgb, diffuse.a); +  		if (envIntensity > 0.0)  		{ //add environmentmap  			vec3 env_vec = env_mat * refnormpersp;  			col = mix(col.rgb, pow(textureCube(environmentMap, env_vec).rgb, vec3(2.2)) * 2.2,  -				max(envIntensity-diffuse.a*2.0, 0.0));  +				envIntensity);   		}  		col = atmosLighting(col);  		col = scaleSoftClip(col); - -		col = mix(col, diffuse.rgb, diffuse.a); -	} -	else -	{ -		col = diffuse.rgb;  	} +	  	frag_color.rgb = col;  	frag_color.a = bloom; diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 8f8b35c578..6474e1b1de 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1624,11 +1624,18 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,  			U8 tex_mode = 0; +			bool tex_anim = false; + +			LLVOVolume* vobj = (LLVOVolume*) (LLViewerObject*) mVObjp;	 +			tex_mode = vobj->mTexAnimMode; + +			if (vobj->mTextureAnimp) +			{ //texture animation is in play, override specular and normal map tex coords with diffuse texcoords +				tex_anim = true; +			} +  			if (isState(TEXTURE_ANIM))  			{ -				LLVOVolume* vobj = (LLVOVolume*) (LLViewerObject*) mVObjp;	 -				tex_mode = vobj->mTexAnimMode; -  				if (!tex_mode)  				{  					clearState(TEXTURE_ANIM); @@ -1643,7 +1650,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,  					do_xform = false;  				} - +				  				if (getVirtualSize() >= MIN_TEX_ANIM_SIZE)  				{ //don't override texture transform during tc bake  					tex_mode = 0; @@ -1802,7 +1809,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,  							if (mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_TEXCOORD1))  							{  								mVertexBuffer->getTexCoord1Strider(dst, mGeomIndex, mGeomCount, map_range); -								if (mat) +								if (mat && !tex_anim)  								{  									r  = mat->getNormalRotation();  									mat->getNormalOffset(os, ot); @@ -1822,7 +1829,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,  							if (mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_TEXCOORD2))  							{  								mVertexBuffer->getTexCoord2Strider(dst, mGeomIndex, mGeomCount, map_range); -								if (mat) +								if (mat && !tex_anim)  								{  									r  = mat->getSpecularRotation();  									mat->getSpecularOffset(os, ot); diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp index 81284e42dd..fb8cffa4ef 100644 --- a/indra/newview/llmaterialmgr.cpp +++ b/indra/newview/llmaterialmgr.cpp @@ -93,6 +93,7 @@ LLMaterialsResponder::~LLMaterialsResponder()  void LLMaterialsResponder::result(const LLSD& pContent)  { +	LL_DEBUGS("Materials") << LL_ENDL;  	mCallback(true, pContent);  } @@ -176,35 +177,43 @@ const LLMaterialPtr LLMaterialMgr::get(const LLUUID& region_id, const LLMaterial  boost::signals2::connection LLMaterialMgr::get(const LLUUID& region_id, const LLMaterialID& material_id, LLMaterialMgr::get_callback_t::slot_type cb)  { +	boost::signals2::connection connection; +	  	material_map_t::const_iterator itMaterial = mMaterials.find(material_id);  	if (itMaterial != mMaterials.end())  	{ +		LL_DEBUGS("Materials") << "region " << region_id << " found materialid " << material_id << LL_ENDL;  		get_callback_t signal;  		signal.connect(cb);  		signal(material_id, itMaterial->second); -		return boost::signals2::connection(); +		connection = boost::signals2::connection();  	} - -	if (!isGetPending(region_id, material_id)) +	else  	{ -		get_queue_t::iterator itQueue = mGetQueue.find(region_id); -		if (mGetQueue.end() == itQueue) +		if (!isGetPending(region_id, material_id))  		{ -			LL_DEBUGS("Materials") << "mGetQueue inserting region "<<region_id<<" material id " << material_id << LL_ENDL; -			std::pair<get_queue_t::iterator, bool> ret = mGetQueue.insert(std::pair<LLUUID, material_queue_t>(region_id, material_queue_t())); -			itQueue = ret.first; +			get_queue_t::iterator itQueue = mGetQueue.find(region_id); +			if (mGetQueue.end() == itQueue) +			{ +				LL_DEBUGS("Materials") << "mGetQueue inserting region "<<region_id << LL_ENDL; +				std::pair<get_queue_t::iterator, bool> ret = mGetQueue.insert(std::pair<LLUUID, material_queue_t>(region_id, material_queue_t())); +				itQueue = ret.first; +			} +			LL_DEBUGS("Materials") << "adding material id " << material_id << LL_ENDL; +			itQueue->second.insert(material_id); +			markGetPending(region_id, material_id);  		} -		itQueue->second.insert(material_id); -		markGetPending(region_id, material_id); -	} -	get_callback_map_t::iterator itCallback = mGetCallbacks.find(material_id); -	if (itCallback == mGetCallbacks.end()) -	{ -		std::pair<get_callback_map_t::iterator, bool> ret = mGetCallbacks.insert(std::pair<LLMaterialID, get_callback_t*>(material_id, new get_callback_t())); -		itCallback = ret.first; +		get_callback_map_t::iterator itCallback = mGetCallbacks.find(material_id); +		if (itCallback == mGetCallbacks.end()) +		{ +			std::pair<get_callback_map_t::iterator, bool> ret = mGetCallbacks.insert(std::pair<LLMaterialID, get_callback_t*>(material_id, new get_callback_t())); +			itCallback = ret.first; +		} +		connection = itCallback->second->connect(cb);;  	} -	return itCallback->second->connect(cb);; +	 +	return connection;  }  bool LLMaterialMgr::isGetAllPending(const LLUUID& region_id) const diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 2d2a0d6d0c..685614a8c4 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -300,9 +300,9 @@ void LLPanelFace::sendBump()  	U32 bumpiness = mComboBumpiness->getCurrentIndex();  	if (bumpiness < BUMPY_TEXTURE)  	{ -		LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>("bumpytexture control"); -		//texture_ctrl->setImageAssetID(LLUUID()); -		texture_ctrl->clear(); +		LL_DEBUGS("Materials") << "clearing bumptexture control" << LL_ENDL; +		LLTextureCtrl* bumpytexture_ctrl = getChild<LLTextureCtrl>("bumpytexture control"); +		bumpytexture_ctrl->clear();  		LLSD dummy_data;  		onSelectMaterialTexture(dummy_data);  	} @@ -397,10 +397,6 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor  			if (valid)  			{  				value = ctrlTexScaleS->get(); -				//if( checkFlipScaleS->get() ) -				//{ -				//	value = -value; -				//}  				if (comboTexGen &&  				    comboTexGen->getCurrentIndex() == 1)  				{ @@ -635,20 +631,11 @@ void LLPanelFace::getState()  		}  		else  		{ -			llwarns << "failed getChild for 'combobox mattype'" << llendl; +			LL_WARNS("Materials") << "failed getChild for 'combobox mattype'" << LL_ENDL;  		}  		getChildView("combobox mattype")->setEnabled(editable);  		onCommitMaterialsMedia(NULL, this); -		 -		//if ( LLMediaEngine::getInstance()->getMediaRenderer () ) -		//	if ( LLMediaEngine::getInstance()->getMediaRenderer ()->isLoaded () ) -		//	{	 -		//		 -		//		//mLabelTexAutoFix->setEnabled ( editable ); -		//		 -		//		//mBtnAutoFix->setEnabled ( editable ); -		//	}  		bool identical;          bool identical_diffuse; @@ -813,7 +800,7 @@ void LLPanelFace::getState()  				updateAlphaControls(getChild<LLComboBox>("combobox alphamode"),this);  			} -			if(texture_ctrl) +			if(texture_ctrl && !texture_ctrl->isPickerShown())  			{                  if (identical_diffuse)  				{ @@ -849,7 +836,7 @@ void LLPanelFace::getState()                  }              } -            if (shinytexture_ctrl) +            if (shinytexture_ctrl && !shinytexture_ctrl->isPickerShown())              {                  if (identical_spec)                  { @@ -871,7 +858,7 @@ void LLPanelFace::getState()                  }              } -            if (bumpytexture_ctrl) +            if (bumpytexture_ctrl && !bumpytexture_ctrl->isPickerShown())              {                  if (identical_norm)  				{ @@ -1656,12 +1643,13 @@ void LLPanelFace::getState()  void LLPanelFace::refresh()  { +	LL_DEBUGS("Materials") << LL_ENDL;  	getState();  }  void LLPanelFace::onMaterialLoaded(const LLMaterialID& material_id, const LLMaterialPtr material)  { //laying out UI based on material parameters (calls setVisible on various components) -	LL_DEBUGS("Materials") << "Loaded material " << material_id.asString() << material->asLLSD() << LL_ENDL; +	LL_DEBUGS("Materials") << "material id " << material_id.asString() << " data " << material->asLLSD() << LL_ENDL;  	//make a local copy of the material for editing   	// (prevents local edits from overwriting client state on shared materials) @@ -1941,7 +1929,7 @@ void LLPanelFace::onCommitMaterialsMedia(LLUICtrl* ctrl, void* userdata)  	LLComboBox* combo_bumpiness = self->getChild<LLComboBox>("combobox bumpiness");  	if (!combo_mattype || !combo_matmedia || !combo_shininess || !combo_bumpiness)  	{ -		llwarns << "Combo box not found...exiting." << llendl; +		LL_WARNS("Materials") << "Combo box not found...exiting." << LL_ENDL;  		return;  	}  	U32 materials_media = combo_matmedia->getCurrentIndex(); @@ -2127,7 +2115,7 @@ void LLPanelFace::updateBumpyControls(LLUICtrl* ctrl, void* userdata, bool mess_  	LLPanelFace* self = (LLPanelFace*) userdata;  	LLTextureCtrl* texture_ctrl = self->getChild<LLTextureCtrl>("bumpytexture control");  	LLUUID bumpy_texture_ID = texture_ctrl->getImageAssetID(); -	LL_DEBUGS("Materials") << "Bumpy texture selected: " << bumpy_texture_ID << LL_ENDL; +	LL_DEBUGS("Materials") << "texture: " << bumpy_texture_ID << (mess_with_combobox ? "" : " do not") << " update combobox" << LL_ENDL;  	LLComboBox* comboBumpy = self->getChild<LLComboBox>("combobox bumpiness");  	if (!comboBumpy)  	{ @@ -2453,6 +2441,7 @@ void LLPanelFace::onCommitPlanarAlign(LLUICtrl* ctrl, void* userdata)  void LLPanelFace::onTextureSelectionChanged(LLInventoryItem* itemp)  { +	LL_DEBUGS("Materials") << "item asset " << itemp->getAssetUUID() << LL_ENDL;  	LLComboBox* combo_mattype = getChild<LLComboBox>("combobox mattype");  	if (!combo_mattype)  	{ @@ -2470,7 +2459,7 @@ void LLPanelFace::onTextureSelectionChanged(LLInventoryItem* itemp)  			break;  		// no default needed  	} -		 +	LL_DEBUGS("Materials") << "control " << which_control << LL_ENDL;  	LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>(which_control);  	if (texture_ctrl)  	{ diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index 599d9c70c5..3fd024082e 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -126,6 +126,7 @@ public:  	// LLTextureCtrl interface  	void			showPicker(BOOL take_focus); +	bool			isPickerShown() { return !mFloaterHandle.isDead(); }  	void			setLabel(const std::string& label);  	void			setLabelWidth(S32 label_width) {mLabelWidth =label_width;}	  	const std::string&	getLabel() const							{ return mLabel; } diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 27565a8d17..edd47b68c3 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1861,7 +1861,7 @@ S32 LLVOVolume::setTEColor(const U8 te, const LLColor4& color)  	const LLTextureEntry *tep = getTE(te);  	if (!tep)  	{ -		llwarns << "No texture entry for te " << (S32)te << ", object " << mID << llendl; +		LL_WARNS("MaterialTEs") << "No texture entry for te " << (S32)te << ", object " << mID << LL_ENDL;  	}  	else if (color != tep->getColor())  	{ @@ -1975,6 +1975,7 @@ S32 LLVOVolume::setTEGlow(const U8 te, const F32 glow)  void LLVOVolume::setTEMaterialParamsCallback(const LLMaterialID &pMaterialID, const LLMaterialPtr pMaterialParams)  { +	LL_DEBUGS("MaterialTEs") << "materialid " << pMaterialID.asString() << LL_ENDL;  	for (U8 i = 0; i < getNumTEs(); i++)  	{  		if (getTE(i) && (getTE(i)->getMaterialID().isNull() || (getTE(i)->getMaterialID() == pMaterialID))) @@ -1987,9 +1988,11 @@ void LLVOVolume::setTEMaterialParamsCallback(const LLMaterialID &pMaterialID, co  S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID)  {  		S32 res = LLViewerObject::setTEMaterialID(te, pMaterialID); +		LL_DEBUGS("MaterialTEs") << "te "<< (S32)te << " materialid " << pMaterialID.asString() << " res " << res +								 << ( LLSelectMgr::getInstance()->getSelection()->contains(const_cast<LLVOVolume*>(this), te) ? " selected" : " not selected" ) +								 << LL_ENDL;  		if (res)  		{ -			LL_DEBUGS("MaterialTEs") << " " << pMaterialID.asString() << LL_ENDL;  			LLMaterialMgr::instance().get(getRegion()->getRegionID(), pMaterialID, boost::bind(&LLVOVolume::setTEMaterialParamsCallback, this, _1, _2));  			gPipeline.markTextured(mDrawable);  			mFaceMappingChanged = TRUE; @@ -2000,6 +2003,9 @@ S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID)  S32 LLVOVolume::setTEMaterialParams(const U8 te, const LLMaterialPtr pMaterialParams)  {  	S32 res = LLViewerObject::setTEMaterialParams(te, pMaterialParams); +	LL_DEBUGS("MaterialTEs") << "te " << (S32)te << " material " << pMaterialParams->asLLSD() << " res " << res +							 << ( LLSelectMgr::getInstance()->getSelection()->contains(const_cast<LLVOVolume*>(this), te) ? " selected" : " not selected" ) +							 << LL_ENDL;  	if (res)  	{  		gPipeline.markTextured(mDrawable); @@ -4037,6 +4043,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,  	BOOL fullbright = (type == LLRenderPass::PASS_FULLBRIGHT) ||  		(type == LLRenderPass::PASS_INVISIBLE) || +		(type == LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK) ||  		(type == LLRenderPass::PASS_ALPHA && facep->isState(LLFace::FULLBRIGHT));  	if (!fullbright && type != LLRenderPass::PASS_GLOW && !facep->getVertexBuffer()->hasDataType(LLVertexBuffer::TYPE_NORMAL)) @@ -4076,7 +4083,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,  	U8 index = facep->getTextureIndex(); -	LLMaterial* mat = LLPipeline::sRenderDeferred ? facep->getTextureEntry()->getMaterialParams().get() : NULL;  +	LLMaterial* mat = facep->getTextureEntry()->getMaterialParams().get();   	bool batchable = false; @@ -4775,7 +4782,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)  		fullbright_mask = fullbright_mask | LLVertexBuffer::MAP_TEXTURE_INDEX;  	} -	genDrawInfo(group, simple_mask | LLVertexBuffer::MAP_TEXTURE_INDEX, simple_faces, FALSE, batch_textures, TRUE); +	genDrawInfo(group, simple_mask | LLVertexBuffer::MAP_TEXTURE_INDEX, simple_faces, FALSE, batch_textures, FALSE);  	genDrawInfo(group, fullbright_mask | LLVertexBuffer::MAP_TEXTURE_INDEX, fullbright_faces, FALSE, batch_textures);  	genDrawInfo(group, alpha_mask | LLVertexBuffer::MAP_TEXTURE_INDEX, alpha_faces, TRUE, batch_textures);  	genDrawInfo(group, bump_mask | LLVertexBuffer::MAP_TEXTURE_INDEX, bump_faces, FALSE, FALSE); @@ -5242,6 +5249,14 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::  			LLMaterial* mat = te->getMaterialParams().get(); +			bool can_be_shiny = true; +			if (mat) +			{ +				U8 mode = mat->getDiffuseAlphaMode(); +				can_be_shiny = mode == LLMaterial::DIFFUSE_ALPHA_MODE_NONE || +								mode == LLMaterial::DIFFUSE_ALPHA_MODE_EMISSIVE; +			} +  			if (mat && LLPipeline::sRenderDeferred && !hud_group)  			{  				if (fullbright) @@ -5319,7 +5334,8 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::  			}  			else if (gPipeline.canUseVertexShaders()  				&& LLPipeline::sRenderBump  -				&& te->getShiny()) +				&& te->getShiny()  +				&& can_be_shiny)  			{ //shiny  				if (tex->getPrimaryFormat() == GL_ALPHA)  				{ //invisiprim+shiny @@ -5363,7 +5379,14 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::  				}  				else if (fullbright || bake_sunlight)  				{ //fullbright -					registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT); +					if (mat && mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK) +					{ +						registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK); +					} +					else +					{ +						registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT); +					}  					if (LLPipeline::sRenderDeferred && !hud_group && LLPipeline::sRenderBump && te->getBumpmap())  					{ //if this is the deferred render and a bump map is present, register in post deferred bump  						registerFace(group, facep, LLRenderPass::PASS_POST_BUMP); @@ -5378,7 +5401,14 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::  					else  					{ //all around simple  						llassert(mask & LLVertexBuffer::MAP_NORMAL); -						registerFace(group, facep, LLRenderPass::PASS_SIMPLE); +						if (mat && mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK) +						{ //material alpha mask can be respected in non-deferred +							registerFace(group, facep, LLRenderPass::PASS_ALPHA_MASK); +						} +						else +						{ +							registerFace(group, facep, LLRenderPass::PASS_SIMPLE); +						}  					}  				} diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 9b7608e197..1957345b6d 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1677,14 +1677,7 @@ U32 LLPipeline::getPoolTypeFromTE(const LLTextureEntry* te, LLViewerTexture* ima  				alpha = false;  				break;  			default: //alpha mode set to "mask", go to alpha pool if fullbright -				if (te->getFullbright()) -				{  -					alpha = true; -				} -				else -				{ -					alpha = false; // Material's alpha mode is set to none, mask, or emissive.  Toss it into the opaque material draw pool. -				} +				alpha = false; // Material's alpha mode is set to none, mask, or emissive.  Toss it into the opaque material draw pool.  				break;  		}  	} diff --git a/indra/newview/skins/default/xui/en/panel_tools_texture.xml b/indra/newview/skins/default/xui/en/panel_tools_texture.xml index 042134a8c6..678b4f43cd 100644 --- a/indra/newview/skins/default/xui/en/panel_tools_texture.xml +++ b/indra/newview/skins/default/xui/en/panel_tools_texture.xml @@ -644,8 +644,8 @@               layout="topleft"  			 label_width="205"               left="10" -             max_val="9999" -             min_val="-9999" +             max_val="180" +             min_val="-180"               name="bumpyRot"               width="265" /> @@ -707,8 +707,8 @@               layout="topleft"  			 label_width="205"               left="10" -             max_val="9999" -             min_val="-9999" +             max_val="180" +             min_val="-180"               name="shinyRot"               width="265" /> | 
