From ee4fdd2c18c722164d78a7305777fad6e49cba8b Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Sun, 21 Aug 2011 16:23:04 -0500 Subject: SH-2242 Work in progress on FXAA/glVertexAttrib -- DoF works, physics shape display still doesn't. --- .../class1/interface/splattexturerectV.glsl | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl (limited to 'indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl') diff --git a/indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl b/indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl new file mode 100644 index 0000000000..085970f549 --- /dev/null +++ b/indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl @@ -0,0 +1,36 @@ +/** + * @file splattexturerectV.glsl + * + * $LicenseInfo:firstyear=2007&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, 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$ + */ + +attribute vec3 position; +attribute vec2 texcoord0; +attribute vec4 diffuse_color; + +void main() +{ + gl_Position = gl_ModelViewProjectionMatrix * vec4(position.xyz, 1.0); + gl_TexCoord[0] = vec4(texcoord0,0,1); + gl_FrontColor = diffuse_color; +} + -- cgit v1.2.3 From 530981a2149a74e1dc003cea1bbc9dc392fcae60 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 15 Sep 2011 00:54:25 -0500 Subject: SH-2243 work in progress -- no more deprecated built-in matrix state when using shaders. --- .../app_settings/shaders/class1/interface/splattexturerectV.glsl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl') diff --git a/indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl b/indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl index 085970f549..2b471d99e8 100644 --- a/indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl @@ -22,14 +22,16 @@ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ - + +uniform mat4 modelview_projection_matrix; + attribute vec3 position; attribute vec2 texcoord0; attribute vec4 diffuse_color; void main() { - gl_Position = gl_ModelViewProjectionMatrix * vec4(position.xyz, 1.0); + gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); gl_TexCoord[0] = vec4(texcoord0,0,1); gl_FrontColor = diffuse_color; } -- cgit v1.2.3 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 --- .../shaders/class1/interface/splattexturerectV.glsl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl') diff --git a/indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl b/indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl index 2b471d99e8..641d670c26 100644 --- a/indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl @@ -25,14 +25,17 @@ uniform mat4 modelview_projection_matrix; -attribute vec3 position; -attribute vec2 texcoord0; -attribute vec4 diffuse_color; +ATTRIBUTE vec3 position; +ATTRIBUTE vec2 texcoord0; +ATTRIBUTE vec4 diffuse_color; + +VARYING vec4 vertex_color; +VARYING vec2 vary_texcoord0; void main() { gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); - gl_TexCoord[0] = vec4(texcoord0,0,1); - gl_FrontColor = diffuse_color; + vary_texcoord0 = texcoord0; + vertex_color = diffuse_color; } -- cgit v1.2.3