summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/deferred
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl8
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl8
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl8
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl18
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl18
8 files changed, 47 insertions, 31 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
index 1179b212ae..373a6c157b 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
@@ -26,7 +26,9 @@
#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 gl_FragColor;
+out vec4 frag_color;
+#else
+#define frag_color gl_FragColor;
#endif
VARYING vec4 vertex_color;
@@ -125,6 +127,6 @@ void main()
color.rgb += diff.rgb * vary_pointlight_col.rgb;
- gl_FragColor = color;
+ frag_color = color;
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl
index 0df557f2aa..04460ea7c0 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedF.glsl
@@ -26,7 +26,9 @@
#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 gl_FragColor;
+out vec4 frag_color;
+#else
+#define frag_color gl_FragColor;
#endif
uniform sampler2DRectShadow shadowMap0;
@@ -138,6 +140,6 @@ void main()
color.rgb += diff.rgb * vary_pointlight_col.rgb;
- gl_FragColor = color;
+ frag_color = color;
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl
index 331dbc7079..c50145f753 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaNonIndexedNoColorF.glsl
@@ -26,7 +26,9 @@
#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 gl_FragColor;
+out vec4 frag_color;
+#else
+#define frag_color gl_FragColor;
#endif
uniform sampler2DRectShadow shadowMap0;
@@ -137,6 +139,6 @@ void main()
color.rgb += diff.rgb * vary_pointlight_col.rgb;
- gl_FragColor = color;
+ frag_color = color;
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
index 14a683971a..7d78a888a5 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
@@ -26,7 +26,9 @@
#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 gl_FragColor;
+out vec4 frag_color;
+#else
+#define frag_color gl_FragColor;
#endif
uniform sampler2DRect diffuseRect;
@@ -253,6 +255,6 @@ void main()
}
}
- gl_FragColor.rgb = col;
- gl_FragColor.a = 0.0;
+ frag_color.rgb = col;
+ frag_color.a = 0.0;
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index 27ea77b5a2..f73163898e 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -26,7 +26,9 @@
#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 gl_FragColor;
+out vec4 frag_color;
+#else
+#define frag_color gl_FragColor;
#endif
uniform sampler2DRect diffuseRect;
@@ -330,6 +332,6 @@ void main()
col = diffuse.rgb;
}
- gl_FragColor.rgb = col;
- gl_FragColor.a = bloom;
+ frag_color.rgb = col;
+ frag_color.a = bloom;
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
index 31bd0c79da..7cc621b1f6 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
@@ -26,7 +26,9 @@
#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 gl_FragColor;
+out vec4 frag_color;
+#else
+#define frag_color gl_FragColor;
#endif
VARYING vec4 vertex_color;
@@ -201,6 +203,6 @@ void main()
}
}
- gl_FragColor.rgb = col;
- gl_FragColor.a = 0.0;
+ frag_color.rgb = col;
+ frag_color.a = 0.0;
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
index 229c2f4b67..a92a9fc8e8 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightF.glsl
@@ -26,7 +26,9 @@
#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 gl_FragColor;
+out vec4 frag_color;
+#else
+#define frag_color gl_FragColor;
#endif
//class 2, shadows, no SSAO
@@ -129,7 +131,7 @@ void main()
/*if (pos.z == 0.0) // do nothing for sky *FIX: REMOVE THIS IF/WHEN THE POSITION MAP IS BEING USED AS A STENCIL
{
- gl_FragColor = vec4(0.0); // doesn't matter
+ frag_color = vec4(0.0); // doesn't matter
return;
}*/
@@ -198,19 +200,19 @@ void main()
shadow = 1.0;
}
- gl_FragColor[0] = shadow;
- gl_FragColor[1] = 1.0;
+ frag_color[0] = shadow;
+ frag_color[1] = 1.0;
spos = vec4(shadow_pos+norm*spot_shadow_offset, 1.0);
//spotlight shadow 1
vec4 lpos = shadow_matrix[4]*spos;
- gl_FragColor[2] = pcfShadow(shadowMap4, lpos, 0.8);
+ frag_color[2] = pcfShadow(shadowMap4, lpos, 0.8);
//spotlight shadow 2
lpos = shadow_matrix[5]*spos;
- gl_FragColor[3] = pcfShadow(shadowMap5, lpos, 0.8);
+ frag_color[3] = pcfShadow(shadowMap5, lpos, 0.8);
- //gl_FragColor.rgb = pos.xyz;
- //gl_FragColor.b = shadow;
+ //frag_color.rgb = pos.xyz;
+ //frag_color.b = shadow;
}
diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
index 6b420833b9..45b8db5adc 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightSSAOF.glsl
@@ -25,7 +25,9 @@
#extension GL_ARB_texture_rectangle : enable
#ifdef DEFINE_GL_FRAGCOLOR
-out vec4 gl_FragColor;
+out vec4 frag_color;
+#else
+#define frag_color gl_FragColor;
#endif
//class 2 -- shadows and SSAO
@@ -190,7 +192,7 @@ void main()
/*if (pos.z == 0.0) // do nothing for sky *FIX: REMOVE THIS IF/WHEN THE POSITION MAP IS BEING USED AS A STENCIL
{
- gl_FragColor = vec4(0.0); // doesn't matter
+ frag_color = vec4(0.0); // doesn't matter
return;
}*/
@@ -259,19 +261,19 @@ void main()
shadow = 1.0;
}
- gl_FragColor[0] = shadow;
- gl_FragColor[1] = calcAmbientOcclusion(pos, norm);
+ frag_color[0] = shadow;
+ frag_color[1] = calcAmbientOcclusion(pos, norm);
spos = vec4(shadow_pos+norm*spot_shadow_offset, 1.0);
//spotlight shadow 1
vec4 lpos = shadow_matrix[4]*spos;
- gl_FragColor[2] = pcfShadow(shadowMap4, lpos, 0.8);
+ frag_color[2] = pcfShadow(shadowMap4, lpos, 0.8);
//spotlight shadow 2
lpos = shadow_matrix[5]*spos;
- gl_FragColor[3] = pcfShadow(shadowMap5, lpos, 0.8);
+ frag_color[3] = pcfShadow(shadowMap5, lpos, 0.8);
- //gl_FragColor.rgb = pos.xyz;
- //gl_FragColor.b = shadow;
+ //frag_color.rgb = pos.xyz;
+ //frag_color.b = shadow;
}