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/class2/effects/blurV.glsl | 6 ++++-- .../newview/app_settings/shaders/class2/effects/drawQuadV.glsl | 10 +++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'indra/newview/app_settings/shaders/class2/effects') diff --git a/indra/newview/app_settings/shaders/class2/effects/blurV.glsl b/indra/newview/app_settings/shaders/class2/effects/blurV.glsl index de469542f9..68f79fba82 100644 --- a/indra/newview/app_settings/shaders/class2/effects/blurV.glsl +++ b/indra/newview/app_settings/shaders/class2/effects/blurV.glsl @@ -6,6 +6,8 @@ */ +attribute vec3 position; +attribute vec2 texcoord0; uniform vec2 texelSize; uniform vec2 blurDirection; @@ -14,10 +16,10 @@ uniform float blurWidth; void main(void) { // Transform vertex - gl_Position = ftransform(); + gl_Position = gl_ModelViewProjectionMatrix * vec4(position.xyz, 1.0); vec2 blurDelta = texelSize * blurDirection * vec2(blurWidth, blurWidth); - vec2 s = gl_MultiTexCoord0.st - (blurDelta * 3.0); + vec2 s = vec4(texcoord0,0,1).st - (blurDelta * 3.0); // for (int i = 0; i < 7; i++) { // gl_TexCoord[i].st = s + (i * blurDelta); diff --git a/indra/newview/app_settings/shaders/class2/effects/drawQuadV.glsl b/indra/newview/app_settings/shaders/class2/effects/drawQuadV.glsl index 9c52b8dd5d..7dd2ead200 100644 --- a/indra/newview/app_settings/shaders/class2/effects/drawQuadV.glsl +++ b/indra/newview/app_settings/shaders/class2/effects/drawQuadV.glsl @@ -6,11 +6,15 @@ */ +attribute vec3 position; +attribute vec2 texcoord0; +attribute vec2 texcoord1; + void main(void) { //transform vertex - gl_Position = ftransform(); - gl_TexCoord[0] = gl_MultiTexCoord0; - gl_TexCoord[1] = gl_MultiTexCoord1; + gl_Position = gl_ModelViewProjectionMatrix * vec4(position.xyz, 1.0); + gl_TexCoord[0] = vec4(texcoord0,0,1); + gl_TexCoord[1] = vec4(texcoord1,0,1); } -- cgit v1.2.3