summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/environment
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2012-02-10 20:04:19 -0600
committerDave Parks <davep@lindenlab.com>2012-02-10 20:04:19 -0600
commit3710c6110d65d3a604f7b419cd764cf5b9b98600 (patch)
tree544b689c3c084976b05a69a34726524e6e68f214 /indra/newview/app_settings/shaders/class1/environment
parente0582d4bc71e2f367b4cf4a6f0b808451620b52f (diff)
SH-2908 Rework indexed texture rendering to use a uvec4 instead of a float for texture indices in the data stream. Also rework gl_FragColor overrides to not collide with some odd driver implementations.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/environment')
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/terrainF.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class1/environment/waterF.glsl6
4 files changed, 16 insertions, 8 deletions
diff --git a/indra/newview/app_settings/shaders/class1/environment/terrainF.glsl b/indra/newview/app_settings/shaders/class1/environment/terrainF.glsl
index 18f6d91804..51efdd4b39 100644
--- a/indra/newview/app_settings/shaders/class1/environment/terrainF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/terrainF.glsl
@@ -24,7 +24,9 @@
*/
#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 gl_FragColor;
+out vec4 frag_color;
+#else
+#define frag_color gl_FragColor;
#endif
VARYING vec4 vertex_color;
@@ -59,6 +61,6 @@ void main()
/// Add WL Components
outColor.rgb = atmosLighting(outColor.rgb * vertex_color.rgb);
- gl_FragColor = vec4(scaleSoftClip(outColor.rgb), 1.0);
+ frag_color = vec4(scaleSoftClip(outColor.rgb), 1.0);
}
diff --git a/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl b/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl
index e5c7ced52c..d9b5c5f7f5 100644
--- a/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/terrainWaterF.glsl
@@ -24,7 +24,9 @@
*/
#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 gl_FragColor;
+out vec4 frag_color;
+#else
+#define frag_color gl_FragColor;
#endif
VARYING vec4 vertex_color;
@@ -60,6 +62,6 @@ void main()
outColor.rgb = atmosLighting(outColor.rgb * vertex_color.rgb);
outColor = applyWaterFog(outColor);
- gl_FragColor = outColor;
+ frag_color = outColor;
}
diff --git a/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl b/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl
index 1fdb90f792..32459eff6a 100644
--- a/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/underWaterF.glsl
@@ -24,7 +24,9 @@
*/
#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 gl_FragColor;
+out vec4 frag_color;
+#else
+#define frag_color gl_FragColor;
#endif
uniform sampler2D diffuseMap;
@@ -106,5 +108,5 @@ void main()
vec4 fb = texture2D(screenTex, distort);
- gl_FragColor = applyWaterFog(fb,view.xyz);
+ frag_color = applyWaterFog(fb,view.xyz);
}
diff --git a/indra/newview/app_settings/shaders/class1/environment/waterF.glsl b/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
index 444c896d38..0cde7d0133 100644
--- a/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
+++ b/indra/newview/app_settings/shaders/class1/environment/waterF.glsl
@@ -24,7 +24,9 @@
*/
#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 gl_FragColor;
+out vec4 frag_color;
+#else
+#define frag_color gl_FragColor;
#endif
vec3 scaleSoftClip(vec3 inColor);
@@ -135,5 +137,5 @@ void main()
color.rgb = scaleSoftClip(color.rgb);
color.a = spec * sunAngle2;
- gl_FragColor = color;
+ frag_color = color;
}