diff options
author | Dave Parks <davep@lindenlab.com> | 2011-08-19 16:34:34 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-08-19 16:34:34 -0500 |
commit | 233e42b3314c17b2e24334587d960af6e3dc963c (patch) | |
tree | 480e571bf913bb0743c3c6c6ce846a69aa405504 /indra/newview/app_settings/shaders/class3/deferred | |
parent | 0e496309d6cb7581c9f69b7da244699c382750ac (diff) | |
parent | 80398b3ccb0c4a6ff3ac20b3565619fe5cecc2f9 (diff) |
merge
Diffstat (limited to 'indra/newview/app_settings/shaders/class3/deferred')
7 files changed, 32 insertions, 26 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl b/indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl index 6231ee68b7..870d4c36bc 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ - +attribute vec3 position; varying vec2 vary_fragcoord; uniform vec2 screen_res; @@ -31,7 +31,7 @@ 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; } diff --git a/indra/newview/app_settings/shaders/class3/deferred/giFinalV.glsl b/indra/newview/app_settings/shaders/class3/deferred/giFinalV.glsl index a6a206502c..76206f88d9 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/giFinalV.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/giFinalV.glsl @@ -23,6 +23,7 @@ * $/LicenseInfo$ */ +attribute vec3 position; varying vec2 vary_fragcoord; @@ -31,7 +32,7 @@ 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; } diff --git a/indra/newview/app_settings/shaders/class3/deferred/giV.glsl b/indra/newview/app_settings/shaders/class3/deferred/giV.glsl index 190e32b6a3..1a23be349e 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/giV.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/giV.glsl @@ -23,6 +23,9 @@ * $/LicenseInfo$ */ +attribute vec3 position; +attribute vec4 diffuse_color; +attribute vec2 texcoord0; varying vec2 vary_fragcoord; @@ -32,11 +35,12 @@ 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; - gl_FrontColor = gl_Color; + gl_FrontColor = diffuse_color; } diff --git a/indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl b/indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl index 2d99ef5481..a2606f2fb2 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl @@ -23,18 +23,20 @@ * $/LicenseInfo$ */ - - varying vec2 vary_fragcoord; uniform vec2 screen_res; +attribute vec3 position; +attribute vec4 diffuse_color; + 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; - gl_FrontColor = gl_Color; + gl_FrontColor = diffuse_color; } diff --git a/indra/newview/app_settings/shaders/class3/deferred/postDeferredV.glsl b/indra/newview/app_settings/shaders/class3/deferred/postDeferredV.glsl index cb83dda795..2d0b60d513 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/postDeferredV.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/postDeferredV.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ - +attribute vec3 position; varying vec2 vary_fragcoord; uniform vec2 screen_res; @@ -31,7 +31,7 @@ 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; } diff --git a/indra/newview/app_settings/shaders/class3/deferred/postgiV.glsl b/indra/newview/app_settings/shaders/class3/deferred/postgiV.glsl index 6231ee68b7..25bdfdce45 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/postgiV.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/postgiV.glsl @@ -23,7 +23,7 @@ * $/LicenseInfo$ */ - +attribute vec3 position; varying vec2 vary_fragcoord; uniform vec2 screen_res; @@ -31,7 +31,7 @@ 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; } diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightV.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightV.glsl index fed238510a..9e07a4d219 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/softenLightV.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightV.glsl @@ -24,6 +24,8 @@ */ +attribute vec3 position; +attribute vec2 texcoord0; uniform vec2 screen_res; @@ -32,13 +34,10 @@ varying vec2 vary_fragcoord; void main() { //transform vertex - gl_Position = ftransform(); + vec4 pos = gl_ModelViewProjectionMatrix * vec4(position.xyz, 1.0); + gl_Position = pos; - vec4 pos = gl_ModelViewProjectionMatrix * gl_Vertex; vary_fragcoord = (pos.xy*0.5+0.5)*screen_res; - vec4 tex = gl_MultiTexCoord0; - tex.w = 1.0; - - vary_light = gl_MultiTexCoord0; + vary_light = vec4(texcoord0,0,1); } |