diff options
4 files changed, 21 insertions, 17 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl index b6a9417fe7..36433a5827 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl @@ -43,7 +43,6 @@ void main() float shadow = 1.0; vec4 color = diffuseLookup(vary_texcoord0.xy)*vertex_color; - color.rgb = pow(color.rgb, vec3(2.2)); color.rgb = fullbrightAtmosTransport(color.rgb); diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl index 53e5a228fa..bff87cb6aa 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/multiSpotLightF.glsl @@ -70,8 +70,6 @@ vec4 texture2DLodSpecular(sampler2D projectionMap, vec2 tc, float lod) { vec4 ret = texture2DLod(projectionMap, tc, lod); - ret.rgb = pow(ret.rgb, vec3(2.2)); - vec2 dist = tc-vec2(0.5); float det = max(1.0-lod/(proj_lod*0.5), 0.0); @@ -87,8 +85,6 @@ vec4 texture2DLodDiffuse(sampler2D projectionMap, vec2 tc, float lod) { vec4 ret = texture2DLod(projectionMap, tc, lod); - ret.rgb = pow(ret.rgb, vec3(2.2)); - vec2 dist = vec2(0.5) - abs(tc-vec2(0.5)); float det = min(lod/(proj_lod*0.5), 1.0); @@ -106,8 +102,6 @@ vec4 texture2DLodAmbient(sampler2D projectionMap, vec2 tc, float lod) { vec4 ret = texture2DLod(projectionMap, tc, lod); - ret.rgb = pow(ret.rgb, vec3(2.2)); - vec2 dist = tc-vec2(0.5); float d = dot(dist,dist); diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 210b1e9dca..754a13dd4c 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -1260,7 +1260,7 @@ void LLPanelFace::onMaterialLoaded(const LLMaterialID& material_id, const LLMate rot = material->getSpecularRotation(); getChild<LLUICtrl>("shinyScaleU")->setValue(repeat_x); getChild<LLUICtrl>("shinyScaleV")->setValue(repeat_y); - getChild<LLUICtrl>("shinyRot")->setValue(rot); + getChild<LLUICtrl>("shinyRot")->setValue(rot*RAD_TO_DEG); getChild<LLUICtrl>("shinyOffsetU")->setValue(offset_x); getChild<LLUICtrl>("shinyOffsetV")->setValue(offset_y); getChild<LLColorSwatchCtrl>("shinycolorswatch")->setOriginal(material->getSpecularLightColor()); @@ -1281,7 +1281,7 @@ void LLPanelFace::onMaterialLoaded(const LLMaterialID& material_id, const LLMate rot = material->getNormalRotation(); getChild<LLUICtrl>("bumpyScaleU")->setValue(repeat_x); getChild<LLUICtrl>("bumpyScaleV")->setValue(repeat_y); - getChild<LLUICtrl>("bumpyRot")->setValue(rot); + getChild<LLUICtrl>("bumpyRot")->setValue(rot*RAD_TO_DEG); getChild<LLUICtrl>("bumpyOffsetU")->setValue(offset_x); getChild<LLUICtrl>("bumpyOffsetV")->setValue(offset_y); } @@ -1309,7 +1309,22 @@ void LLPanelFace::updateMaterial() if (!mMaterial) { mMaterial = LLMaterialPtr(new LLMaterial()); + //set defaults according to UI spec + mMaterial->setSpecularLightColor(LLColor4U::white); + mMaterial->setSpecularLightExponent((U8) (255*0.2f)); + mMaterial->setEnvironmentIntensity(0); + mMaterial->setDiffuseAlphaMode(LLMaterial::DIFFUSE_ALPHA_MODE_NONE); + mMaterial->setAlphaMaskCutoff(0); } + else + { + mMaterial->setSpecularLightColor(getChild<LLColorSwatchCtrl>("shinycolorswatch")->get()); + mMaterial->setSpecularLightExponent((U8)(255*getChild<LLUICtrl>("glossiness")->getValue().asReal())); + mMaterial->setEnvironmentIntensity((U8)(255*getChild<LLUICtrl>("environment")->getValue().asReal())); + mMaterial->setDiffuseAlphaMode(getChild<LLComboBox>("combobox alphamode")->getCurrentIndex()); + mMaterial->setAlphaMaskCutoff((U8)(getChild<LLUICtrl>("maskcutoff")->getValue().asInteger())); + } + if (bumpiness == BUMPY_TEXTURE) { LL_DEBUGS("Materials") << "Setting bumpy texture, bumpiness = " << bumpiness << LL_ENDL; @@ -1318,7 +1333,7 @@ void LLPanelFace::updateMaterial() getChild<LLUICtrl>("bumpyOffsetV")->getValue().asReal()); mMaterial->setNormalRepeat(getChild<LLUICtrl>("bumpyScaleU")->getValue().asReal(), getChild<LLUICtrl>("bumpyScaleV")->getValue().asReal()); - mMaterial->setNormalRotation(getChild<LLUICtrl>("bumpyRot")->getValue().asReal()); + mMaterial->setNormalRotation(getChild<LLUICtrl>("bumpyRot")->getValue().asReal()*DEG_TO_RAD); } else { @@ -1336,7 +1351,7 @@ void LLPanelFace::updateMaterial() getChild<LLUICtrl>("shinyOffsetV")->getValue().asReal()); mMaterial->setSpecularRepeat(getChild<LLUICtrl>("shinyScaleU")->getValue().asReal(), getChild<LLUICtrl>("shinyScaleV")->getValue().asReal()); - mMaterial->setSpecularRotation(getChild<LLUICtrl>("shinyRot")->getValue().asReal()); + mMaterial->setSpecularRotation(getChild<LLUICtrl>("shinyRot")->getValue().asReal()*DEG_TO_RAD); } else { @@ -1346,11 +1361,7 @@ void LLPanelFace::updateMaterial() mMaterial->setSpecularRepeat(1.0f,1.0f); mMaterial->setSpecularRotation(0.0f); } - mMaterial->setSpecularLightColor(getChild<LLColorSwatchCtrl>("shinycolorswatch")->get()); - mMaterial->setSpecularLightExponent((U8)(255*getChild<LLUICtrl>("glossiness")->getValue().asReal())); - mMaterial->setEnvironmentIntensity((U8)(255*getChild<LLUICtrl>("environment")->getValue().asReal())); - mMaterial->setDiffuseAlphaMode(getChild<LLComboBox>("combobox alphamode")->getCurrentIndex()); - mMaterial->setAlphaMaskCutoff((U8)(getChild<LLUICtrl>("maskcutoff")->getValue().asInteger())); + LL_DEBUGS("Materials") << "Updating material: " << mMaterial->asLLSD() << LL_ENDL; LLSelectMgr::getInstance()->selectionSetMaterial( mMaterial ); } 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 8382ad69d1..e156b3e07c 100644 --- a/indra/newview/skins/default/xui/en/panel_tools_texture.xml +++ b/indra/newview/skins/default/xui/en/panel_tools_texture.xml @@ -394,7 +394,7 @@ max_value="1" follows="left|top" height="19" - initial_value="0" + initial_value="0.2" layout="topleft" top_delta="-4" left_pad="10" |