diff options
author | Dave Parks <davep@lindenlab.com> | 2013-04-26 11:47:15 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2013-04-26 11:47:15 -0500 |
commit | 243c7bd06441af0c286d71d6ff0b7d488285bc1c (patch) | |
tree | 37eca49b29fc9a2fa6241652c7f9979a45933b98 /indra | |
parent | 6f953cc97b90eff43d69c2bda28fc9863fc57214 (diff) | |
parent | 15852b88d990c980abd1ec4b66b4cc8cae4fd313 (diff) |
Automated merge with https://bitbucket.org/lindenlab/viewer-development-materials
Diffstat (limited to 'indra')
6 files changed, 31 insertions, 27 deletions
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 aafa932b8f..90cf085524 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/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl index 3d39394c32..466714c108 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); |