summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2014-10-14 11:22:39 -0400
committerOz Linden <oz@lindenlab.com>2014-10-14 11:22:39 -0400
commit7ffa456683ed7babd8abf16d48f0871a7001f3e6 (patch)
tree0ca61fabcce55de740da7105b22d439456d77f2e /indra/newview/app_settings/shaders
parente271fe7091e76373c277625ffcb2cba0c9a02746 (diff)
STORM-2080: correct fitted mesh rendering on some ATI cards
Diffstat (limited to 'indra/newview/app_settings/shaders')
-rwxr-xr-xindra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl6
-rwxr-xr-xindra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl9
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl6
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl8
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/postgiF.glsl6
5 files changed, 35 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl
index bc63d07d72..767fad016c 100755
--- a/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/avatarSkinV.glsl
@@ -40,4 +40,10 @@ mat4 getSkinnedTransform()
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 57129c3bd1..6cd38d8ef5 100755
--- a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
@@ -63,5 +63,14 @@ 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.
+ mat3 dummy1 = matrixPalette[0];
+ vec3 dummy2 = translationPalette[0];
+ mat3 dummy3 = matrixPalette[51];
+ vec3 dummy4 = translationPalette[51];
+#endif
+
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl
index a4f54dff70..5264d6e1b4 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/blurLightF.glsl
@@ -132,5 +132,11 @@ void main()
col.y *= col.y;
frag_color = col;
+
+#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.
+ vec3 dummy1 = kern[0];
+ vec3 dummy2 = kern[3];
+#endif
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
index 236567219b..1a464fec5d 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl
@@ -161,4 +161,12 @@ void main()
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];
+#endif
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postgiF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postgiF.glsl
index 96f9628424..018ced4cad 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/postgiF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/postgiF.glsl
@@ -99,4 +99,10 @@ void main()
col = col*col*blur_quad.x + col*blur_quad.y + blur_quad.z;
frag_color.rgb = col;
+
+#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.
+ vec2 dummy1 = kern[0];
+ vec2 dummy2 = kern[31];
+#endif
}