Files
SingularityViewer/indra/newview/app_settings/shaders/class2/effects/gaussBlurF.glsl
Shyotl ffb285c6ff Huge renderer update (WIP). Still plenty to do, especially pertaining to UI.
-Nametag bubble visbility is oddly inconsistent. May vanish with future planned UI merges...
-VBOs are PAINFULLY slow on ATI hardware. This repos self-compiled davep/shining-fixes branch, so I'll leave the ball in LL's court for now regarding that.
2011-12-09 14:02:29 -06:00

36 lines
1.3 KiB
GLSL

#ifdef DEFINE_GL_FRAGCOLOR
out vec4 gl_FragColor;
#endif
#extension GL_ARB_texture_rectangle : enable
uniform sampler2DRect RenderTexture;
uniform int horizontalPass;
VARYING vec2 vary_texcoord0;
vec2 offset = vec2( 1.3846153846, 3.2307692308 );
vec3 weight = vec3( 0.2270270270, 0.3162162162, 0.0702702703 );
void main(void)
{
vec3 color = vec3(texture2DRect(RenderTexture, vary_texcoord0))*weight.x;
if(horizontalPass == 1)
{
color += weight.y * vec3(texture2DRect(RenderTexture, vec2(vary_texcoord0.s+offset.s,vary_texcoord0.t)));
color += weight.y * vec3(texture2DRect(RenderTexture, vec2(vary_texcoord0.s-offset.s,vary_texcoord0.t)));
color += weight.z * vec3(texture2DRect(RenderTexture, vec2(vary_texcoord0.s+offset.t,vary_texcoord0.t)));
color += weight.z * vec3(texture2DRect(RenderTexture, vec2(vary_texcoord0.s-offset.t,vary_texcoord0.t)));
}
else
{
color += weight.y * vec3(texture2DRect(RenderTexture, vec2(vary_texcoord0.s,vary_texcoord0.t+offset.s)));
color += weight.y * vec3(texture2DRect(RenderTexture, vec2(vary_texcoord0.s,vary_texcoord0.t-offset.s)));
color += weight.z * vec3(texture2DRect(RenderTexture, vec2(vary_texcoord0.s,vary_texcoord0.t+offset.t)));
color += weight.z * vec3(texture2DRect(RenderTexture, vec2(vary_texcoord0.s,vary_texcoord0.t-offset.t)));
}
gl_FragColor = vec4(color.xyz,1.0);
}