summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl17
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl10
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl7
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl6
4 files changed, 13 insertions, 27 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index 94ce8a658a..495ed33e9e 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -35,16 +35,10 @@ out vec4 frag_color;
#define frag_color gl_FragColor
#endif
-uniform sampler2DRect depthMap;
-
#if INDEX_MODE != INDEXED
uniform sampler2D diffuseMap;
#endif
-#if INDEX_MODE == INDEXED
-vec4 diffuseLookup(vec2 texcoord);
-#endif
-
uniform vec2 screen_res;
vec3 atmosLighting(vec3 light);
@@ -57,27 +51,16 @@ VARYING vec3 vary_position;
VARYING vec3 vary_pointlight_col;
VARYING vec2 vary_texcoord0;
VARYING vec3 vary_norm;
-VARYING mat3 vary_rotation;
#if INDEX_MODE != NON_INDEXED_NO_COLOR
VARYING vec4 vertex_color;
#endif
-uniform mat4 inv_proj;
-
uniform vec4 light_position[8];
uniform vec3 light_direction[8];
uniform vec3 light_attenuation[8];
uniform vec3 light_diffuse[8];
-uniform samplerCube environmentMap;
-uniform mat3 env_mat;
-
-uniform vec4 specular_color;
-
-
-uniform float shadow_offset;
-
vec3 calcDirectionalLight(vec3 n, vec3 l)
{
float a = pow(max(dot(n,l),0.0), 0.7);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
index 76277069d5..4c26621a88 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl
@@ -38,7 +38,9 @@ ATTRIBUTE vec3 position;
void passTextureIndex();
#endif
ATTRIBUTE vec3 normal;
+#if INDEX_MODE != NON_INDEXED_NO_COLOR
ATTRIBUTE vec4 diffuse_color;
+#endif
ATTRIBUTE vec2 texcoord0;
#if HAS_SKIN
@@ -72,8 +74,6 @@ VARYING vec2 vary_texcoord0;
VARYING vec3 vary_norm;
uniform float near_clip;
-uniform float shadow_offset;
-uniform float shadow_bias;
uniform vec4 light_position[8];
uniform vec3 light_direction[8];
@@ -162,9 +162,13 @@ void main()
#endif
vary_norm = norm;
-
+ vary_position = pos.xyz;
+
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);
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
index c765962352..76a045a3bb 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaF.glsl
@@ -56,10 +56,7 @@ VARYING vec3 vary_fragcoord;
VARYING vec3 vary_position;
VARYING vec3 vary_pointlight_col;
VARYING vec2 vary_texcoord0;
-VARYING vec2 vary_texcoord1;
-VARYING vec2 vary_texcoord2;
VARYING vec3 vary_norm;
-VARYING mat3 vary_rotation;
#if INDEX_MODE != NON_INDEXED_NO_COLOR
VARYING vec4 vertex_color;
@@ -69,15 +66,11 @@ uniform mat4 shadow_matrix[6];
uniform vec4 shadow_clip;
uniform float shadow_bias;
-uniform mat4 inv_proj;
-
uniform vec4 light_position[8];
uniform vec3 light_direction[8];
uniform vec3 light_attenuation[8];
uniform vec3 light_diffuse[8];
-uniform vec4 specular_color;
-
vec3 calcDirectionalLight(vec3 n, vec3 l)
{
float a = pow(max(dot(n,l),0.0), 0.7);
diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl
index 63953b37bf..44abbdfe54 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl
@@ -38,7 +38,9 @@ ATTRIBUTE vec3 position;
void passTextureIndex();
#endif
ATTRIBUTE vec3 normal;
+#if INDEX_MODE != NON_INDEXED_NO_COLOR
ATTRIBUTE vec4 diffuse_color;
+#endif
ATTRIBUTE vec2 texcoord0;
#if HAS_SKIN
@@ -167,6 +169,10 @@ void main()
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);