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 --- .../app_settings/shaders/class2/deferred/sunLightV.glsl | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl') diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl index 814deb3677..6795b55dc6 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl @@ -5,6 +5,10 @@ * $/LicenseInfo$ */ +attribute vec3 position; +attribute vec3 normal; +attribute vec4 diffuse_color; +attribute vec2 texcoord0; varying vec4 vary_light; @@ -15,13 +19,14 @@ uniform vec2 screen_res; void main() { //transform vertex - gl_Position = ftransform(); - vec4 pos = gl_ModelViewProjectionMatrix * gl_Vertex; + vec4 pos = gl_ModelViewProjectionMatrix * vec4(position.xyz, 1.0); + gl_Position = pos; + vary_fragcoord = (pos.xy * 0.5 + 0.5)*screen_res; - vec4 tex = gl_MultiTexCoord0; + vec4 tex = vec4(texcoord0,0,1); tex.w = 1.0; - vary_light = gl_MultiTexCoord0; + vary_light = vec4(texcoord0,0,1); - gl_FrontColor = gl_Color; + gl_FrontColor = diffuse_color; } -- cgit v1.2.3