summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl
diff options
context:
space:
mode:
authorGeenz <geenz@geenzo.com>2013-04-18 23:11:38 -0400
committerGeenz <geenz@geenzo.com>2013-04-18 23:11:38 -0400
commit9e53724538d61e6e53f5bf56e01760d59b54f690 (patch)
treeac494bb773e15f5b59bb3a6fffac0a5f913ce40b /indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl
parentb6a6479c372e311b45e27eafd368e2045ca21790 (diff)
parent509c35d5bae7dbd938198c3e038011932693ff36 (diff)
Merged with latest viewer-development-materials.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl24
1 files changed, 7 insertions, 17 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl
index db5e5620dc..46fd8da4f8 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl
@@ -38,12 +38,10 @@ ATTRIBUTE vec3 position;
void passTextureIndex();
#endif
ATTRIBUTE vec3 normal;
+#if INDEX_MODE != NON_INDEXED_NO_COLOR
ATTRIBUTE vec4 diffuse_color;
+#endif
ATTRIBUTE vec2 texcoord0;
-ATTRIBUTE vec3 binormal;
-ATTRIBUTE vec2 texcoord1;
-ATTRIBUTE vec2 texcoord2;
-
#if HAS_SKIN
mat4 getObjectSkinnedTransform();
@@ -72,11 +70,8 @@ VARYING vec4 vertex_color;
#endif
VARYING vec2 vary_texcoord0;
-VARYING vec2 vary_texcoord1;
-VARYING vec2 vary_texcoord2;
VARYING vec3 vary_norm;
-VARYING mat3 vary_rotation;
uniform float near_clip;
uniform float shadow_offset;
@@ -160,8 +155,7 @@ void main()
pos = (modelview_matrix * vert);
gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
#endif
- vary_texcoord1 = (texture_matrix0 * vec4(texcoord1,0,1)).xy;
- vary_texcoord2 = (texture_matrix0 * vec4(texcoord2,0,1)).xy;
+
#if INDEX_MODE == INDEXED
passTextureIndex();
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
@@ -173,16 +167,12 @@ void main()
float dp_directional_light = max(0.0, dot(norm, light_position[0].xyz));
vary_position = pos.xyz + light_position[0].xyz * (1.0-dp_directional_light)*shadow_offset;
- vec3 n = norm;
- vec3 b = normalize(normal_matrix * binormal);
- vec3 t = cross(b, n);
-
- vary_rotation[0] = vec3(t.x, b.x, n.x);
- vary_rotation[1] = vec3(t.y, b.y, n.y);
- vary_rotation[2] = vec3(t.z, b.z, n.z);
-
calcAtmospherics(pos.xyz);
+#if INDEX_MODE == NON_INDEXED_NO_COLOR
+ vec4 diffuse_color = vec4(1,1,1,1);
+#endif
+
//vec4 color = calcLighting(pos.xyz, norm, diffuse_color, vec4(0.));
vec4 col = vec4(0.0, 0.0, 0.0, diffuse_color.a);