summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/objects
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-09-23 02:29:53 -0500
committerDave Parks <davep@lindenlab.com>2011-09-23 02:29:53 -0500
commitb9926e8f57787eb146b06260cc3d0260e34330ce (patch)
tree2f646a86a6e1b074a07ae97284c9f164d824d80f /indra/newview/app_settings/shaders/class2/objects
parentd3f614e2e971fd442660ba6c1645830d3bf0b6cf (diff)
SH-2244 Better VAO support -- still slower than non-VAO implementation for some reason
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/objects')
-rw-r--r--indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl5
-rw-r--r--indra/newview/app_settings/shaders/class2/objects/fullbrightV.glsl5
-rw-r--r--indra/newview/app_settings/shaders/class2/objects/shinyV.glsl5
-rw-r--r--indra/newview/app_settings/shaders/class2/objects/simpleV.glsl5
4 files changed, 12 insertions, 8 deletions
diff --git a/indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl b/indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl
index ef97e4f781..580ef2694f 100644
--- a/indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl
+++ b/indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl
@@ -36,7 +36,8 @@ uniform vec4 origin;
VARYING float vary_texture_index;
-ATTRIBUTE vec4 position;
+ATTRIBUTE vec3 position;
+ATTRIBUTE float texture_index;
ATTRIBUTE vec3 normal;
ATTRIBUTE vec4 diffuse_color;
ATTRIBUTE vec2 texcoord0;
@@ -50,7 +51,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/class2/objects/fullbrightV.glsl b/indra/newview/app_settings/shaders/class2/objects/fullbrightV.glsl
index 2fd22cee9d..09dbd0b6cd 100644
--- a/indra/newview/app_settings/shaders/class2/objects/fullbrightV.glsl
+++ b/indra/newview/app_settings/shaders/class2/objects/fullbrightV.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 vec2 texcoord0;
ATTRIBUTE vec3 normal;
ATTRIBUTE vec4 diffuse_color;
@@ -44,7 +45,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);
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
diff --git a/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl b/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl
index 472ff219e5..86c592ea57 100644
--- a/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl
+++ b/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl
@@ -29,7 +29,8 @@ uniform mat4 texture_matrix1;
uniform mat4 modelview_matrix;
uniform mat4 modelview_projection_matrix;
-ATTRIBUTE vec4 position;
+ATTRIBUTE vec3 position;
+ATTRIBUTE float texture_index;
ATTRIBUTE vec2 texcoord0;
ATTRIBUTE vec3 normal;
ATTRIBUTE vec4 diffuse_color;
@@ -51,7 +52,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/class2/objects/simpleV.glsl b/indra/newview/app_settings/shaders/class2/objects/simpleV.glsl
index 144336417e..8e8f0664b0 100644
--- a/indra/newview/app_settings/shaders/class2/objects/simpleV.glsl
+++ b/indra/newview/app_settings/shaders/class2/objects/simpleV.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 vec2 texcoord0;
ATTRIBUTE vec3 normal;
ATTRIBUTE vec4 diffuse_color;
@@ -45,7 +46,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);
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0, 0, 1)).xy;