From 14f6bbadef2c39e58a3b54c0c6212949acf50e45 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 8 Aug 2011 15:29:23 -0500 Subject: SH-2242 Work in progress migrating to glVertexAttrib everywhere --- indra/newview/app_settings/shaders/class1/interface/uiV.glsl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/newview/app_settings/shaders/class1/interface/uiV.glsl') diff --git a/indra/newview/app_settings/shaders/class1/interface/uiV.glsl b/indra/newview/app_settings/shaders/class1/interface/uiV.glsl index 9ca6cae5c5..ebf2361da4 100644 --- a/indra/newview/app_settings/shaders/class1/interface/uiV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/uiV.glsl @@ -6,11 +6,15 @@ */ +attribute vec3 position; +attribute vec4 diffuse_color; +attribute vec2 texcoord0; + void main() { - gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; - gl_TexCoord[0] = gl_MultiTexCoord0; - gl_FrontColor = gl_Color; + gl_Position = gl_ModelViewProjectionMatrix * vec4(position, 1); + gl_TexCoord[0] = vec4(texcoord0,0,1); + gl_FrontColor = diffuse_color; } -- cgit v1.2.3 From 2ee815478043c4d5845f094f744a055707dba0e0 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 10 Aug 2011 13:01:14 -0500 Subject: SH-2238, SH-2223, SH-SH-2242 glVertexAttrib throughout main render pipeline complete, preview renders and debug displays still pending. Also fixed a render glitch and a crash (JIRAs listed). --- indra/newview/app_settings/shaders/class1/interface/uiV.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/app_settings/shaders/class1/interface/uiV.glsl') diff --git a/indra/newview/app_settings/shaders/class1/interface/uiV.glsl b/indra/newview/app_settings/shaders/class1/interface/uiV.glsl index ebf2361da4..9d129caf21 100644 --- a/indra/newview/app_settings/shaders/class1/interface/uiV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/uiV.glsl @@ -14,7 +14,7 @@ attribute vec2 texcoord0; void main() { gl_Position = gl_ModelViewProjectionMatrix * vec4(position, 1); - gl_TexCoord[0] = vec4(texcoord0,0,1); + gl_TexCoord[0] = gl_TextureMatrix[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. --- indra/newview/app_settings/shaders/class1/interface/uiV.glsl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/newview/app_settings/shaders/class1/interface/uiV.glsl') diff --git a/indra/newview/app_settings/shaders/class1/interface/uiV.glsl b/indra/newview/app_settings/shaders/class1/interface/uiV.glsl index faef21689e..a9e42a432f 100644 --- a/indra/newview/app_settings/shaders/class1/interface/uiV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/uiV.glsl @@ -22,7 +22,9 @@ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ - + +uniform mat4 texture_matrix0; +uniform mat4 modelview_projection_matrix; attribute vec3 position; attribute vec4 diffuse_color; @@ -31,8 +33,8 @@ attribute vec2 texcoord0; void main() { - gl_Position = gl_ModelViewProjectionMatrix * vec4(position, 1); - gl_TexCoord[0] = gl_TextureMatrix[0] * vec4(texcoord0,0,1); + gl_Position = modelview_projection_matrix * vec4(position, 1); + gl_TexCoord[0] = texture_matrix0 * vec4(texcoord0,0,1); gl_FrontColor = diffuse_color; } -- cgit v1.2.3