summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl14
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
index 1c02adea89..7089c53f1c 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
@@ -23,10 +23,12 @@
* $/LicenseInfo$
*/
-
-
#extension GL_ARB_texture_rectangle : enable
+#ifdef DEFINE_GL_FRAGCOLOR
+out vec4 gl_FragColor;
+#endif
+
uniform sampler2DRect diffuseRect;
uniform sampler2DRect specularRect;
uniform sampler2DRect normalMap;
@@ -65,8 +67,8 @@ uniform sampler2DRect depthMap;
uniform mat4 inv_proj;
uniform vec2 screen_res;
-varying vec4 vary_light;
-varying vec2 vary_fragcoord;
+VARYING vec4 vary_light;
+VARYING vec2 vary_fragcoord;
vec3 vary_PositionEye;
@@ -293,7 +295,7 @@ void main()
{
vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy);
- da = texture2D(lightFunc, vec2(da, 0.0)).a;
+ da = texture2D(lightFunc, vec2(da, 0.0)).r;
vec2 scol_ambocc = texture2DRect(lightMap, vary_fragcoord.xy).rg;
float scol = max(scol_ambocc.r, diffuse.a);
@@ -312,7 +314,7 @@ void main()
//
vec3 refnormpersp = normalize(reflect(pos.xyz, norm.xyz));
float sa = dot(refnormpersp, vary_light.xyz);
- vec3 dumbshiny = vary_SunlitColor*scol*texture2D(lightFunc, vec2(sa, spec.a)).a;
+ vec3 dumbshiny = vary_SunlitColor*scol*texture2D(lightFunc, vec2(sa, spec.a)).r;
// add the two types of shiny together
vec3 spec_contrib = dumbshiny * spec.rgb;