summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/objects
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-09-28 00:41:10 -0500
committerDave Parks <davep@lindenlab.com>2011-09-28 00:41:10 -0500
commit348a70181211b8fe37c569f8b3fb8324cc8c59ea (patch)
tree4b3e5ad42d549879c319bcf7e3fdfc0b60076dc9 /indra/newview/app_settings/shaders/class2/objects
parent554b14dedac5a51927bad57b475d8f5a571c1add (diff)
SH-2507 Shave some unused/redundant varying state and make the max texture index debug setting rebuild shaders to use no flow control when set to 1 or lower
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/objects')
-rw-r--r--indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl10
-rw-r--r--indra/newview/app_settings/shaders/class2/objects/fullbrightV.glsl10
-rw-r--r--indra/newview/app_settings/shaders/class2/objects/shinyV.glsl11
-rw-r--r--indra/newview/app_settings/shaders/class2/objects/simpleNonIndexedV.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class2/objects/simpleV.glsl10
5 files changed, 19 insertions, 26 deletions
diff --git a/indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl b/indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl
index 580ef2694f..34bd8d445a 100644
--- a/indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl
+++ b/indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl
@@ -34,10 +34,10 @@ void calcAtmospherics(vec3 inPositionEye);
uniform vec4 origin;
-VARYING float vary_texture_index;
+
ATTRIBUTE vec3 position;
-ATTRIBUTE float texture_index;
+void passTextureIndex();
ATTRIBUTE vec3 normal;
ATTRIBUTE vec4 diffuse_color;
ATTRIBUTE vec2 texcoord0;
@@ -45,13 +45,13 @@ ATTRIBUTE vec2 texcoord0;
VARYING vec4 vertex_color;
VARYING vec2 vary_texcoord0;
VARYING vec3 vary_texcoord1;
-VARYING float fog_depth;
+
void main()
{
//transform vertex
vec4 vert = vec4(position.xyz,1.0);
- vary_texture_index = texture_index;
+ passTextureIndex();
vec4 pos = (modelview_matrix * vert);
gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
@@ -64,6 +64,4 @@ void main()
calcAtmospherics(pos.xyz);
vertex_color = diffuse_color;
-
- fog_depth = pos.z;
}
diff --git a/indra/newview/app_settings/shaders/class2/objects/fullbrightV.glsl b/indra/newview/app_settings/shaders/class2/objects/fullbrightV.glsl
index 09dbd0b6cd..fc20d3270e 100644
--- a/indra/newview/app_settings/shaders/class2/objects/fullbrightV.glsl
+++ b/indra/newview/app_settings/shaders/class2/objects/fullbrightV.glsl
@@ -28,7 +28,7 @@ uniform mat4 modelview_matrix;
uniform mat4 modelview_projection_matrix;
ATTRIBUTE vec3 position;
-ATTRIBUTE float texture_index;
+void passTextureIndex();
ATTRIBUTE vec2 texcoord0;
ATTRIBUTE vec3 normal;
ATTRIBUTE vec4 diffuse_color;
@@ -36,16 +36,16 @@ ATTRIBUTE vec4 diffuse_color;
void calcAtmospherics(vec3 inPositionEye);
-VARYING float vary_texture_index;
+
VARYING vec4 vertex_color;
VARYING vec2 vary_texcoord0;
-VARYING float fog_depth;
+
void main()
{
//transform vertex
vec4 vert = vec4(position.xyz,1.0);
- vary_texture_index = texture_index;
+ passTextureIndex();
vec4 pos = (modelview_matrix * vert);
gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
@@ -54,5 +54,5 @@ void main()
vertex_color = diffuse_color;
- fog_depth = pos.z;
+
}
diff --git a/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl b/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl
index 86c592ea57..fdb3453cc5 100644
--- a/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl
+++ b/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl
@@ -30,7 +30,7 @@ uniform mat4 modelview_matrix;
uniform mat4 modelview_projection_matrix;
ATTRIBUTE vec3 position;
-ATTRIBUTE float texture_index;
+void passTextureIndex();
ATTRIBUTE vec2 texcoord0;
ATTRIBUTE vec3 normal;
ATTRIBUTE vec4 diffuse_color;
@@ -43,16 +43,13 @@ vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
void calcAtmospherics(vec3 inPositionEye);
-VARYING float vary_texture_index;
-VARYING float fog_depth;
-
uniform vec4 origin;
void main()
{
//transform vertex
vec4 vert = vec4(position.xyz,1.0);
- vary_texture_index = texture_index;
+ passTextureIndex();
vec4 pos = (modelview_matrix * vert);
gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
@@ -64,7 +61,5 @@ void main()
calcAtmospherics(pos.xyz);
- vertex_color = calcLighting(pos.xyz, norm, diffuse_color, vec4(0.0));
-
- fog_depth = pos.z;
+ vertex_color = calcLighting(pos.xyz, norm, diffuse_color, vec4(0.0));
}
diff --git a/indra/newview/app_settings/shaders/class2/objects/simpleNonIndexedV.glsl b/indra/newview/app_settings/shaders/class2/objects/simpleNonIndexedV.glsl
index 6799e43b9a..cb80697d15 100644
--- a/indra/newview/app_settings/shaders/class2/objects/simpleNonIndexedV.glsl
+++ b/indra/newview/app_settings/shaders/class2/objects/simpleNonIndexedV.glsl
@@ -35,7 +35,7 @@ ATTRIBUTE vec4 diffuse_color;
VARYING vec4 vertex_color;
VARYING vec2 vary_texcoord0;
-VARYING float fog_depth;
+
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
void calcAtmospherics(vec3 inPositionEye);
@@ -57,5 +57,5 @@ void main()
vec4 color = calcLighting(pos.xyz, norm, diffuse_color, vec4(0.));
vertex_color = color;
- fog_depth = pos.z;
+
}
diff --git a/indra/newview/app_settings/shaders/class2/objects/simpleV.glsl b/indra/newview/app_settings/shaders/class2/objects/simpleV.glsl
index 8e8f0664b0..37a20383e2 100644
--- a/indra/newview/app_settings/shaders/class2/objects/simpleV.glsl
+++ b/indra/newview/app_settings/shaders/class2/objects/simpleV.glsl
@@ -29,7 +29,7 @@ uniform mat4 modelview_matrix;
uniform mat4 modelview_projection_matrix;
ATTRIBUTE vec3 position;
-ATTRIBUTE float texture_index;
+void passTextureIndex();
ATTRIBUTE vec2 texcoord0;
ATTRIBUTE vec3 normal;
ATTRIBUTE vec4 diffuse_color;
@@ -37,16 +37,16 @@ ATTRIBUTE vec4 diffuse_color;
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
void calcAtmospherics(vec3 inPositionEye);
-VARYING float vary_texture_index;
+
VARYING vec4 vertex_color;
VARYING vec2 vary_texcoord0;
-VARYING float fog_depth;
+
void main()
{
//transform vertex
vec4 vert = vec4(position.xyz,1.0);
- vary_texture_index = texture_index;
+ passTextureIndex();
vec4 pos = (modelview_matrix * vert);
gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0, 0, 1)).xy;
@@ -60,5 +60,5 @@ void main()
vec4 color = calcLighting(pos.xyz, norm, diffuse_color, vec4(0.));
vertex_color = color;
- fog_depth = pos.z;
+
}