summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-07-03 10:04:05 -0700
committerGraham Linden <graham@lindenlab.com>2019-07-03 10:04:05 -0700
commit48f169423ba0c1da8ffe13fc8bc4cec76336d8fc (patch)
treeb98913a1c97fa68a5e7d892839c01b1db34c4e15 /indra
parent7e5000bb64ca8eea3fe188ebb7bccff3bdfa82e7 (diff)
SL-11545, SL-11543, SL-10625
Fix emissives without normal maps clobbering the alpha output in materialF. Modify glow size calc to get close to pre-EEP sun glow behavior (may require sky vert settings >= mid). Make bake ignore alpha readback for Intel until we can determine why their drivers now go boom.
Diffstat (limited to 'indra')
-rw-r--r--indra/llappearance/lltexlayer.cpp8
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/materialF.glsl14
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/skyV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/terrainWaterV.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/skyF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class2/windlight/skyV.glsl2
7 files changed, 17 insertions, 21 deletions
diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp
index 22b3364559..645274a990 100644
--- a/indra/llappearance/lltexlayer.cpp
+++ b/indra/llappearance/lltexlayer.cpp
@@ -1065,7 +1065,7 @@ LLTexLayer::~LLTexLayer()
iter != mAlphaCache.end(); iter++ )
{
U8* alpha_data = iter->second;
- delete [] alpha_data;
+ ll_aligned_free_32(alpha_data);
}
}
@@ -1572,7 +1572,7 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
{
alpha_cache_t::iterator iter2 = mAlphaCache.begin(); // arbitrarily grab the first entry
alpha_data = iter2->second;
- delete [] alpha_data;
+ ll_aligned_free_32(alpha_data);
mAlphaCache.erase(iter2);
}
@@ -1588,7 +1588,9 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
mAlphaCache[cache_index] = alpha_data;
bool skip_readback = LLRender::sNsightDebugSupport; // nSight doesn't support use of glReadPixels
- // || gGLManager.mIsIntel; SL-10625?
+
+ // SL-10625 and neither does Intel in many cases
+ skip_readback = skip_readback || gGLManager.mIsIntel;
if (!skip_readback)
{
diff --git a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
index a82af996a1..a8cac3e5a9 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/materialF.glsl
@@ -273,15 +273,11 @@ void main()
vec2 abnormal = encode_normal(norm.xyz);
vec4 final_color = diffuse_linear;
-
-#if (DIFFUSE_ALPHA_MODE != DIFFUSE_ALPHA_MODE_EMISSIVE)
- final_color.a = emissive_brightness;
-#else
- final_color.a = max(final_color.a, emissive_brightness);
-#endif
-#if !defined(HAS_NORMAL_MAP)
- final_color.a = 0.0f;
+#if (DIFFUSE_ALPHA_MODE == DIFFUSE_ALPHA_MODE_EMISSIVE)
+ // nop, use content of alpha emissive mask as is...
+#else
+ final_color.a = emissive_brightness;
#endif
vec4 final_specular = spec;
@@ -459,6 +455,8 @@ vec3 post_atmo = color.rgb;
#else
// deferred path
+
+final_color = diffuse_linear;
frag_data[0] = final_color;
frag_data[1] = final_specular; // XYZ = Specular color. W = Specular exponent.
frag_data[2] = final_normal; // XY = Normal. Z = Env. intensity.
diff --git a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl
index 5ce246a114..c3b046552c 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/skyV.glsl
@@ -121,7 +121,7 @@ void main()
// temp2.x is 0 at the sun and increases away from sun
temp2.x = max(temp2.x, .001);
// Set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot)
- temp2.x *= glow.x;
+ temp2.x *= glow.x * 0.33333;
// Higher glow.x gives dimmer glow (because next step is 1 / "angle")
temp2.x = pow(temp2.x, glow.z);
// glow.z should be negative, so we're doing a sort of (1 / "angle") function
diff --git a/indra/newview/app_settings/shaders/class1/environment/terrainWaterV.glsl b/indra/newview/app_settings/shaders/class1/environment/terrainWaterV.glsl
index 416d406f68..a075cfeef2 100644
--- a/indra/newview/app_settings/shaders/class1/environment/terrainWaterV.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/terrainWaterV.glsl
@@ -70,10 +70,6 @@ void main()
vec4 color = calcLighting(pos.xyz, norm, vec4(1.0));
-#if defined(ALM)
- color.rgb *= 0.5f;
-#endif
-
vertex_color.rgb = color.rgb;
// Transform and pass tex coords
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl
index deda4d8b7e..786a65df0f 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsFuncs.glsl
@@ -68,7 +68,7 @@ void calcAtmosphericVars(vec3 inPositionEye, float ambFactor, out vec3 sunlit, o
vec4 light_atten;
float dens_mul = density_multiplier;
- float dist_mul = max(0.05, distance_multiplier);
+ float dist_mul = distance_multiplier;
//sunlight attenuation effect (hue and brightness) due to atmosphere
//this is used later for sunlight modulation at various altitudes
@@ -107,9 +107,9 @@ void calcAtmosphericVars(vec3 inPositionEye, float ambFactor, out vec3 sunlit, o
//temp2.x is 0 at the sun and increases away from sun
temp2.x = max(temp2.x, .001); //was glow.y
//set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot)
- temp2.x *= glow.x * 1.8;
+ temp2.x *= glow.x;
//higher glow.x gives dimmer glow (because next step is 1 / "angle")
- temp2.x = pow(temp2.x, glow.z * 0.2);
+ temp2.x = pow(temp2.x, glow.z);
//glow.z should be negative, so we're doing a sort of (1 / "angle") function
//add "minimum anti-solar illumination"
diff --git a/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl b/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl
index b826cff304..e3e58dd046 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/skyF.glsl
@@ -148,7 +148,7 @@ void main()
// temp2.x is 0 at the sun and increases away from sun
temp2.x = max(temp2.x, .001);
// Set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot)
- temp2.x *= glow.x;
+ temp2.x *= glow.x * 0.33333;
// Higher glow.x gives dimmer glow (because next step is 1 / "angle")
temp2.x = pow(temp2.x, glow.z);
// glow.z should be negative, so we're doing a sort of (1 / "angle") function
diff --git a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl
index d81a8feb96..57ad8a92e5 100644
--- a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl
+++ b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl
@@ -119,7 +119,7 @@ void main()
// temp2.x is 0 at the sun and increases away from sun
temp2.x = max(temp2.x, .001);
// Set a minimum "angle" (smaller glow.y allows tighter, brighter hotspot)
- temp2.x *= glow.x;
+ temp2.x *= glow.x * 0.333333;
// Higher glow.x gives dimmer glow (because next step is 1 / "angle")
temp2.x = pow(temp2.x, glow.z);
// glow.z should be negative, so we're doing a sort of (1 / "angle") function