summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl25
1 files changed, 14 insertions, 11 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl b/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl
index 0273f3c121..091a865160 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl
@@ -25,9 +25,9 @@
uniform mat4 projection_matrix;
-attribute vec3 position;
-attribute vec3 normal;
-attribute vec2 texcoord0;
+ATTRIBUTE vec3 position;
+ATTRIBUTE vec3 normal;
+ATTRIBUTE vec2 texcoord0;
vec4 calcLighting(vec3 pos, vec3 norm, vec4 color, vec4 baseCol);
mat4 getSkinnedTransform();
@@ -41,11 +41,14 @@ vec3 atmosAffectDirectionalLight(float lightIntensity);
vec3 scaleDownLight(vec3 light);
vec3 scaleUpLight(vec3 light);
-varying vec3 vary_position;
-varying vec3 vary_ambient;
-varying vec3 vary_directional;
-varying vec3 vary_fragcoord;
-varying vec3 vary_pointlight_col;
+VARYING vec3 vary_position;
+VARYING vec3 vary_ambient;
+VARYING vec3 vary_directional;
+VARYING vec3 vary_fragcoord;
+VARYING vec3 vary_pointlight_col;
+VARYING vec4 vertex_color;
+VARYING vec2 vary_texcoord0;
+VARYING float fog_depth;
uniform float near_clip;
uniform float shadow_offset;
@@ -88,7 +91,7 @@ float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, floa
void main()
{
- gl_TexCoord[0] = vec4(texcoord0,0,1);
+ vary_texcoord0 = texcoord0;
vec4 pos;
vec3 norm;
@@ -134,9 +137,9 @@ void main()
col.rgb = min(col.rgb, 1.0);
- gl_FrontColor = col;
+ vertex_color = col;
- gl_FogFragCoord = pos.z;
+ fog_depth = pos.z;
vary_fragcoord.xyz = pos.xyz + vec3(0,0,near_clip);
}