summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl7
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyF.glsl38
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl203
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl20
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/simpleV.glsl29
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl36
-rw-r--r--indra/newview/llappviewer.cpp1
-rw-r--r--indra/newview/lldrawable.cpp55
-rw-r--r--indra/newview/lldrawpool.cpp15
-rw-r--r--indra/newview/lldrawpool.h3
-rw-r--r--indra/newview/lldrawpoolavatar.cpp19
-rw-r--r--indra/newview/lldrawpoolavatar.h4
-rw-r--r--indra/newview/lldrawpoolground.cpp5
-rw-r--r--indra/newview/lldrawpoolground.h2
-rw-r--r--indra/newview/lldrawpoolsky.cpp5
-rw-r--r--indra/newview/lldrawpoolsky.h2
-rw-r--r--indra/newview/lldrawpoolterrain.cpp7
-rw-r--r--indra/newview/lldrawpoolterrain.h2
-rw-r--r--indra/newview/lldrawpooltree.cpp5
-rw-r--r--indra/newview/lldrawpooltree.h2
-rw-r--r--indra/newview/lldrawpoolwater.cpp7
-rw-r--r--indra/newview/lldrawpoolwater.h1
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp5
-rw-r--r--indra/newview/lldrawpoolwlsky.h2
-rw-r--r--indra/newview/llface.cpp2
-rw-r--r--indra/newview/llpanelface.cpp33
-rw-r--r--indra/newview/llsettingsvo.cpp11
-rw-r--r--indra/newview/llspatialpartition.cpp4
-rw-r--r--indra/newview/llspatialpartition.h24
-rw-r--r--indra/newview/lltexturectrl.cpp8
-rw-r--r--indra/newview/lltexturectrl.h1
-rw-r--r--indra/newview/lltoolpie.cpp2
-rw-r--r--indra/newview/llviewermenu.cpp4
-rw-r--r--indra/newview/llviewerobject.cpp26
-rw-r--r--indra/newview/llviewerobject.h1
-rw-r--r--indra/newview/llviewerregion.cpp2
-rw-r--r--indra/newview/llviewerregion.h2
-rw-r--r--indra/newview/llviewerstats.cpp48
-rw-r--r--indra/newview/llvoavatar.cpp83
-rw-r--r--indra/newview/llvoavatar.h1
-rw-r--r--indra/newview/llvoavatarself.cpp5
-rw-r--r--indra/newview/llvovolume.cpp28
-rw-r--r--indra/newview/pipeline.cpp20
-rw-r--r--indra/newview/pipeline.h1
-rw-r--r--indra/newview/skins/default/textures/windows/login_sl_logo.pngbin21797 -> 5764 bytes
-rw-r--r--indra/newview/skins/default/textures/windows/login_sl_logo_small.pngbin5978 -> 4802 bytes
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml10
48 files changed, 463 insertions, 332 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl
index caa4fe1f65..495daa2db6 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl
@@ -70,15 +70,18 @@ uniform float cloud_scale;
// NOTE: Keep these in sync!
// indra\newview\app_settings\shaders\class1\deferred\skyV.glsl
// indra\newview\app_settings\shaders\class1\deferred\cloudsV.glsl
+// indra\newview\app-settings\shaders\class2\windlight\cloudsV.glsl
// indra\newview\lllegacyatmospherics.cpp
+// indra\newview\llsettingsvo.cpp
void main()
{
-
// World / view / projection
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
// Texture coords
- vary_texcoord0 = texcoord0;
+ // SL-13084 EEP added support for custom cloud textures -- flip them horizontally to match the preview of Clouds > Cloud Scroll
+ vary_texcoord0 = vec2( -texcoord0.x, texcoord0.y ); // See: LLSettingsVOSky::applySpecial
+
vary_texcoord0.xy -= 0.5;
vary_texcoord0.xy /= cloud_scale;
vary_texcoord0.xy += 0.5;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyF.glsl
index bd0ad3bce8..2d40e63eff 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyF.glsl
@@ -42,6 +42,9 @@ VARYING vec4 vary_position;
uniform samplerCube environmentMap;
+// render_hud_attachments() -> HUD objects set LLShaderMgr::NO_ATMO; used in LLDrawPoolAlpha::beginRenderPass()
+uniform int no_atmo;
+
vec3 fullbrightShinyAtmosTransport(vec3 light);
vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten);
vec3 fullbrightScaleSoftClip(vec3 light);
@@ -51,7 +54,9 @@ void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, ou
vec3 linear_to_srgb(vec3 c);
vec3 srgb_to_linear(vec3 c);
-
+// See:
+// class1\deferred\fullbrightShinyF.glsl
+// class1\lighting\lightFullbrightShinyF.glsl
void main()
{
#ifdef HAS_DIFFUSE_LOOKUP
@@ -59,25 +64,28 @@ void main()
#else
vec4 color = texture2D(diffuseMap, vary_texcoord0.xy);
#endif
-
+
color.rgb *= vertex_color.rgb;
- vec3 pos = vary_position.xyz/vary_position.w;
- vec3 sunlit;
- vec3 amblit;
- vec3 additive;
- vec3 atten;
+ // SL-9632 HUDs are affected by Atmosphere
+ if (no_atmo == 0)
+ {
+ vec3 sunlit;
+ vec3 amblit;
+ vec3 additive;
+ vec3 atten;
+ vec3 pos = vary_position.xyz/vary_position.w;
+
+ calcAtmosphericVars(pos.xyz, vec3(0), 1.0, sunlit, amblit, additive, atten, false);
- calcAtmosphericVars(pos.xyz, vec3(0), 1.0, sunlit, amblit, additive, atten, false);
-
- vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb;
- float env_intensity = vertex_color.a;
- color.rgb = mix(color.rgb, envColor.rgb, env_intensity);
+ vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb;
+ float env_intensity = vertex_color.a;
//color.rgb = srgb_to_linear(color.rgb);
-
- color.rgb = fullbrightAtmosTransportFrag(color.rgb, additive, atten);
- color.rgb = fullbrightScaleSoftClip(color.rgb);
+ color.rgb = mix(color.rgb, envColor.rgb, env_intensity);
+ color.rgb = fullbrightAtmosTransportFrag(color.rgb, additive, atten);
+ color.rgb = fullbrightScaleSoftClip(color.rgb);
+ }
color.a = 1.0;
diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
index 0d1cc81786..8c402fcb54 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
@@ -1,24 +1,24 @@
-/**
- * @file multiPointLightF.glsl
+/**
+ * @file class1/deferred/multiPointLightF.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2007, Linden Research, Inc.
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
- *
+ *
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ *
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -36,119 +36,112 @@ out vec4 frag_color;
uniform sampler2DRect depthMap;
uniform sampler2DRect diffuseRect;
uniform sampler2DRect specularRect;
-uniform samplerCube environmentMap;
-uniform sampler2D noiseMap;
-uniform sampler2D lightFunc;
+uniform samplerCube environmentMap;
+uniform sampler2D noiseMap;
+uniform sampler2D lightFunc;
-
-uniform vec3 env_mat[3];
+uniform vec3 env_mat[3];
uniform float sun_wash;
+uniform int light_count;
+uniform vec4 light[LIGHT_COUNT];
+uniform vec4 light_col[LIGHT_COUNT];
-uniform int light_count;
-
-uniform vec4 light[LIGHT_COUNT];
-uniform vec4 light_col[LIGHT_COUNT];
-
-VARYING vec4 vary_fragcoord;
-uniform vec2 screen_res;
-
+uniform vec2 screen_res;
uniform float far_z;
+uniform mat4 inv_proj;
-uniform mat4 inv_proj;
+VARYING vec4 vary_fragcoord;
vec4 getPosition(vec2 pos_screen);
vec3 getNorm(vec2 pos_screen);
vec3 srgb_to_linear(vec3 c);
-void main()
+void main()
{
- vec3 out_col = vec3(0,0,0);
-
#if defined(LOCAL_LIGHT_KILL)
- discard;
-#else
- vec2 frag = (vary_fragcoord.xy*0.5+0.5)*screen_res;
- vec3 pos = getPosition(frag.xy).xyz;
- if (pos.z < far_z)
- {
- discard;
- }
-
- vec3 norm = getNorm(frag.xy);
-
- vec4 spec = texture2DRect(specularRect, frag.xy);
- vec3 diff = texture2DRect(diffuseRect, frag.xy).rgb;
- diff.rgb = srgb_to_linear(diff.rgb);
-
- float noise = texture2D(noiseMap, frag.xy/128.0).b;
- vec3 npos = normalize(-pos);
-
- // As of OSX 10.6.7 ATI Apple's crash when using a variable size loop
- for (int i = 0; i < LIGHT_COUNT; ++i)
- {
- vec3 lv = light[i].xyz-pos;
- float dist = length(lv);
- dist /= light[i].w;
- if (dist <= 1.0)
- {
- float da = dot(norm, lv);
- if (da > 0.0)
- {
- lv = normalize(lv);
- da = dot(norm, lv);
-
- float fa = light_col[i].a+1.0;
- float dist_atten = clamp(1.0-(dist-1.0*(1.0-fa))/fa, 0.0, 1.0);
- dist_atten *= dist_atten;
-
- // Tweak falloff slightly to match pre-EEP attenuation
- // NOTE: this magic number also shows up in a great many other places, search for dist_atten *= to audit
- dist_atten *= 2.0;
-
- dist_atten *= noise;
-
- float lit = da * dist_atten;
-
- vec3 col = light_col[i].rgb*lit*diff;
-
- //vec3 col = vec3(dist2, light_col[i].a, lit);
-
- if (spec.a > 0.0)
- {
- lit = min(da*6.0, 1.0) * dist_atten;
- //vec3 ref = dot(pos+lv, norm);
- vec3 h = normalize(lv+npos);
- float nh = dot(norm, h);
- float nv = dot(norm, npos);
- float vh = dot(npos, h);
- float sa = nh;
- float fres = pow(1 - dot(h, npos), 5)*0.4+0.5;
-
- float gtdenom = 2 * nh;
- float gt = max(0, min(gtdenom * nv / vh, gtdenom * da / vh));
-
- if (nh > 0.0)
- {
- float scol = fres*texture2D(lightFunc, vec2(nh, spec.a)).r*gt/(nh*da);
- col += lit*scol*light_col[i].rgb*spec.rgb;
- //col += spec.rgb;
- }
- }
-
- out_col += col;
- }
- }
- }
+ discard; // Bail immediately
#endif
-
- frag_color.rgb = out_col;
- frag_color.a = 0.0;
+
+ vec3 out_col = vec3(0, 0, 0);
+ vec2 frag = (vary_fragcoord.xy * 0.5 + 0.5) * screen_res;
+ vec3 pos = getPosition(frag.xy).xyz;
+ if (pos.z < far_z)
+ {
+ discard;
+ }
+
+ vec3 norm = getNorm(frag.xy);
+
+ vec4 spec = texture2DRect(specularRect, frag.xy);
+ spec.rgb = srgb_to_linear(spec.rgb);
+ vec3 diff = texture2DRect(diffuseRect, frag.xy).rgb;
+ diff.rgb = srgb_to_linear(diff.rgb);
+
+ float noise = texture2D(noiseMap, frag.xy / 128.0).b;
+ vec3 npos = normalize(-pos);
+
+ // As of OSX 10.6.7 ATI Apple's crash when using a variable size loop
+ for (int i = 0; i < LIGHT_COUNT; ++i)
+ {
+ vec3 lv = light[i].xyz - pos;
+ float dist = length(lv);
+ dist /= light[i].w;
+ if (dist <= 1.0)
+ {
+ float da = dot(norm, lv);
+ if (da > 0.0)
+ {
+ lv = normalize(lv);
+ da = dot(norm, lv);
+
+ float fa = light_col[i].a + 1.0;
+ float dist_atten = clamp(1.0 - (dist - 1.0 * (1.0 - fa)) / fa, 0.0, 1.0);
+ dist_atten *= dist_atten;
+
+ // Tweak falloff slightly to match pre-EEP attenuation
+ // NOTE: this magic number also shows up in a great many other places, search for dist_atten *= to audit
+ dist_atten *= 2.0;
+
+ dist_atten *= noise;
+
+ float lit = da * dist_atten;
+
+ vec3 col = light_col[i].rgb * lit * diff;
+
+ if (spec.a > 0.0)
+ {
+ lit = min(da * 6.0, 1.0) * dist_atten;
+ vec3 h = normalize(lv + npos);
+ float nh = dot(norm, h);
+ float nv = dot(norm, npos);
+ float vh = dot(npos, h);
+ float sa = nh;
+ float fres = pow(1 - dot(h, npos), 5) * 0.4 + 0.5;
+
+ float gtdenom = 2 * nh;
+ float gt = max(0, min(gtdenom * nv / vh, gtdenom * da / vh));
+
+ if (nh > 0.0)
+ {
+ float scol = fres * texture2D(lightFunc, vec2(nh, spec.a)).r * gt / (nh * da);
+ col += lit * scol * light_col[i].rgb * spec.rgb;
+ }
+ }
+
+ out_col += col;
+ }
+ }
+ }
+
+ frag_color.rgb = out_col;
+ frag_color.a = 0.0;
#ifdef IS_AMD_CARD
- // If it's AMD make sure the GLSL compiler sees the arrays referenced once by static index. Otherwise it seems to optimise the storage awawy which leads to unfun crashes and artifacts.
- vec4 dummy1 = light[0];
- vec4 dummy2 = light_col[0];
- vec4 dummy3 = light[LIGHT_COUNT-1];
- vec4 dummy4 = light_col[LIGHT_COUNT-1];
+ // If it's AMD make sure the GLSL compiler sees the arrays referenced once by static index. Otherwise it seems to optimise the storage
+ // awawy which leads to unfun crashes and artifacts.
+ vec4 dummy1 = light[0];
+ vec4 dummy2 = light_col[0];
+ vec4 dummy3 = light[LIGHT_COUNT - 1];
+ vec4 dummy4 = light_col[LIGHT_COUNT - 1];
#endif
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl
index f665394b46..ab8b617746 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightAlphaMaskF.glsl
@@ -41,12 +41,12 @@ void default_lighting()
{
vec4 color = diffuseLookup(vary_texcoord0.xy);
- color *= vertex_color;
-
if (color.a < minimum_alpha)
{
discard;
}
+
+ color *= vertex_color;
color.rgb = atmosLighting(color.rgb);
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl
index 567811cd75..3eaaa41866 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightShinyF.glsl
@@ -35,20 +35,30 @@ VARYING vec3 vary_texcoord1;
uniform samplerCube environmentMap;
+// render_hud_attachments() -> HUD objects set LLShaderMgr::NO_ATMO; used in LLDrawPoolAlpha::beginRenderPass()
+uniform int no_atmo;
+
vec3 fullbrightShinyAtmosTransport(vec3 light);
vec3 fullbrightScaleSoftClip(vec3 light);
+// See:
+// class1\deferred\fullbrightShinyF.glsl
+// class1\lighting\lightFullbrightShinyF.glsl
void fullbright_shiny_lighting()
{
vec4 color = diffuseLookup(vary_texcoord0.xy);
color.rgb *= vertex_color.rgb;
-
- vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb;
- color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a*0.75); // MAGIC NUMBER SL-12574; ALM: Off, Quality > Low
- color.rgb = fullbrightShinyAtmosTransport(color.rgb);
+ // SL-9632 HUDs are affected by Atmosphere
+ if (no_atmo == 0)
+ {
+ vec3 envColor = textureCube(environmentMap, vary_texcoord1.xyz).rgb;
+ color.rgb = mix(color.rgb, envColor.rgb, vertex_color.a*0.75); // MAGIC NUMBER SL-12574; ALM: Off, Quality > Low
+
+ color.rgb = fullbrightShinyAtmosTransport(color.rgb);
- color.rgb = fullbrightScaleSoftClip(color.rgb);
+ color.rgb = fullbrightScaleSoftClip(color.rgb);
+ }
color.a = 1.0;
diff --git a/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl b/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl
index a59bd9c0a6..9ef7704b70 100644
--- a/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/simpleV.glsl
@@ -1,4 +1,4 @@
-/**
+/**
* @file simpleV.glsl
*
* $LicenseInfo:firstyear=2007&license=viewerlgpl$
@@ -28,6 +28,9 @@ uniform mat4 texture_matrix0;
uniform mat4 modelview_matrix;
uniform mat4 modelview_projection_matrix;
+// render_hud_attachments() -> HUD objects set LLShaderMgr::NO_ATMO; used in LLDrawPoolAlpha::beginRenderPass()
+uniform int no_atmo;
+
ATTRIBUTE vec3 position;
void passTextureIndex();
ATTRIBUTE vec2 texcoord0;
@@ -46,19 +49,23 @@ void main()
{
//transform vertex
vec4 vert = vec4(position.xyz,1.0);
- passTextureIndex();
- vec4 pos = (modelview_matrix * vert);
gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
+
+ passTextureIndex();
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0, 0, 1)).xy;
-
-
-
- vec3 norm = normalize(normal_matrix * normal);
- calcAtmospherics(pos.xyz);
+ // SL-9632 HUDs are affected by Atmosphere
+ if (no_atmo == 1)
+ {
+ vertex_color = diffuse_color;
+ }
+ else
+ {
+ vec4 pos = (modelview_matrix * vert);
+ vec3 norm = normalize(normal_matrix * normal);
- vec4 color = calcLighting(pos.xyz, norm, diffuse_color);
- vertex_color = color;
+ calcAtmospherics(pos.xyz);
-
+ vertex_color = calcLighting(pos.xyz, norm, diffuse_color);
+ }
}
diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl
index 2c1475d547..a4389f62dc 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl
@@ -36,6 +36,7 @@ ATTRIBUTE vec2 texcoord0;
VARYING vec4 vary_CloudColorSun;
VARYING vec4 vary_CloudColorAmbient;
VARYING float vary_CloudDensity;
+
VARYING vec2 vary_texcoord0;
VARYING vec2 vary_texcoord1;
VARYING vec2 vary_texcoord2;
@@ -66,13 +67,31 @@ uniform vec4 cloud_color;
uniform float cloud_scale;
+// NOTE: Keep these in sync!
+// indra\newview\app_settings\shaders\class1\deferred\skyV.glsl
+// indra\newview\app_settings\shaders\class1\deferred\cloudsV.glsl
+// indra\newview\app-settings\shaders\class2\windlight\cloudsV.glsl
+// indra\newview\lllegacyatmospherics.cpp
+// indra\newview\llsettingsvo.cpp
void main()
{
-
// World / view / projection
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
- vary_texcoord0 = texcoord0;
+ // Texture coords
+ // SL-13084 EEP added support for custom cloud textures -- flip them horizontally to match the preview of Clouds > Cloud Scroll
+ vary_texcoord0 = vec2( -texcoord0.x, texcoord0.y ); // See: LLSettingsVOSky::applySpecial
+
+ vary_texcoord0.xy -= 0.5;
+ vary_texcoord0.xy /= cloud_scale;
+ vary_texcoord0.xy += 0.5;
+
+ vary_texcoord1 = vary_texcoord0;
+ vary_texcoord1.x += lightnorm.x * 0.0125;
+ vary_texcoord1.y += lightnorm.z * 0.0125;
+
+ vary_texcoord2 = vary_texcoord0 * 16.;
+ vary_texcoord3 = vary_texcoord1 * 16.;
// Get relative position
vec3 P = position.xyz - camPosLocal.xyz + vec3(0,50,0);
@@ -175,19 +194,6 @@ void main()
vary_CloudDensity = 2. * (cloud_shadow - 0.25);
- // Texture coords
- vary_texcoord0 = texcoord0;
- vary_texcoord0.xy -= 0.5;
- vary_texcoord0.xy /= cloud_scale;
- vary_texcoord0.xy += 0.5;
-
- vary_texcoord1 = vary_texcoord0;
- vary_texcoord1.x += lightnorm.x * 0.0125;
- vary_texcoord1.y += lightnorm.z * 0.0125;
-
- vary_texcoord2 = vary_texcoord0 * 16.;
- vary_texcoord3 = vary_texcoord1 * 16.;
-
// Combine these to minimize register use
vary_CloudColorAmbient += oHazeColorBelowCloud;
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 7c0124322c..6ca9484fbb 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -73,6 +73,7 @@
#include "llviewermedia.h"
#include "llviewerparcelaskplay.h"
#include "llviewerparcelmedia.h"
+#include "llviewershadermgr.h"
#include "llviewermediafocus.h"
#include "llviewermessage.h"
#include "llviewerobjectlist.h"
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 8c6cbc020b..2219f20272 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -1178,11 +1178,33 @@ LLSpatialPartition* LLDrawable::getSpatialPartition()
}
else if (isRoot())
{
- if (mSpatialBridge && (mSpatialBridge->asPartition()->mPartitionType == LLViewerRegion::PARTITION_HUD) != mVObjp->isHUDAttachment())
+ if (mSpatialBridge)
{
- // remove obsolete bridge
- mSpatialBridge->markDead();
- setSpatialBridge(NULL);
+ U32 partition_type = mSpatialBridge->asPartition()->mPartitionType;
+ bool is_hud = mVObjp->isHUDAttachment();
+ bool is_animesh = mVObjp->isAnimatedObject() && mVObjp->getControlAvatar() != NULL;
+ bool is_attachment = mVObjp->isAttachment() && !is_hud && !is_animesh;
+ if ((partition_type == LLViewerRegion::PARTITION_HUD) != is_hud)
+ {
+ // Was/became HUD
+ // remove obsolete bridge
+ mSpatialBridge->markDead();
+ setSpatialBridge(NULL);
+ }
+ else if ((partition_type == LLViewerRegion::PARTITION_CONTROL_AV) != is_animesh)
+ {
+ // Was/became part of animesh
+ // remove obsolete bridge
+ mSpatialBridge->markDead();
+ setSpatialBridge(NULL);
+ }
+ else if ((partition_type == LLViewerRegion::PARTITION_AVATAR) != is_attachment)
+ {
+ // Was/became part of avatar
+ // remove obsolete bridge
+ mSpatialBridge->markDead();
+ setSpatialBridge(NULL);
+ }
}
//must be an active volume
if (!mSpatialBridge)
@@ -1191,6 +1213,15 @@ LLSpatialPartition* LLDrawable::getSpatialPartition()
{
setSpatialBridge(new LLHUDBridge(this, getRegion()));
}
+ else if (mVObjp->isAnimatedObject() && mVObjp->getControlAvatar())
+ {
+ setSpatialBridge(new LLControlAVBridge(this, getRegion()));
+ }
+ // check HUD first, because HUD is also attachment
+ else if (mVObjp->isAttachment())
+ {
+ setSpatialBridge(new LLAvatarBridge(this, getRegion()));
+ }
else
{
setSpatialBridge(new LLVolumeBridge(this, getRegion()));
@@ -1698,12 +1729,26 @@ void LLDrawable::updateFaceSize(S32 idx)
LLBridgePartition::LLBridgePartition(LLViewerRegion* regionp)
: LLSpatialPartition(0, FALSE, 0, regionp)
{
- mDrawableType = LLPipeline::RENDER_TYPE_AVATAR;
+ mDrawableType = LLPipeline::RENDER_TYPE_VOLUME;
mPartitionType = LLViewerRegion::PARTITION_BRIDGE;
mLODPeriod = 16;
mSlopRatio = 0.25f;
}
+LLAvatarPartition::LLAvatarPartition(LLViewerRegion* regionp)
+ : LLBridgePartition(regionp)
+{
+ mDrawableType = LLPipeline::RENDER_TYPE_AVATAR;
+ mPartitionType = LLViewerRegion::PARTITION_AVATAR;
+}
+
+LLControlAVPartition::LLControlAVPartition(LLViewerRegion* regionp)
+ : LLBridgePartition(regionp)
+{
+ mDrawableType = LLPipeline::RENDER_TYPE_CONTROL_AV;
+ mPartitionType = LLViewerRegion::PARTITION_CONTROL_AV;
+}
+
LLHUDBridge::LLHUDBridge(LLDrawable* drawablep, LLViewerRegion* regionp)
: LLVolumeBridge(drawablep, regionp)
{
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp
index 2aee7b450a..d583a692f9 100644
--- a/indra/newview/lldrawpool.cpp
+++ b/indra/newview/lldrawpool.cpp
@@ -86,7 +86,8 @@ LLDrawPool *LLDrawPool::createPool(const U32 type, LLViewerTexture *tex0)
poolp = new LLDrawPoolAlpha();
break;
case POOL_AVATAR:
- poolp = new LLDrawPoolAvatar();
+ case POOL_CONTROL_AV:
+ poolp = new LLDrawPoolAvatar(type);
break;
case POOL_TREE:
poolp = new LLDrawPoolTree(tex0);
@@ -383,16 +384,6 @@ LLRenderPass::~LLRenderPass()
}
-LLDrawPool* LLRenderPass::instancePool()
-{
-#if LL_RELEASE_FOR_DOWNLOAD
- LL_WARNS() << "Attempting to instance a render pass. Invalid operation." << LL_ENDL;
-#else
- LL_ERRS() << "Attempting to instance a render pass. Invalid operation." << LL_ENDL;
-#endif
- return NULL;
-}
-
void LLRenderPass::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL texture)
{
LLSpatialGroup::drawmap_elem_t& draw_info = group->mDrawMap[type];
@@ -449,7 +440,7 @@ void LLRenderPass::applyModelMatrix(const LLDrawInfo& params)
if (params.mModelMatrix != gGLLastMatrix)
{
gGLLastMatrix = params.mModelMatrix;
- gGL.matrixMode(LLRender::MM_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.loadMatrix(gGLModelView);
if (params.mModelMatrix)
{
diff --git a/indra/newview/lldrawpool.h b/indra/newview/lldrawpool.h
index 4eb9a4151d..cdd0989e20 100644
--- a/indra/newview/lldrawpool.h
+++ b/indra/newview/lldrawpool.h
@@ -60,6 +60,7 @@ public:
POOL_GRASS,
POOL_INVISIBLE, // see below *
POOL_AVATAR,
+ POOL_CONTROL_AV, // Animesh
POOL_VOIDWATER,
POOL_WATER,
POOL_GLOW,
@@ -110,7 +111,6 @@ public:
virtual S32 getShaderLevel() const { return mShaderLevel; }
static LLDrawPool* createPool(const U32 type, LLViewerTexture *tex0 = NULL);
- virtual LLDrawPool *instancePool() = 0; // Create an empty new instance of the pool.
virtual LLViewerTexture* getTexture() = 0;
virtual BOOL isFacePool() { return FALSE; }
virtual void resetDrawOrders() = 0;
@@ -162,7 +162,6 @@ public:
LLRenderPass(const U32 type);
virtual ~LLRenderPass();
- /*virtual*/ LLDrawPool* instancePool();
/*virtual*/ LLViewerTexture* getDebugTexture() { return NULL; }
LLViewerTexture* getTexture() { return NULL; }
BOOL isDead() { return FALSE; }
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 789a254389..f38d336434 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -106,8 +106,8 @@ S32 cube_channel = -1;
static LLTrace::BlockTimerStatHandle FTM_SHADOW_AVATAR("Avatar Shadow");
-LLDrawPoolAvatar::LLDrawPoolAvatar() :
- LLFacePool(POOL_AVATAR)
+LLDrawPoolAvatar::LLDrawPoolAvatar(U32 type) :
+ LLFacePool(type)
{
}
@@ -136,15 +136,6 @@ BOOL LLDrawPoolAvatar::isDead()
}
return TRUE;
}
-
-//-----------------------------------------------------------------------------
-// instancePool()
-//-----------------------------------------------------------------------------
-LLDrawPool *LLDrawPoolAvatar::instancePool()
-{
- return new LLDrawPoolAvatar();
-}
-
S32 LLDrawPoolAvatar::getShaderLevel() const
{
@@ -1810,7 +1801,7 @@ void LLDrawPoolAvatar::getRiggedGeometry(
}
else
{
- face->setPoolType(LLDrawPool::POOL_AVATAR);
+ face->setPoolType(mType); // either POOL_AVATAR or POOL_CONTROL_AV
}
//LL_INFOS() << "Rebuilt face " << face->getTEOffset() << " of " << face->getDrawable() << " at " << gFrameTimeSeconds << LL_ENDL;
@@ -2494,7 +2485,7 @@ LLColor3 LLDrawPoolAvatar::getDebugColor() const
void LLDrawPoolAvatar::addRiggedFace(LLFace* facep, U32 type)
{
llassert (facep->isState(LLFace::RIGGED));
- llassert(getType() == LLDrawPool::POOL_AVATAR);
+ llassert(getType() == LLDrawPool::POOL_AVATAR || getType() == LLDrawPool::POOL_CONTROL_AV);
if (facep->getPool() && facep->getPool() != this)
{
LL_ERRS() << "adding rigged face that's already in another pool" << LL_ENDL;
@@ -2516,7 +2507,7 @@ void LLDrawPoolAvatar::addRiggedFace(LLFace* facep, U32 type)
void LLDrawPoolAvatar::removeRiggedFace(LLFace* facep)
{
llassert (facep->isState(LLFace::RIGGED));
- llassert(getType() == LLDrawPool::POOL_AVATAR);
+ llassert(getType() == LLDrawPool::POOL_AVATAR || getType() == LLDrawPool::POOL_CONTROL_AV);
if (facep->getPool() != this)
{
LL_ERRS() << "Tried to remove a rigged face from the wrong pool" << LL_ENDL;
diff --git a/indra/newview/lldrawpoolavatar.h b/indra/newview/lldrawpoolavatar.h
index cb09eb18e2..92a8538958 100644
--- a/indra/newview/lldrawpoolavatar.h
+++ b/indra/newview/lldrawpoolavatar.h
@@ -178,12 +178,10 @@ typedef enum
virtual S32 getShaderLevel() const;
- LLDrawPoolAvatar();
+ LLDrawPoolAvatar(U32 type);
static LLMatrix4& getModelView();
- /*virtual*/ LLDrawPool *instancePool();
-
/*virtual*/ S32 getNumPasses();
/*virtual*/ void beginRenderPass(S32 pass);
/*virtual*/ void endRenderPass(S32 pass);
diff --git a/indra/newview/lldrawpoolground.cpp b/indra/newview/lldrawpoolground.cpp
index 6bd2631d3b..5b74264dab 100644
--- a/indra/newview/lldrawpoolground.cpp
+++ b/indra/newview/lldrawpoolground.cpp
@@ -46,11 +46,6 @@ LLDrawPoolGround::LLDrawPoolGround() :
{
}
-LLDrawPool *LLDrawPoolGround::instancePool()
-{
- return new LLDrawPoolGround();
-}
-
void LLDrawPoolGround::prerender()
{
mShaderLevel = LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_ENVIRONMENT);
diff --git a/indra/newview/lldrawpoolground.h b/indra/newview/lldrawpoolground.h
index a4f8a3fcf5..15b1dc60a2 100644
--- a/indra/newview/lldrawpoolground.h
+++ b/indra/newview/lldrawpoolground.h
@@ -43,8 +43,6 @@ public:
LLDrawPoolGround();
- /*virtual*/ LLDrawPool *instancePool();
-
/*virtual*/ void prerender();
/*virtual*/ void render(S32 pass = 0);
};
diff --git a/indra/newview/lldrawpoolsky.cpp b/indra/newview/lldrawpoolsky.cpp
index dbe8724088..054e7f32b4 100644
--- a/indra/newview/lldrawpoolsky.cpp
+++ b/indra/newview/lldrawpoolsky.cpp
@@ -48,11 +48,6 @@ LLDrawPoolSky::LLDrawPoolSky()
{
}
-LLDrawPool *LLDrawPoolSky::instancePool()
-{
- return new LLDrawPoolSky();
-}
-
void LLDrawPoolSky::prerender()
{
mShaderLevel = LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_ENVIRONMENT);
diff --git a/indra/newview/lldrawpoolsky.h b/indra/newview/lldrawpoolsky.h
index 916d8c1cbe..d1dcd6b22e 100644
--- a/indra/newview/lldrawpoolsky.h
+++ b/indra/newview/lldrawpoolsky.h
@@ -49,8 +49,6 @@ public:
LLDrawPoolSky();
- /*virtual*/ LLDrawPool *instancePool();
-
/*virtual*/ S32 getNumPostDeferredPasses() { return getNumPasses(); }
/*virtual*/ void beginPostDeferredPass(S32 pass) { beginRenderPass(pass); }
/*virtual*/ void endPostDeferredPass(S32 pass) { endRenderPass(pass); }
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index 33a11631fe..37dc80e2b7 100644
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -87,13 +87,6 @@ LLDrawPoolTerrain::~LLDrawPoolTerrain()
llassert( gPipeline.findPool( getType(), getTexture() ) == NULL );
}
-
-LLDrawPool *LLDrawPoolTerrain::instancePool()
-{
- return new LLDrawPoolTerrain(mTexturep);
-}
-
-
U32 LLDrawPoolTerrain::getVertexDataMask()
{
if (LLPipeline::sShadowRender)
diff --git a/indra/newview/lldrawpoolterrain.h b/indra/newview/lldrawpoolterrain.h
index 04e27d9370..5b4558020d 100644
--- a/indra/newview/lldrawpoolterrain.h
+++ b/indra/newview/lldrawpoolterrain.h
@@ -49,8 +49,6 @@ public:
LLDrawPoolTerrain(LLViewerTexture *texturep);
virtual ~LLDrawPoolTerrain();
- /*virtual*/ LLDrawPool *instancePool();
-
/*virtual*/ S32 getNumDeferredPasses() { return 1; }
/*virtual*/ void beginDeferredPass(S32 pass);
/*virtual*/ void endDeferredPass(S32 pass);
diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp
index b885008cae..0d5195bdbf 100644
--- a/indra/newview/lldrawpooltree.cpp
+++ b/indra/newview/lldrawpooltree.cpp
@@ -51,11 +51,6 @@ LLDrawPoolTree::LLDrawPoolTree(LLViewerTexture *texturep) :
mTexturep->setAddressMode(LLTexUnit::TAM_WRAP);
}
-LLDrawPool *LLDrawPoolTree::instancePool()
-{
- return new LLDrawPoolTree(mTexturep);
-}
-
void LLDrawPoolTree::prerender()
{
mShaderLevel = LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_OBJECT);
diff --git a/indra/newview/lldrawpooltree.h b/indra/newview/lldrawpooltree.h
index 9c1e60f5eb..13f9ec8dce 100644
--- a/indra/newview/lldrawpooltree.h
+++ b/indra/newview/lldrawpooltree.h
@@ -45,8 +45,6 @@ public:
LLDrawPoolTree(LLViewerTexture *texturep);
- /*virtual*/ LLDrawPool *instancePool();
-
/*virtual*/ void prerender();
/*virtual*/ S32 getNumDeferredPasses() { return 1; }
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index 073adfb627..7249f22555 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -104,13 +104,6 @@ void LLDrawPoolWater::restoreGL()
}*/
}
-LLDrawPool *LLDrawPoolWater::instancePool()
-{
- LL_ERRS() << "Should never be calling instancePool on a water pool!" << LL_ENDL;
- return NULL;
-}
-
-
void LLDrawPoolWater::prerender()
{
mShaderLevel = (gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps) ? LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_WATER) : 0;
diff --git a/indra/newview/lldrawpoolwater.h b/indra/newview/lldrawpoolwater.h
index d436557e1c..a5d163e0d7 100644
--- a/indra/newview/lldrawpoolwater.h
+++ b/indra/newview/lldrawpoolwater.h
@@ -61,7 +61,6 @@ public:
LLDrawPoolWater();
/*virtual*/ ~LLDrawPoolWater();
- /*virtual*/ LLDrawPool *instancePool();
static void restoreGL();
/*virtual*/ S32 getNumPostDeferredPasses() { return 0; } //getNumPasses(); }
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index 961d72c62e..fbac523ff0 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -632,11 +632,6 @@ void LLDrawPoolWLSky::prerender()
//LL_INFOS() << "wlsky prerendering pass." << LL_ENDL;
}
-LLDrawPoolWLSky *LLDrawPoolWLSky::instancePool()
-{
- return new LLDrawPoolWLSky();
-}
-
LLViewerTexture* LLDrawPoolWLSky::getTexture()
{
return NULL;
diff --git a/indra/newview/lldrawpoolwlsky.h b/indra/newview/lldrawpoolwlsky.h
index 3acfda4eee..a4f176d6db 100644
--- a/indra/newview/lldrawpoolwlsky.h
+++ b/indra/newview/lldrawpoolwlsky.h
@@ -62,8 +62,6 @@ public:
//static LLDrawPool* createPool(const U32 type, LLViewerTexture *tex0 = NULL);
- // Create an empty new instance of the pool.
- /*virtual*/ LLDrawPoolWLSky *instancePool(); ///< covariant override
/*virtual*/ LLViewerTexture* getTexture();
/*virtual*/ BOOL isFacePool() { return FALSE; }
/*virtual*/ void resetDrawOrders();
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 18ea184da6..3dcac2281b 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -195,7 +195,7 @@ void LLFace::destroy()
if (mDrawPoolp)
{
- if (this->isState(LLFace::RIGGED) && mDrawPoolp->getType() == LLDrawPool::POOL_AVATAR)
+ if (this->isState(LLFace::RIGGED) && (mDrawPoolp->getType() == LLDrawPool::POOL_CONTROL_AV || mDrawPoolp->getType() == LLDrawPool::POOL_AVATAR))
{
((LLDrawPoolAvatar*) mDrawPoolp)->removeRiggedFace(this);
}
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 5742b5ad1a..0059f3541b 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -1027,21 +1027,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
getChildView("maskcutoff")->setEnabled(editable && mIsAlpha);
getChildView("label maskcutoff")->setEnabled(editable && mIsAlpha);
- bool allAttachments = true;
- for (LLObjectSelection::iterator iter = LLSelectMgr::getInstance()->getSelection()->begin();
- iter != LLSelectMgr::getInstance()->getSelection()->end();iter++)
- {
- LLSelectNode* node = *iter;
- LLViewerObject* object = node->getObject();
- if (!object->isAttachment())
- {
- allAttachments = false;
- break;
- }
- }
-
- texture_ctrl->setBakeTextureEnabled(allAttachments);
-
+ texture_ctrl->setBakeTextureEnabled(TRUE);
}
else if (id.isNull())
{
@@ -1066,21 +1052,8 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
getChildView("label alphamode")->setEnabled(editable && mIsAlpha);
getChildView("maskcutoff")->setEnabled(editable && mIsAlpha);
getChildView("label maskcutoff")->setEnabled(editable && mIsAlpha);
-
- bool allAttachments = true;
- for (LLObjectSelection::iterator iter = LLSelectMgr::getInstance()->getSelection()->begin();
- iter != LLSelectMgr::getInstance()->getSelection()->end();iter++)
- {
- LLSelectNode* node = *iter;
- LLViewerObject* object = node->getObject();
- if (!object->isAttachment())
- {
- allAttachments = false;
- break;
- }
- }
-
- texture_ctrl->setBakeTextureEnabled(allAttachments);
+
+ texture_ctrl->setBakeTextureEnabled(TRUE);
}
}
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index c72a0706cd..5a4427a7b7 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -678,8 +678,17 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force)
{
shader->uniform4fv(LLViewerShaderMgr::LIGHTNORM, 1, light_direction.mV);
+ // Legacy? SETTING_CLOUD_SCROLL_RATE("cloud_scroll_rate")
LLVector4 vect_c_p_d1(mSettings[SETTING_CLOUD_POS_DENSITY1]);
- vect_c_p_d1 += LLVector4(LLEnvironment::instance().getCloudScrollDelta());
+ LLVector4 cloud_scroll( LLEnvironment::instance().getCloudScrollDelta() );
+
+ // SL-13084 EEP added support for custom cloud textures -- flip them horizontally to match the preview of Clouds > Cloud Scroll
+ // Keep in Sync!
+ // * indra\newview\llsettingsvo.cpp
+ // * indra\newview\app_settings\shaders\class2\windlight\cloudsV.glsl
+ // * indra\newview\app_settings\shaders\class1\deferred\cloudsV.glsl
+ cloud_scroll[0] = -cloud_scroll[0];
+ vect_c_p_d1 += cloud_scroll;
shader->uniform4fv(LLShaderMgr::CLOUD_POS_DENSITY1, 1, vect_c_p_d1.mV);
LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky();
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 77bbcdada6..a49477cee4 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -556,7 +556,9 @@ void LLSpatialGroup::shift(const LLVector4a &offset)
if (!getSpatialPartition()->mRenderByGroup &&
getSpatialPartition()->mPartitionType != LLViewerRegion::PARTITION_TREE &&
getSpatialPartition()->mPartitionType != LLViewerRegion::PARTITION_TERRAIN &&
- getSpatialPartition()->mPartitionType != LLViewerRegion::PARTITION_BRIDGE)
+ getSpatialPartition()->mPartitionType != LLViewerRegion::PARTITION_BRIDGE &&
+ getSpatialPartition()->mPartitionType != LLViewerRegion::PARTITION_AVATAR &&
+ getSpatialPartition()->mPartitionType != LLViewerRegion::PARTITION_CONTROL_AV)
{
setState(GEOM_DIRTY);
gPipeline.markRebuild(this, TRUE);
diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h
index 7e65da42f7..919f386d29 100644
--- a/indra/newview/llspatialpartition.h
+++ b/indra/newview/llspatialpartition.h
@@ -685,6 +685,18 @@ public:
virtual void addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32& index_count) { LLVolumeGeometryManager::addGeometryCount(group, vertex_count, index_count); }
};
+class LLAvatarBridge : public LLVolumeBridge
+{
+public:
+ LLAvatarBridge(LLDrawable* drawablep, LLViewerRegion* regionp);
+};
+
+class LLControlAVBridge : public LLVolumeBridge
+{
+public:
+ LLControlAVBridge(LLDrawable* drawablep, LLViewerRegion* regionp);
+};
+
class LLHUDBridge : public LLVolumeBridge
{
public:
@@ -702,6 +714,18 @@ public:
virtual void addGeometryCount(LLSpatialGroup* group, U32 &vertex_count, U32& index_count) { }
};
+class LLAvatarPartition : public LLBridgePartition
+{
+public:
+ LLAvatarPartition(LLViewerRegion* regionp);
+};
+
+class LLControlAVPartition : public LLBridgePartition
+{
+public:
+ LLControlAVPartition(LLViewerRegion* regionp);
+};
+
class LLHUDPartition : public LLBridgePartition
{
public:
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 6a0464c657..6ed1704de0 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -431,7 +431,7 @@ BOOL LLFloaterTexturePicker::postBuild()
getChild<LLComboBox>("l_bake_use_texture_combo_box")->setCommitCallback(onBakeTextureSelect, this);
getChild<LLCheckBoxCtrl>("hide_base_mesh_region")->setCommitCallback(onHideBaseMeshRegionCheck, this);
- setBakeTextureEnabled(FALSE);
+ setBakeTextureEnabled(TRUE);
return TRUE;
}
@@ -1156,8 +1156,7 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p)
mImageAssetID(p.image_id),
mDefaultImageAssetID(p.default_image_id),
mDefaultImageName(p.default_image_name),
- mFallbackImage(p.fallback_image),
- mBakeTextureEnabled(FALSE)
+ mFallbackImage(p.fallback_image)
{
// Default of defaults is white image for diff tex
@@ -1350,7 +1349,7 @@ void LLTextureCtrl::showPicker(BOOL take_focus)
}
if (texture_floaterp)
{
- texture_floaterp->setBakeTextureEnabled(mBakeTextureEnabled);
+ texture_floaterp->setBakeTextureEnabled(TRUE);
}
LLFloater* root_floater = gFloaterView->getParentFloater(this);
@@ -1529,7 +1528,6 @@ void LLTextureCtrl::setImageAssetID( const LLUUID& asset_id )
void LLTextureCtrl::setBakeTextureEnabled(BOOL enabled)
{
- mBakeTextureEnabled = enabled;
LLFloaterTexturePicker* floaterp = (LLFloaterTexturePicker*)mFloaterHandle.get();
if (floaterp)
{
diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h
index b2a34a37c4..06e8101177 100644
--- a/indra/newview/lltexturectrl.h
+++ b/indra/newview/lltexturectrl.h
@@ -239,7 +239,6 @@ private:
BOOL mShowLoadingPlaceholder;
std::string mLoadingPlaceholderString;
S32 mLabelWidth;
- BOOL mBakeTextureEnabled;
};
//////////////////////////////////////////////////////////////////////////////////////////
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index f499c34ca4..32f466ee2b 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -671,7 +671,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
else
{
// perform a separate pick that detects transparent objects since they respond to 1-click actions
- LLPickInfo click_action_pick = gViewerWindow->pickImmediate(x, y, TRUE, pick_rigged);
+ LLPickInfo click_action_pick = gViewerWindow->pickImmediate(x, y, FALSE, pick_rigged);
LLViewerObject* click_action_object = click_action_pick.getObject();
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index b6c7be2ed3..e6bd20b58f 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -740,6 +740,10 @@ U32 render_type_from_string(std::string render_type)
{
return LLPipeline::RENDER_TYPE_AVATAR;
}
+ else if ("controlAV" == render_type) // Animesh
+ {
+ return LLPipeline::RENDER_TYPE_CONTROL_AV;
+ }
else if ("surfacePatch" == render_type)
{
return LLPipeline::RENDER_TYPE_TERRAIN;
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index fe3e4cdd61..8c4b359754 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -284,6 +284,7 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe
mOnActiveList(FALSE),
mOnMap(FALSE),
mStatic(FALSE),
+ mSeatCount(0),
mNumFaces(0),
mRotTime(0.f),
mAngularVelocityRot(),
@@ -895,7 +896,12 @@ void LLViewerObject::addChild(LLViewerObject *childp)
if(childp->setParent(this))
{
mChildList.push_back(childp);
- childp->afterReparent();
+ childp->afterReparent();
+
+ if (childp->isAvatar())
+ {
+ mSeatCount++;
+ }
}
}
@@ -924,6 +930,11 @@ void LLViewerObject::removeChild(LLViewerObject *childp)
{
childp->setParent(NULL);
}
+
+ if (childp->isAvatar())
+ {
+ mSeatCount--;
+ }
break;
}
}
@@ -981,21 +992,10 @@ BOOL LLViewerObject::isChild(LLViewerObject *childp) const
return FALSE;
}
-
// returns TRUE if at least one avatar is sitting on this object
BOOL LLViewerObject::isSeat() const
{
- for (child_list_t::const_iterator iter = mChildList.begin();
- iter != mChildList.end(); iter++)
- {
- LLViewerObject* child = *iter;
- if (child->isAvatar())
- {
- return TRUE;
- }
- }
- return FALSE;
-
+ return mSeatCount > 0;
}
BOOL LLViewerObject::setDrawableParent(LLDrawable* parentp)
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 03c5403a1e..12a9b47307 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -832,6 +832,7 @@ protected:
BOOL mOnActiveList;
BOOL mOnMap; // On the map.
BOOL mStatic; // Object doesn't move.
+ S32 mSeatCount;
S32 mNumFaces;
F32 mRotTime; // Amount (in seconds) that object has rotated according to angular velocity (llSetTargetOmega)
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index e67826454b..d56408939e 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -609,6 +609,8 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
mImpl->mObjectPartition.push_back(new LLGrassPartition(this)); //PARTITION_GRASS
mImpl->mObjectPartition.push_back(new LLVolumePartition(this)); //PARTITION_VOLUME
mImpl->mObjectPartition.push_back(new LLBridgePartition(this)); //PARTITION_BRIDGE
+ mImpl->mObjectPartition.push_back(new LLAvatarPartition(this)); //PARTITION_AVATAR
+ mImpl->mObjectPartition.push_back(new LLControlAVPartition(this)); //PARTITION_CONTROL_AV
mImpl->mObjectPartition.push_back(new LLHUDParticlePartition(this));//PARTITION_HUD_PARTICLE
mImpl->mObjectPartition.push_back(new LLVOCachePartition(this)); //PARTITION_VO_CACHE
mImpl->mObjectPartition.push_back(NULL); //PARTITION_NONE
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index 1b226ac2c6..f7c50e4de5 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -86,6 +86,8 @@ public:
PARTITION_GRASS,
PARTITION_VOLUME,
PARTITION_BRIDGE,
+ PARTITION_AVATAR,
+ PARTITION_CONTROL_AV, // Animesh
PARTITION_HUD_PARTICLE,
PARTITION_VO_CACHE,
PARTITION_NONE,
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index 85d87a43af..04172adde9 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -55,7 +55,6 @@
#include "llviewerregion.h"
#include "llvoavatar.h"
#include "llvoavatarself.h"
-#include "llviewerwindow.h" // *TODO: remove, only used for width/height
#include "llworld.h"
#include "llfeaturemanager.h"
#include "llviewernetwork.h"
@@ -582,21 +581,38 @@ void send_stats()
// If the current revision is recent, ping the previous author before overriding
LLSD &misc = body["stats"]["misc"];
- // Screen size so the UI team can figure out how big the widgets
- // appear and use a "typical" size for end user tests.
-
- S32 window_width = gViewerWindow->getWindowWidthRaw();
- S32 window_height = gViewerWindow->getWindowHeightRaw();
- S32 window_size = (window_width * window_height) / 1024;
- misc["string_1"] = llformat("%d", window_size);
- misc["string_2"] = llformat("Texture Time: %.2f, Total Time: %.2f", gTextureTimer.getElapsedTimeF32(), gFrameTimeSeconds.value());
-
- F32 unbaked_time = LLVOAvatar::sUnbakedTime * 1000.f / gFrameTimeSeconds;
- misc["int_1"] = LLSD::Integer(unbaked_time); // Steve: 1.22
- F32 grey_time = LLVOAvatar::sGreyTime * 1000.f / gFrameTimeSeconds;
- misc["int_2"] = LLSD::Integer(grey_time); // Steve: 1.22
-
- LL_INFOS() << "Misc Stats: int_1: " << misc["int_1"] << " int_2: " << misc["int_2"] << LL_ENDL;
+#ifdef LL_WINDOWS
+ // Probe for Vulkan capability (Dave Houlton 05/2020)
+ //
+ // Check for presense of a Vulkan loader dll, as a proxy for a Vulkan-capable gpu.
+ // False-positives and false-negatives are possible, but unlikely. We'll get a good
+ // approximation of Vulkan capability within current user systems from this. More
+ // detailed information on versions and extensions can come later.
+ static bool vulkan_oneshot = false;
+ static bool vulkan_detected = false;
+
+ if (!vulkan_oneshot)
+ {
+ HMODULE vulkan_loader = LoadLibraryExA("vulkan-1.dll", NULL, LOAD_LIBRARY_AS_DATAFILE);
+ if (NULL != vulkan_loader)
+ {
+ vulkan_detected = true;
+ FreeLibrary(vulkan_loader);
+ }
+ vulkan_oneshot = true;
+ }
+
+ misc["string_1"] = vulkan_detected ? llformat("Vulkan driver is detected") : llformat("No Vulkan driver detected");
+
+#else
+ misc["string_1"] = llformat("Unused");
+#endif // LL_WINDOWS
+
+ misc["string_2"] = llformat("Unused");
+ misc["int_1"] = LLSD::Integer(0);
+ misc["int_2"] = LLSD::Integer(0);
+
+ LL_INFOS() << "Misc Stats: int_1: " << misc["int_1"] << " int_2: " << misc["int_2"] << LL_ENDL;
LL_INFOS() << "Misc Stats: string_1: " << misc["string_1"] << " string_2: " << misc["string_2"] << LL_ENDL;
body["DisplayNamesEnabled"] = gSavedSettings.getBOOL("UseDisplayNames");
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index d567623ac0..12d62bc99f 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2414,6 +2414,7 @@ S32 LLVOAvatar::setTETexture(const U8 te, const LLUUID& uuid)
}
static LLTrace::BlockTimerStatHandle FTM_AVATAR_UPDATE("Avatar Update");
+static LLTrace::BlockTimerStatHandle FTM_AVATAR_UPDATE_COMPLEXITY("Avatar Update Complexity");
static LLTrace::BlockTimerStatHandle FTM_JOINT_UPDATE("Update Joints");
//------------------------------------------------------------------------
@@ -2456,14 +2457,13 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
return;
}
- if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_AVATAR))
+ if (!(gPipeline.hasRenderType(mIsControlAvatar ? LLPipeline::RENDER_TYPE_CONTROL_AV : LLPipeline::RENDER_TYPE_AVATAR))
&& !(gSavedSettings.getBOOL("DisableAllRenderTypes")) && !isSelf())
{
return;
}
// Update should be happening max once per frame.
- const S32 upd_freq = 4; // force update every upd_freq frames.
if ((mLastAnimExtents[0]==LLVector3())||
(mLastAnimExtents[1])==LLVector3())
{
@@ -2471,6 +2471,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
}
else
{
+ const S32 upd_freq = 4; // force update every upd_freq frames.
mNeedsExtentUpdate = ((LLDrawable::getCurrentFrame()+mID.mData[0])%upd_freq==0);
}
@@ -2555,7 +2556,40 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
}
idleUpdateNameTag( mLastRootPos );
- idleUpdateRenderComplexity();
+
+ // Complexity has stale mechanics, but updates still can be very rapid
+ // so spread avatar complexity calculations over frames to lesen load from
+ // rapid updates and to make sure all avatars are not calculated at once.
+ S32 compl_upd_freq = 20;
+ if (isControlAvatar())
+ {
+ // animeshes do not (or won't) have impostors nor change outfis,
+ // no need for high frequency
+ compl_upd_freq = 100;
+ }
+ else if (mLastRezzedStatus <= 0) //cloud or init
+ {
+ compl_upd_freq = 60;
+ }
+ else if (isSelf())
+ {
+ compl_upd_freq = 5;
+ }
+ else if (mLastRezzedStatus == 1) //'grey', not fully loaded
+ {
+ compl_upd_freq = 40;
+ }
+ else if (isInMuteList()) //cheap, buffers value from search
+ {
+ compl_upd_freq = 100;
+ }
+
+ if ((LLFrameTimer::getFrameCount() + mID.mData[0]) % compl_upd_freq == 0)
+ {
+ LL_RECORD_BLOCK_TIME(FTM_AVATAR_UPDATE_COMPLEXITY);
+ idleUpdateRenderComplexity();
+ }
+ idleUpdateDebugInfo();
}
void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
@@ -2866,7 +2900,10 @@ F32 LLVOAvatar::calcMorphAmount()
void LLVOAvatar::idleUpdateLipSync(bool voice_enabled)
{
// Use the Lipsync_Ooh and Lipsync_Aah morphs for lip sync
- if ( voice_enabled && (LLVoiceClient::getInstance()->lipSyncEnabled()) && LLVoiceClient::getInstance()->getIsSpeaking( mID ) )
+ if ( voice_enabled
+ && mLastRezzedStatus > 0 // no point updating lip-sync for clouds
+ && (LLVoiceClient::getInstance()->lipSyncEnabled())
+ && LLVoiceClient::getInstance()->getIsSpeaking( mID ) )
{
F32 ooh_morph_amount = 0.0f;
F32 aah_morph_amount = 0.0f;
@@ -3900,6 +3937,11 @@ void LLVOAvatar::computeUpdatePeriod()
{ //background avatars are REALLY slow updating impostors
mUpdatePeriod = 16;
}
+ else if (mLastRezzedStatus <= 0)
+ {
+ // Don't update cloud avatars too often
+ mUpdatePeriod = 8;
+ }
else if ( shouldImpostor(3) )
{ //back 25% of max visible avatars are slow updating impostors
mUpdatePeriod = 8;
@@ -4286,15 +4328,15 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
// Set mUpdatePeriod and visible based on distance and other criteria.
//--------------------------------------------------------------------
computeUpdatePeriod();
- visible = (LLDrawable::getCurrentFrame()+mID.mData[0])%mUpdatePeriod == 0 ? TRUE : FALSE;
+ bool needs_update = (LLDrawable::getCurrentFrame()+mID.mData[0])%mUpdatePeriod == 0 ? TRUE : FALSE;
//--------------------------------------------------------------------
- // Early out if not visible and not self
+ // Early out if does not need update and not self
// don't early out for your own avatar, as we rely on your animations playing reliably
// for example, the "turn around" animation when entering customize avatar needs to trigger
// even when your avatar is offscreen
//--------------------------------------------------------------------
- if (!visible && !isSelf())
+ if (!needs_update && !isSelf())
{
updateMotions(LLCharacter::HIDDEN_UPDATE);
return FALSE;
@@ -4343,12 +4385,17 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
mSpeed = speed;
// update animations
- if (mSpecialRenderMode == 1) // Animation Preview
+ if (!visible)
+ {
+ updateMotions(LLCharacter::HIDDEN_UPDATE);
+ }
+ else if (mSpecialRenderMode == 1) // Animation Preview
{
updateMotions(LLCharacter::FORCE_UPDATE);
}
else
{
+ // Might be better to do HIDDEN_UPDATE if cloud
updateMotions(LLCharacter::NORMAL_UPDATE);
}
@@ -4376,10 +4423,13 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
// Update child joints as needed.
mRoot->updateWorldMatrixChildren();
- // System avatar mesh vertices need to be reskinned.
- mNeedsSkin = TRUE;
+ if (visible)
+ {
+ // System avatar mesh vertices need to be reskinned.
+ mNeedsSkin = TRUE;
+ }
- return TRUE;
+ return visible;
}
//-----------------------------------------------------------------------------
@@ -6834,13 +6884,13 @@ LLDrawable *LLVOAvatar::createDrawable(LLPipeline *pipeline)
pipeline->allocDrawable(this);
mDrawable->setLit(FALSE);
- LLDrawPoolAvatar *poolp = (LLDrawPoolAvatar*) gPipeline.getPool(LLDrawPool::POOL_AVATAR);
+ LLDrawPoolAvatar *poolp = (LLDrawPoolAvatar*)gPipeline.getPool(mIsControlAvatar ? LLDrawPool::POOL_CONTROL_AV : LLDrawPool::POOL_AVATAR);
// Only a single face (one per avatar)
//this face will be splitted into several if its vertex buffer is too long.
mDrawable->setState(LLDrawable::ACTIVE);
mDrawable->addFace(poolp, NULL);
- mDrawable->setRenderType(LLPipeline::RENDER_TYPE_AVATAR);
+ mDrawable->setRenderType(mIsControlAvatar ? LLPipeline::RENDER_TYPE_CONTROL_AV : LLPipeline::RENDER_TYPE_AVATAR);
mNumInitFaces = mDrawable->getNumFaces() ;
@@ -6865,7 +6915,7 @@ static LLTrace::BlockTimerStatHandle FTM_UPDATE_AVATAR("Update Avatar");
BOOL LLVOAvatar::updateGeometry(LLDrawable *drawable)
{
LL_RECORD_BLOCK_TIME(FTM_UPDATE_AVATAR);
- if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_AVATAR)))
+ if (!(gPipeline.hasRenderType(mIsControlAvatar ? LLPipeline::RENDER_TYPE_CONTROL_AV : LLPipeline::RENDER_TYPE_AVATAR)))
{
return TRUE;
}
@@ -10021,7 +10071,7 @@ void LLVOAvatar::onActiveOverrideMeshesChanged()
U32 LLVOAvatar::getPartitionType() const
{
// Avatars merely exist as drawables in the bridge partition
- return LLViewerRegion::PARTITION_BRIDGE;
+ return mIsControlAvatar ? LLViewerRegion::PARTITION_CONTROL_AV : LLViewerRegion::PARTITION_AVATAR;
}
//static
@@ -10142,7 +10192,10 @@ void LLVOAvatar::idleUpdateRenderComplexity()
// Render Complexity
calculateUpdateRenderComplexity(); // Update mVisualComplexity if needed
+}
+void LLVOAvatar::idleUpdateDebugInfo()
+{
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_AVATAR_DRAW_INFO))
{
std::string info_line;
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index ca6ac5c902..4e728ac959 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -286,6 +286,7 @@ public:
static void invalidateNameTags();
void addNameTagLine(const std::string& line, const LLColor4& color, S32 style, const LLFontGL* font);
void idleUpdateRenderComplexity();
+ void idleUpdateDebugInfo();
void accountRenderComplexityForObject(const LLViewerObject *attached_object,
const F32 max_attachment_complexity,
LLVOVolume::texture_cost_t& textures,
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 16b27fd144..aea12380e8 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -2667,11 +2667,6 @@ void LLVOAvatarSelf::onCustomizeStart(bool disable_camera_switch)
{
gAgentCamera.changeCameraToCustomizeAvatar();
}
-
-#if 0
- gAgentAvatarp->clearVisualParamWeights();
- gAgentAvatarp->idleUpdateAppearanceAnimation();
-#endif
gAgentAvatarp->invalidateAll(); // mark all bakes as dirty, request updates
gAgentAvatarp->updateMeshTextures(); // make sure correct textures are applied to the avatar mesh.
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 2ffd462ac3..5487b8bdde 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -4889,6 +4889,14 @@ U32 LLVOVolume::getPartitionType() const
{
return LLViewerRegion::PARTITION_HUD;
}
+ if (isAnimatedObject() && getControlAvatar())
+ {
+ return LLViewerRegion::PARTITION_CONTROL_AV;
+ }
+ if (isAttachment())
+ {
+ return LLViewerRegion::PARTITION_AVATAR;
+ }
return LLViewerRegion::PARTITION_VOLUME;
}
@@ -4919,6 +4927,20 @@ LLVolumeGeometryManager()
mSlopRatio = 0.25f;
}
+LLAvatarBridge::LLAvatarBridge(LLDrawable* drawablep, LLViewerRegion* regionp)
+ : LLVolumeBridge(drawablep, regionp)
+{
+ mDrawableType = LLPipeline::RENDER_TYPE_AVATAR;
+ mPartitionType = LLViewerRegion::PARTITION_AVATAR;
+}
+
+LLControlAVBridge::LLControlAVBridge(LLDrawable* drawablep, LLViewerRegion* regionp)
+ : LLVolumeBridge(drawablep, regionp)
+{
+ mDrawableType = LLPipeline::RENDER_TYPE_CONTROL_AV;
+ mPartitionType = LLViewerRegion::PARTITION_CONTROL_AV;
+}
+
bool can_batch_texture(LLFace* facep)
{
if (facep->getTextureEntry()->getBumpmap())
@@ -5263,7 +5285,8 @@ static LLDrawPoolAvatar* get_avatar_drawpool(LLViewerObject* vobj)
LLDrawPool* drawpool = face->getPool();
if (drawpool)
{
- if (drawpool->getType() == LLDrawPool::POOL_AVATAR)
+ if (drawpool->getType() == LLDrawPool::POOL_AVATAR
+ || drawpool->getType() == LLDrawPool::POOL_CONTROL_AV)
{
return (LLDrawPoolAvatar*) drawpool;
}
@@ -5542,7 +5565,8 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
//remove face from old pool if it exists
LLDrawPool* old_pool = facep->getPool();
- if (old_pool && old_pool->getType() == LLDrawPool::POOL_AVATAR)
+ if (old_pool
+ && (old_pool->getType() == LLDrawPool::POOL_AVATAR || old_pool->getType() == LLDrawPool::POOL_CONTROL_AV))
{
((LLDrawPoolAvatar*) old_pool)->removeRiggedFace(facep);
}
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 01438bfb9f..f3b8ad9008 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -1609,6 +1609,7 @@ LLDrawPool *LLPipeline::findPool(const U32 type, LLViewerTexture *tex0)
break;
case LLDrawPool::POOL_AVATAR:
+ case LLDrawPool::POOL_CONTROL_AV:
break; // Do nothing
case LLDrawPool::POOL_SKY:
@@ -1995,7 +1996,7 @@ void LLPipeline::updateMovedList(LLDrawable::drawable_vector_t& moved_list)
drawablep->clearState(LLDrawable::EARLY_MOVE | LLDrawable::MOVE_UNDAMPED);
if (done)
{
- if (drawablep->isRoot())
+ if (drawablep->isRoot() && !drawablep->isState(LLDrawable::ACTIVE))
{
drawablep->makeStatic();
}
@@ -3362,6 +3363,7 @@ static LLTrace::BlockTimerStatHandle FTM_RESET_DRAWORDER("Reset Draw Order");
void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
{
if (hasAnyRenderType(LLPipeline::RENDER_TYPE_AVATAR,
+ LLPipeline::RENDER_TYPE_CONTROL_AV,
LLPipeline::RENDER_TYPE_GROUND,
LLPipeline::RENDER_TYPE_TERRAIN,
LLPipeline::RENDER_TYPE_TREE,
@@ -5774,6 +5776,7 @@ void LLPipeline::addToQuickLookup( LLDrawPool* new_poolp )
break;
case LLDrawPool::POOL_AVATAR:
+ case LLDrawPool::POOL_CONTROL_AV:
break; // Do nothing
case LLDrawPool::POOL_SKY:
@@ -5922,6 +5925,7 @@ void LLPipeline::removeFromQuickLookup( LLDrawPool* poolp )
break;
case LLDrawPool::POOL_AVATAR:
+ case LLDrawPool::POOL_CONTROL_AV:
break; // Do nothing
case LLDrawPool::POOL_SKY:
@@ -7151,7 +7155,8 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start,
for (U32 j = 0; j < LLViewerRegion::NUM_PARTITIONS; j++)
{
if ((j == LLViewerRegion::PARTITION_VOLUME) ||
- (j == LLViewerRegion::PARTITION_BRIDGE) ||
+ (j == LLViewerRegion::PARTITION_BRIDGE) ||
+ (j == LLViewerRegion::PARTITION_CONTROL_AV) ||
(j == LLViewerRegion::PARTITION_TERRAIN) ||
(j == LLViewerRegion::PARTITION_TREE) ||
(j == LLViewerRegion::PARTITION_GRASS)) // only check these partitions for now
@@ -7213,7 +7218,7 @@ LLViewerObject* LLPipeline::lineSegmentIntersectInWorld(const LLVector4a& start,
{
LLViewerRegion* region = *iter;
- LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_BRIDGE);
+ LLSpatialPartition* part = region->getSpatialPartition(LLViewerRegion::PARTITION_AVATAR);
if (part && hasRenderType(part->mDrawableType))
{
LLDrawable* hit = part->lineSegmentIntersect(start, local_end, pick_transparent, pick_rigged, face_hit, &position, tex_coord, normal, tangent);
@@ -9048,6 +9053,7 @@ void LLPipeline::renderDeferredLighting(LLRenderTarget* screen_target)
LLPipeline::RENDER_TYPE_PASS_INVISIBLE,
LLPipeline::RENDER_TYPE_PASS_INVISI_SHINY,
LLPipeline::RENDER_TYPE_AVATAR,
+ LLPipeline::RENDER_TYPE_CONTROL_AV,
LLPipeline::RENDER_TYPE_ALPHA_MASK,
LLPipeline::RENDER_TYPE_FULLBRIGHT_ALPHA_MASK,
END_RENDER_TYPES);
@@ -9401,7 +9407,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
clearRenderTypeMask(LLPipeline::RENDER_TYPE_PARTICLES, END_RENDER_TYPES);
if (detail < 3)
{
- clearRenderTypeMask(LLPipeline::RENDER_TYPE_AVATAR, END_RENDER_TYPES);
+ clearRenderTypeMask(LLPipeline::RENDER_TYPE_AVATAR, LLPipeline::RENDER_TYPE_CONTROL_AV, END_RENDER_TYPES);
if (detail < 2)
{
clearRenderTypeMask(LLPipeline::RENDER_TYPE_VOLUME, END_RENDER_TYPES);
@@ -10116,6 +10122,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
LLPipeline::RENDER_TYPE_BUMP,
LLPipeline::RENDER_TYPE_VOLUME,
LLPipeline::RENDER_TYPE_AVATAR,
+ LLPipeline::RENDER_TYPE_CONTROL_AV,
LLPipeline::RENDER_TYPE_TREE,
LLPipeline::RENDER_TYPE_TERRAIN,
LLPipeline::RENDER_TYPE_WATER,
@@ -10909,7 +10916,9 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
if (visually_muted || too_complex)
{
- andRenderTypeMask(LLPipeline::RENDER_TYPE_AVATAR, END_RENDER_TYPES);
+ andRenderTypeMask(LLPipeline::RENDER_TYPE_AVATAR,
+ LLPipeline::RENDER_TYPE_CONTROL_AV,
+ END_RENDER_TYPES);
}
else
{
@@ -10932,6 +10941,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
LLPipeline::RENDER_TYPE_PASS_INVISIBLE,
LLPipeline::RENDER_TYPE_PASS_INVISI_SHINY,
LLPipeline::RENDER_TYPE_AVATAR,
+ LLPipeline::RENDER_TYPE_CONTROL_AV,
LLPipeline::RENDER_TYPE_ALPHA_MASK,
LLPipeline::RENDER_TYPE_FULLBRIGHT_ALPHA_MASK,
LLPipeline::RENDER_TYPE_INVISIBLE,
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 68ce3fe88d..5a07bdebe3 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -453,6 +453,7 @@ public:
RENDER_TYPE_BUMP = LLDrawPool::POOL_BUMP,
RENDER_TYPE_MATERIALS = LLDrawPool::POOL_MATERIALS,
RENDER_TYPE_AVATAR = LLDrawPool::POOL_AVATAR,
+ RENDER_TYPE_CONTROL_AV = LLDrawPool::POOL_CONTROL_AV, // Animesh
RENDER_TYPE_TREE = LLDrawPool::POOL_TREE,
RENDER_TYPE_INVISIBLE = LLDrawPool::POOL_INVISIBLE,
RENDER_TYPE_VOIDWATER = LLDrawPool::POOL_VOIDWATER,
diff --git a/indra/newview/skins/default/textures/windows/login_sl_logo.png b/indra/newview/skins/default/textures/windows/login_sl_logo.png
index 9810d00237..1eede80c83 100644
--- a/indra/newview/skins/default/textures/windows/login_sl_logo.png
+++ b/indra/newview/skins/default/textures/windows/login_sl_logo.png
Binary files differ
diff --git a/indra/newview/skins/default/textures/windows/login_sl_logo_small.png b/indra/newview/skins/default/textures/windows/login_sl_logo_small.png
index 0a245442d5..c5933001f0 100644
--- a/indra/newview/skins/default/textures/windows/login_sl_logo_small.png
+++ b/indra/newview/skins/default/textures/windows/login_sl_logo_small.png
Binary files differ
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 873b95926b..5fa1847d1b 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -1733,6 +1733,16 @@ function="World.EnvPreset"
parameter="character" />
</menu_item_check>
<menu_item_check
+ label="Animeshes"
+ name="Rendering Type Control Avatar">
+ <menu_item_check.on_check
+ function="Advanced.CheckRenderType"
+ parameter="controlAV" />
+ <menu_item_check.on_click
+ function="Advanced.ToggleRenderType"
+ parameter="controlAV" />
+ </menu_item_check>
+ <menu_item_check
label="Surface Patch"
name="Rendering Type Surface Patch"
shortcut="control|alt|shift|5">