From 1907883e02cfd8acd4ff2e61d1cfb11406016450 Mon Sep 17 00:00:00 2001 From: Siana Gearz Date: Sun, 3 Jul 2011 22:49:23 +0200 Subject: [PATCH] This fixes glow on OSX --- .../shaders/class1/effects/glowF.glsl | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/indra/newview/app_settings/shaders/class1/effects/glowF.glsl b/indra/newview/app_settings/shaders/class1/effects/glowF.glsl index 817d6c1c5..85e5675ac 100644 --- a/indra/newview/app_settings/shaders/class1/effects/glowF.glsl +++ b/indra/newview/app_settings/shaders/class1/effects/glowF.glsl @@ -10,20 +10,20 @@ uniform sampler2D diffuseMap; uniform float glowStrength; -float kern[4] = float[4](.25,.5,.8,1.0); //Initialize the correct (non nVidia cg) way +vec4 kern = vec4(.25,.5,.8,1.0); void main() { vec4 col = vec4(0.0, 0.0, 0.0, 0.0); - col += kern[0] * texture2D(diffuseMap, gl_TexCoord[0].xy); - col += kern[1] * texture2D(diffuseMap, gl_TexCoord[1].xy); - col += kern[2] * texture2D(diffuseMap, gl_TexCoord[2].xy); - col += kern[3] * texture2D(diffuseMap, gl_TexCoord[3].xy); - col += kern[3] * texture2D(diffuseMap, gl_TexCoord[0].zw); - col += kern[2] * texture2D(diffuseMap, gl_TexCoord[1].zw); - col += kern[1] * texture2D(diffuseMap, gl_TexCoord[2].zw); - col += kern[0] * texture2D(diffuseMap, gl_TexCoord[3].zw); + col += kern.x * texture2D(diffuseMap, gl_TexCoord[0].xy); + col += kern.y * texture2D(diffuseMap, gl_TexCoord[1].xy); + col += kern.z * texture2D(diffuseMap, gl_TexCoord[2].xy); + col += kern.w * texture2D(diffuseMap, gl_TexCoord[3].xy); + col += kern.w * texture2D(diffuseMap, gl_TexCoord[0].zw); + col += kern.z * texture2D(diffuseMap, gl_TexCoord[1].zw); + col += kern.y * texture2D(diffuseMap, gl_TexCoord[2].zw); + col += kern.x * texture2D(diffuseMap, gl_TexCoord[3].zw); gl_FragColor = vec4(col.rgb * glowStrength, col.a); }