From da84f5552731e1ece3a463c4c385bb327f1048a1 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 16 Sep 2011 12:40:53 -0500 Subject: SH-2243 work in progress -- don't use deprecated shader state --- indra/newview/app_settings/shaders/class2/effects/extractF.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/app_settings/shaders/class2/effects/extractF.glsl') diff --git a/indra/newview/app_settings/shaders/class2/effects/extractF.glsl b/indra/newview/app_settings/shaders/class2/effects/extractF.glsl index 9187c8ec31..06b83e3f5f 100644 --- a/indra/newview/app_settings/shaders/class2/effects/extractF.glsl +++ b/indra/newview/app_settings/shaders/class2/effects/extractF.glsl @@ -33,7 +33,7 @@ uniform vec3 lumWeights; void main(void) { /// Get scene color - vec3 color = vec3(texture2DRect(RenderTexture, gl_TexCoord[0].st)); + vec3 color = vec3(texture2DRect(RenderTexture, vary_texcoord0.st)); /// Extract luminance and scale up by night vision brightness float lum = smoothstep(extractLow, extractHigh, dot(color, lumWeights)); -- cgit v1.2.3 From 8a1baaea6c0462b645499e8e7b88345e46b92621 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 16 Sep 2011 17:08:39 -0500 Subject: SH-2243 work in progress -- don't use gl_FragColor or gl_FragData for outputs -- no more deprecation warnings on nvidia --- indra/newview/app_settings/shaders/class2/effects/extractF.glsl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/app_settings/shaders/class2/effects/extractF.glsl') diff --git a/indra/newview/app_settings/shaders/class2/effects/extractF.glsl b/indra/newview/app_settings/shaders/class2/effects/extractF.glsl index 06b83e3f5f..786c00f946 100644 --- a/indra/newview/app_settings/shaders/class2/effects/extractF.glsl +++ b/indra/newview/app_settings/shaders/class2/effects/extractF.glsl @@ -23,7 +23,9 @@ * $/LicenseInfo$ */ - +#ifndef gl_FragColor +out vec4 gl_FragColor; +#endif uniform sampler2DRect RenderTexture; uniform float extractLow; -- cgit v1.2.3 From 183fe0d14c48ebeb174567304cea197e7ea443fa Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Sat, 24 Sep 2011 03:09:32 -0500 Subject: SH-2244 Fix for shaders not compiling on pre-GL-3.0 ATI drivers --- indra/newview/app_settings/shaders/class2/effects/extractF.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/app_settings/shaders/class2/effects/extractF.glsl') diff --git a/indra/newview/app_settings/shaders/class2/effects/extractF.glsl b/indra/newview/app_settings/shaders/class2/effects/extractF.glsl index 786c00f946..ebf4f28a74 100644 --- a/indra/newview/app_settings/shaders/class2/effects/extractF.glsl +++ b/indra/newview/app_settings/shaders/class2/effects/extractF.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ -#ifndef gl_FragColor +#ifdef DEFINE_GL_FRAGCOLOR out vec4 gl_FragColor; #endif -- cgit v1.2.3 From 7238714634e72dacc4b09c1c4ee98b16fb0c91fe Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 29 Sep 2011 19:32:56 -0500 Subject: SH-2507 Potential fix for basic shaders causing objects to disappear with some drivers (prune shader tree of unused shaders while we're at it) --- .../shaders/class2/effects/extractF.glsl | 44 ---------------------- 1 file changed, 44 deletions(-) delete mode 100644 indra/newview/app_settings/shaders/class2/effects/extractF.glsl (limited to 'indra/newview/app_settings/shaders/class2/effects/extractF.glsl') diff --git a/indra/newview/app_settings/shaders/class2/effects/extractF.glsl b/indra/newview/app_settings/shaders/class2/effects/extractF.glsl deleted file mode 100644 index ebf4f28a74..0000000000 --- a/indra/newview/app_settings/shaders/class2/effects/extractF.glsl +++ /dev/null @@ -1,44 +0,0 @@ -/** - * @file extractF.glsl - * - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2007, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -#ifdef DEFINE_GL_FRAGCOLOR -out vec4 gl_FragColor; -#endif - -uniform sampler2DRect RenderTexture; -uniform float extractLow; -uniform float extractHigh; -uniform vec3 lumWeights; - -void main(void) -{ - /// Get scene color - vec3 color = vec3(texture2DRect(RenderTexture, vary_texcoord0.st)); - - /// Extract luminance and scale up by night vision brightness - float lum = smoothstep(extractLow, extractHigh, dot(color, lumWeights)); - - gl_FragColor = vec4(vec3(lum), 1.0); -} -- cgit v1.2.3