diff options
| author | Dave Parks <davep@lindenlab.com> | 2011-09-28 00:41:10 -0500 | 
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2011-09-28 00:41:10 -0500 | 
| commit | 348a70181211b8fe37c569f8b3fb8324cc8c59ea (patch) | |
| tree | 4b3e5ad42d549879c319bcf7e3fdfc0b60076dc9 /indra/newview/app_settings/shaders/class1/deferred | |
| parent | 554b14dedac5a51927bad57b475d8f5a571c1add (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/class1/deferred')
7 files changed, 24 insertions, 23 deletions
| diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl index 15781bc92d..b09441f7eb 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaSkinnedV.glsl @@ -49,7 +49,7 @@ 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; @@ -135,7 +135,7 @@ void main()  	vertex_color = col; -	fog_depth = pos.z; +	  	vary_fragcoord.xyz = frag_pos.xyz + vec3(0,0,near_clip);  } diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl index 74ee082bed..93b1a114db 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaV.glsl @@ -29,7 +29,7 @@ uniform mat4 modelview_matrix;  uniform mat4 modelview_projection_matrix;  ATTRIBUTE vec3 position; -ATTRIBUTE float texture_index; +void passTextureIndex();  ATTRIBUTE vec3 normal;  ATTRIBUTE vec4 diffuse_color;  ATTRIBUTE vec2 texcoord0; @@ -50,10 +50,10 @@ VARYING vec3 vary_fragcoord;  VARYING vec3 vary_position;  VARYING vec3 vary_light;  VARYING vec3 vary_pointlight_col; -VARYING float vary_texture_index; +  VARYING vec4 vertex_color;  VARYING vec2 vary_texcoord0; -VARYING float fog_depth; +  uniform float near_clip;  uniform float shadow_offset; @@ -98,7 +98,7 @@ 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); @@ -138,7 +138,7 @@ void main()  	vertex_color = col; -	fog_depth = pos.z; +	  	pos = modelview_projection_matrix * vert;  	vary_fragcoord.xyz = pos.xyz + vec3(0,0,near_clip); diff --git a/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl b/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl index 12e88ca5dd..acbc3f7e15 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/avatarAlphaV.glsl @@ -48,7 +48,7 @@ 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; @@ -137,7 +137,7 @@ void main()  	vertex_color = col; -	fog_depth = pos.z; +	  	vary_fragcoord.xyz = frag_pos.xyz + vec3(0,0,near_clip);  } diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseNoColorV.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseNoColorV.glsl index 7ed41cbcb9..9461e3e32e 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/diffuseNoColorV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseNoColorV.glsl @@ -32,7 +32,7 @@ ATTRIBUTE vec3 normal;  ATTRIBUTE vec2 texcoord0;  VARYING vec3 vary_normal; -VARYING float vary_texture_index; +  VARYING vec2 vary_texcoord0;  void main() diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl index 908f3abcd0..76d29b1df7 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl @@ -28,23 +28,24 @@ uniform mat4 texture_matrix0;  uniform mat4 modelview_projection_matrix;  ATTRIBUTE vec3 position; -ATTRIBUTE float texture_index;  ATTRIBUTE vec4 diffuse_color;  ATTRIBUTE vec3 normal;  ATTRIBUTE vec2 texcoord0;  VARYING vec3 vary_normal; -VARYING float vary_texture_index; +  VARYING vec4 vertex_color;  VARYING vec2 vary_texcoord0; +void passTextureIndex(); +  void main()  {  	//transform vertex  	gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);   	vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; -	vary_texture_index = texture_index; +	passTextureIndex();  	vary_normal = normalize(normal_matrix * normal);  	vertex_color = diffuse_color; diff --git a/indra/newview/app_settings/shaders/class1/deferred/emissiveV.glsl b/indra/newview/app_settings/shaders/class1/deferred/emissiveV.glsl index 7b108e4562..115b04797f 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/emissiveV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/emissiveV.glsl @@ -28,7 +28,7 @@ uniform mat4 modelview_matrix;  uniform mat4 modelview_projection_matrix;  ATTRIBUTE vec3 position; -ATTRIBUTE float texture_index; +void passTextureIndex();  ATTRIBUTE vec4 emissive;  ATTRIBUTE vec2 texcoord0; @@ -39,17 +39,17 @@ vec3 atmosAffectDirectionalLight(float lightIntensity);  vec3 scaleDownLight(vec3 light);  vec3 scaleUpLight(vec3 light); -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);  	vec4 pos = (modelview_matrix * vert); -	vary_texture_index = texture_index; +	passTextureIndex();  	gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); @@ -59,5 +59,5 @@ void main()  	vertex_color = emissive; -	fog_depth = pos.z; +	  } diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl index ab638991f7..2e6982d101 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl @@ -29,7 +29,7 @@ uniform mat4 modelview_projection_matrix;  ATTRIBUTE vec3 position; -ATTRIBUTE float texture_index; +void passTextureIndex();  ATTRIBUTE vec4 diffuse_color;  ATTRIBUTE vec2 texcoord0; @@ -40,17 +40,17 @@ vec3 atmosAffectDirectionalLight(float lightIntensity);  vec3 scaleDownLight(vec3 light);  vec3 scaleUpLight(vec3 light); -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);  	vec4 pos = (modelview_matrix * vert); -	vary_texture_index = texture_index; +	passTextureIndex();  	gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); @@ -60,5 +60,5 @@ void main()  	vertex_color = diffuse_color; -	fog_depth = pos.z; +	  } | 
