summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-02-28 14:06:19 -0800
committerGraham Linden <graham@lindenlab.com>2019-02-28 14:06:19 -0800
commitc1d2416826406631807f153e7de9d2b790b0caa5 (patch)
treee5092c0a9e6ff778d74cb13af44d9c61325fe20f /indra/newview/app_settings/shaders/class1
parentd7ad30a2d4dfd83f93b0150464214f2df776eb9c (diff)
EEP performance WIP
Mods to improve alpha obj render performance. Removes hacky fix for HUD elements getting atmospherics. Re-orders rendering of glow to remove ~10ms/frame of shader re-re-rebinding. Fix up default classes and basic shader loading (remove unused shared modules).
Diffstat (limited to 'indra/newview/app_settings/shaders/class1')
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl7
-rw-r--r--indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl7
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl1
-rw-r--r--indra/newview/app_settings/shaders/class1/windlight/transportF.glsl2
6 files changed, 14 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl
index c4caed4d71..767fad016c 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl
@@ -38,5 +38,12 @@ mat4 getSkinnedTransform()
ret[1] = mix(matrixPalette[i+15],matrixPalette[i+16], x);
ret[2] = mix(matrixPalette[i+30],matrixPalette[i+31], x);
ret[3] = vec4(0,0,0,1);
+
return ret;
+
+#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 = matrixPalette[0];
+ vec4 dummy2 = matrixPalette[44];
+#endif
}
diff --git a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
index 94de2f7b53..90bf2851c9 100644
--- a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
@@ -61,5 +61,12 @@ mat4 getObjectSkinnedTransform()
ret[3] = vec4(trans, 1.0);
return ret;
+
+#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.
+ mat3x4 dummy1 = matrixPalette[0];
+ mat3x4 dummy2 = matrixPalette[MAX_JOINTS_PER_MESH_OBJECT-1];
+#endif
+
}
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersF.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersF.glsl
index 10407eeb02..3572331d74 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersF.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersF.glsl
@@ -25,11 +25,9 @@
uniform vec4 sunlight_color;
uniform vec4 light_ambient;
-uniform int no_atmo;
vec3 atmosAmbient(vec3 light)
{
- if (no_atmo == 1) return light + vec3(0.66);
return light + light_ambient.rgb;
}
diff --git a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl
index 14034bccae..7e4855b7c6 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/atmosphericsHelpersV.glsl
@@ -25,11 +25,9 @@
uniform vec4 sunlight_color;
uniform vec4 light_ambient;
-uniform int no_atmo;
vec3 atmosAmbient(vec3 light)
{
- if (no_atmo == 1) return light + vec3(0.66);
return light + light_ambient.rgb;
}
diff --git a/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl b/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl
index 667301443a..9917ba8d3b 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/gammaF.glsl
@@ -23,7 +23,6 @@
* $/LicenseInfo$
*/
-uniform int no_atmo;
uniform vec4 gamma;
vec3 scaleSoftClipFrag(vec3 light)
diff --git a/indra/newview/app_settings/shaders/class1/windlight/transportF.glsl b/indra/newview/app_settings/shaders/class1/windlight/transportF.glsl
index e2b391cb7a..f61194db6d 100644
--- a/indra/newview/app_settings/shaders/class1/windlight/transportF.glsl
+++ b/indra/newview/app_settings/shaders/class1/windlight/transportF.glsl
@@ -23,8 +23,6 @@
* $/LicenseInfo$
*/
-uniform int no_atmo;
-
vec3 atmosTransportFrag(vec3 light, vec3 additive, vec3 atten)
{
/* stub function for fallback compatibility on class1 hardware */