diff options
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl b/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl index e827863436..9a3d792224 100644 --- a/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl +++ b/indra/newview/app_settings/shaders/class1/effects/glowExtractF.glsl @@ -23,10 +23,12 @@ * $/LicenseInfo$ */ - - #extension GL_ARB_texture_rectangle : enable +#ifdef DEFINE_GL_FRAGCOLOR +out vec4 gl_FragColor; +#endif + uniform sampler2DRect diffuseMap; uniform float minLuminance; uniform float maxExtractAlpha; @@ -34,10 +36,11 @@ uniform vec3 lumWeights; uniform vec3 warmthWeights; uniform float warmthAmount; +VARYING vec2 vary_texcoord0; + void main() { - vec4 col = texture2DRect(diffuseMap, gl_TexCoord[0].xy); - + vec4 col = texture2DRect(diffuseMap, vary_texcoord0.xy); /// CALCULATING LUMINANCE (Using NTSC lum weights) /// http://en.wikipedia.org/wiki/Luma_%28video%29 float lum = smoothstep(minLuminance, minLuminance+1.0, dot(col.rgb, lumWeights ) ); @@ -45,4 +48,5 @@ void main() gl_FragColor.rgb = col.rgb; gl_FragColor.a = max(col.a, mix(lum, warmth, warmthAmount) * maxExtractAlpha); + } |