summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class3/deferred/giF.glsl
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-09-30 12:42:30 -0500
committerDave Parks <davep@lindenlab.com>2011-09-30 12:42:30 -0500
commit4ff4d99c4751b905c12ab56289b63e39ef6269de (patch)
tree59888efb5f650b0a06ad70cfc296d93b90a1654b /indra/newview/app_settings/shaders/class3/deferred/giF.glsl
parentf7ddde3807a3437cc036e687d216ef69feb6214b (diff)
parent8c1f8c77469a3b1dbc66f56f8722c0c01fdddf8a (diff)
merge
Diffstat (limited to 'indra/newview/app_settings/shaders/class3/deferred/giF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/giF.glsl14
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giF.glsl b/indra/newview/app_settings/shaders/class3/deferred/giF.glsl
index 95913a502c..ee992f2fe9 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/giF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/giF.glsl
@@ -23,10 +23,12 @@
* $/LicenseInfo$
*/
-
-
#extension GL_ARB_texture_rectangle : enable
+#ifdef DEFINE_GL_FRAGCOLOR;
+out vec4 gl_FragColor;
+#endif
+
uniform sampler2DRect depthMap;
uniform sampler2DRect normalMap;
uniform sampler2DRect lightMap;
@@ -42,7 +44,7 @@ uniform sampler2D depthGIMap;
uniform sampler2D lightFunc;
// Inputs
-varying vec2 vary_fragcoord;
+VARYING vec2 vary_fragcoord;
uniform vec2 screen_res;
@@ -154,7 +156,7 @@ vec3 giAmbient(vec3 pos, vec3 norm)
if (spec.a > 0.0)
{
float sa = dot(ha,lnorm);
- da = texture2D(lightFunc, vec2(sa, spec.a)).a;
+ da = texture2D(lightFunc, vec2(sa, spec.a)).r;
}
else
{
@@ -169,7 +171,7 @@ vec3 giAmbient(vec3 pos, vec3 norm)
if (c_spec.a > 0.0)
{
float sa = dot(ha, gi_norm);
- da = dist_atten*texture2D(lightFunc, vec2(sa, c_spec.a)).a;
+ da = dist_atten*texture2D(lightFunc, vec2(sa, c_spec.a)).r;
}
else
{
@@ -207,5 +209,5 @@ void main()
vec3 ambient = da > 0.0 ? giAmbient(pos.xyz, norm) : vec3(0);
- gl_FragData[0].xyz = mix(vec3(0), ambient, da);
+ gl_FragColor.xyz = mix(vec3(0), ambient, da);
}