diff options
author | Dave Parks <davep@lindenlab.com> | 2011-09-23 02:29:53 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-09-23 02:29:53 -0500 |
commit | b9926e8f57787eb146b06260cc3d0260e34330ce (patch) | |
tree | 2f646a86a6e1b074a07ae97284c9f164d824d80f /indra/newview/app_settings/shaders/class1/deferred | |
parent | d3f614e2e971fd442660ba6c1645830d3bf0b6cf (diff) |
SH-2244 Better VAO support -- still slower than non-VAO implementation for some reason
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred')
4 files changed, 12 insertions, 8 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl index 9920caf7f6..74ee082bed 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl @@ -28,7 +28,8 @@ uniform mat4 texture_matrix0; uniform mat4 modelview_matrix; uniform mat4 modelview_projection_matrix; -ATTRIBUTE vec4 position; +ATTRIBUTE vec3 position; +ATTRIBUTE float texture_index; ATTRIBUTE vec3 normal; ATTRIBUTE vec4 diffuse_color; ATTRIBUTE vec2 texcoord0; @@ -97,7 +98,7 @@ void main() { //transform vertex vec4 vert = vec4(position.xyz, 1.0); - vary_texture_index = position.w; + vary_texture_index = texture_index; vec4 pos = (modelview_matrix * vert); gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl index 36000b86d6..908f3abcd0 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl @@ -27,7 +27,8 @@ uniform mat3 normal_matrix; uniform mat4 texture_matrix0; uniform mat4 modelview_projection_matrix; -ATTRIBUTE vec4 position; +ATTRIBUTE vec3 position; +ATTRIBUTE float texture_index; ATTRIBUTE vec4 diffuse_color; ATTRIBUTE vec3 normal; ATTRIBUTE vec2 texcoord0; @@ -43,7 +44,7 @@ void main() gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; - vary_texture_index = position.w; + vary_texture_index = texture_index; vary_normal = normalize(normal_matrix * normal); vertex_color = diffuse_color; diff --git a/indra/newview/app_settings/shaders/class1/deferred/emissiveV.glsl b/indra/newview/app_settings/shaders/class1/deferred/emissiveV.glsl index b3558be678..50e92c191b 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/emissiveV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/emissiveV.glsl @@ -27,7 +27,8 @@ uniform mat4 texture_matrix0; uniform mat4 modelview_matrix; uniform mat4 modelview_projection_matrix; -ATTRIBUTE vec4 position; +ATTRIBUTE vec3 position; +ATTRIBUTE float texture_index; ATTRIBUTE float emissive; ATTRIBUTE vec2 texcoord0; @@ -48,7 +49,7 @@ void main() //transform vertex vec4 vert = vec4(position.xyz, 1.0); vec4 pos = (modelview_matrix * vert); - vary_texture_index = position.w; + vary_texture_index = texture_index; gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl index ef9f62da84..ab638991f7 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl @@ -28,7 +28,8 @@ uniform mat4 modelview_matrix; uniform mat4 modelview_projection_matrix; -ATTRIBUTE vec4 position; +ATTRIBUTE vec3 position; +ATTRIBUTE float texture_index; ATTRIBUTE vec4 diffuse_color; ATTRIBUTE vec2 texcoord0; @@ -49,7 +50,7 @@ void main() //transform vertex vec4 vert = vec4(position.xyz, 1.0); vec4 pos = (modelview_matrix * vert); - vary_texture_index = position.w; + vary_texture_index = texture_index; gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); |