summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/softenLightMSF.glsl
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-05-24 15:29:33 -0500
committerDave Parks <davep@lindenlab.com>2011-05-24 15:29:33 -0500
commit4353eeb9288c95b98935e60928ec0b80de4e6145 (patch)
tree6707a858286f25cf7e389ff2f5e92099e9b4569b /indra/newview/app_settings/shaders/class1/deferred/softenLightMSF.glsl
parentfd574e34857accd55e736d855975767fd7768b79 (diff)
SH-469 GL_ARB_texture_multisample support
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/softenLightMSF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightMSF.glsl14
1 files changed, 7 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightMSF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightMSF.glsl
index 4c38d91499..fcba4f57e6 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightMSF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightMSF.glsl
@@ -251,18 +251,18 @@ vec3 scaleSoftClip(vec3 light)
vec4 texture2DMS(sampler2DMS tex, ivec2 tc)
{
- vec4 ret = texelFetch(tex,tc,0);
- ret += texelFetch(tex,tc,1);
- ret += texelFetch(tex,tc,2);
- ret += texelFetch(tex,tc,3);
- ret *= 0.25;
+ vec4 ret = vec4(0,0,0,0);
- return ret;
+ for (int i = 0; i < samples; ++i)
+ {
+ ret += texelFetch(tex,tc,i);
+ }
+
+ return ret/samples;
}
void main()
{
- int samples = 4;
vec2 tc = vary_fragcoord.xy;
ivec2 itc = ivec2(tc);