diff options
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/interface')
20 files changed, 130 insertions, 53 deletions
| diff --git a/indra/newview/app_settings/shaders/class1/interface/customalphaF.glsl b/indra/newview/app_settings/shaders/class1/interface/customalphaF.glsl index 27c63fdc8b..66f3e1ae11 100644 --- a/indra/newview/app_settings/shaders/class1/interface/customalphaF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/customalphaF.glsl @@ -27,9 +27,12 @@ uniform sampler2D diffuseMap;  uniform float custom_alpha; +VARYING vec4 vertex_color; +VARYING vec2 vary_texcoord0; +  void main()   { -	vec4 color = gl_Color*texture2D(diffuseMap, gl_TexCoord[0].xy); +	vec4 color = vertex_color*texture2D(diffuseMap, vary_texcoord0.xy);  	color.a *= custom_alpha;  	gl_FragColor = color;  } diff --git a/indra/newview/app_settings/shaders/class1/interface/customalphaV.glsl b/indra/newview/app_settings/shaders/class1/interface/customalphaV.glsl index 5bbc7deff0..890474d6d8 100644 --- a/indra/newview/app_settings/shaders/class1/interface/customalphaV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/customalphaV.glsl @@ -25,15 +25,17 @@  uniform mat4 modelview_projection_matrix; -attribute vec3 position; -attribute vec4 diffuse_color; -attribute vec2 texcoord0; +ATTRIBUTE vec3 position; +ATTRIBUTE vec4 diffuse_color; +ATTRIBUTE vec2 texcoord0; +VARYING vec4 vertex_color; +VARYING vec2 vary_texcoord0;  void main()  {  	gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); -	gl_TexCoord[0] = vec4(texcoord0,0,1); -	gl_FrontColor = diffuse_color; +	vary_texcoord0 = texcoord0; +	vertex_color = diffuse_color;  } diff --git a/indra/newview/app_settings/shaders/class1/interface/debugV.glsl b/indra/newview/app_settings/shaders/class1/interface/debugV.glsl index cd3d090e52..f4d704577a 100644 --- a/indra/newview/app_settings/shaders/class1/interface/debugV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/debugV.glsl @@ -25,7 +25,7 @@  uniform mat4 modelview_projection_matrix; -attribute vec3 position; +ATTRIBUTE vec3 position;  void main()  { diff --git a/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl b/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl index b8963e1dec..caff5fc324 100644 --- a/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineF.glsl @@ -28,8 +28,11 @@  uniform sampler2D glowMap;  uniform sampler2DRect screenMap; +VARYING vec2 vary_texcoord0; +VARYING vec2 vary_texcoord1; +  void main()   { -	gl_FragColor = texture2D(glowMap, gl_TexCoord[0].xy) + -					texture2DRect(screenMap, gl_TexCoord[1].xy); +	gl_FragColor = texture2D(glowMap, vary_texcoord0.xy) + +					texture2DRect(screenMap, vary_texcoord1.xy);  } diff --git a/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl b/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl index 6639f88047..3e972f0cb4 100644 --- a/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAF.glsl @@ -1,7 +1,25 @@  /**    * @file glowcombineFXAAF.glsl   * - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ + * $LicenseInfo:firstyear=2005&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2005, Linden Research, Inc. + *  + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + *  + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU + * Lesser General Public License for more details. + *  + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA + *  + * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ @@ -11,7 +29,7 @@ uniform sampler2D glowMap;  uniform sampler2DRect screenMap;  uniform vec2 screen_res; -varying vec2 vary_tc; +VARYING vec2 vary_tc;  void main()   { diff --git a/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAV.glsl b/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAV.glsl index bd5dd6046b..058f3b1b82 100644 --- a/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineFXAAV.glsl @@ -25,9 +25,9 @@  uniform mat4 modelview_projection_matrix; -attribute vec3 position; +ATTRIBUTE vec3 position; -varying vec2 vary_tc; +VARYING vec2 vary_tc;  void main()  { diff --git a/indra/newview/app_settings/shaders/class1/interface/glowcombineV.glsl b/indra/newview/app_settings/shaders/class1/interface/glowcombineV.glsl index 94edbe5ab1..f7970b7f78 100644 --- a/indra/newview/app_settings/shaders/class1/interface/glowcombineV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/glowcombineV.glsl @@ -25,14 +25,17 @@  uniform mat4 modelview_projection_matrix; -attribute vec3 position; -attribute vec2 texcoord0; -attribute vec2 texcoord1; +ATTRIBUTE vec3 position; +ATTRIBUTE vec2 texcoord0; +ATTRIBUTE vec2 texcoord1; + +VARYING vec2 vary_texcoord0; +VARYING vec2 vary_texcoord1;  void main()  {  	gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); -	gl_TexCoord[0] = vec4(texcoord0,0,1); -	gl_TexCoord[1] = vec4(texcoord1,0,1); +	vary_texcoord0 = texcoord0; +	vary_texcoord1 = texcoord1;  } diff --git a/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl b/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl index 3a48205101..1d37b97bf1 100644 --- a/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/highlightF.glsl @@ -27,7 +27,9 @@  uniform vec4 color;  uniform sampler2D diffuseMap; +VARYING vec2 vary_texcoord0; +  void main()   { -	gl_FragColor = color*texture2D(diffuseMap, gl_TexCoord[0].xy); +	gl_FragColor = color*texture2D(diffuseMap, vary_texcoord0.xy);  } diff --git a/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl b/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl index 6bb5affd93..9bf7b60eb7 100644 --- a/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl @@ -26,13 +26,15 @@  uniform mat4 texture_matrix0;  uniform mat4 modelview_projection_matrix; -attribute vec3 position; -attribute vec2 texcoord0; +ATTRIBUTE vec3 position; +ATTRIBUTE vec2 texcoord0; + +VARYING vec2 vary_texcoord0;  void main()  {  	//transform vertex  	gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); -	gl_TexCoord[0] = texture_matrix0 * vec4(texcoord0,0,1); +	vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;  } diff --git a/indra/newview/app_settings/shaders/class1/interface/occlusionV.glsl b/indra/newview/app_settings/shaders/class1/interface/occlusionV.glsl index 43dcd5dbe2..c26fa08ddc 100644 --- a/indra/newview/app_settings/shaders/class1/interface/occlusionV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/occlusionV.glsl @@ -25,7 +25,7 @@  uniform mat4 modelview_projection_matrix; -attribute vec3 position; +ATTRIBUTE vec3 position;  void main()  { diff --git a/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorF.glsl b/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorF.glsl index a5442c9bf4..d860106305 100644 --- a/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorF.glsl @@ -1,13 +1,33 @@  /**    * @file onetexturenocolorF.glsl   * - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ + * $LicenseInfo:firstyear=2005&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2005, Linden Research, Inc. + *  + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + *  + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU + * Lesser General Public License for more details. + *  + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA + *  + * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */  uniform sampler2D tex0; +VARYING vec2 vary_texcoord0; +  void main()   { -	gl_FragColor = texture2D(tex0, gl_TexCoord[0].xy); +	gl_FragColor = texture2D(tex0, vary_texcoord0.xy);  } diff --git a/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorV.glsl b/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorV.glsl index 615412c7a2..6b9986c8d7 100644 --- a/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/onetexturenocolorV.glsl @@ -25,13 +25,14 @@  uniform mat4 modelview_projection_matrix; -attribute vec3 position; -attribute vec2 texcoord0; +ATTRIBUTE vec3 position; +ATTRIBUTE vec2 texcoord0; +VARYING vec2 vary_texcoord0;  void main()  {  	gl_Position = modelview_projection_matrix * vec4(position, 1); -	gl_TexCoord[0] = vec4(texcoord0,0,1); +	vary_texcoord0 = texcoord0;  } diff --git a/indra/newview/app_settings/shaders/class1/interface/solidcolorF.glsl b/indra/newview/app_settings/shaders/class1/interface/solidcolorF.glsl index b1d2b949ac..a25c9a08fb 100644 --- a/indra/newview/app_settings/shaders/class1/interface/solidcolorF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/solidcolorF.glsl @@ -25,9 +25,12 @@  uniform sampler2D tex0; +VARYING vec4 vertex_color; +VARYING vec2 vary_texcoord0; +  void main()   { -	float alpha = texture2D(tex0, gl_TexCoord[0].xy).a * gl_Color.a; +	float alpha = texture2D(tex0, vary_texcoord0.xy).a * vertex_color.a; -	gl_FragColor = vec4(gl_Color.rgb, alpha); +	gl_FragColor = vec4(vertex_color.rgb, alpha);  } diff --git a/indra/newview/app_settings/shaders/class1/interface/solidcolorV.glsl b/indra/newview/app_settings/shaders/class1/interface/solidcolorV.glsl index 45e6a9febc..c58f9dfdaf 100644 --- a/indra/newview/app_settings/shaders/class1/interface/solidcolorV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/solidcolorV.glsl @@ -25,14 +25,17 @@  uniform mat4 modelview_projection_matrix; -attribute vec3 position; -attribute vec4 diffuse_color; -attribute vec2 texcoord0; +ATTRIBUTE vec3 position; +ATTRIBUTE vec4 diffuse_color; +ATTRIBUTE vec2 texcoord0; + +VARYING vec4 vertex_color; +VARYING vec2 vary_texcoord0;  void main()  {  	gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); -	gl_FrontColor = diffuse_color; -	gl_TexCoord[0] = vec4(texcoord0,0,1); +	vertex_color = diffuse_color; +	vary_texcoord0 = texcoord0;  } diff --git a/indra/newview/app_settings/shaders/class1/interface/splattexturerectF.glsl b/indra/newview/app_settings/shaders/class1/interface/splattexturerectF.glsl index c263f4dc6a..9a295ce9f2 100644 --- a/indra/newview/app_settings/shaders/class1/interface/splattexturerectF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/splattexturerectF.glsl @@ -27,7 +27,10 @@  uniform sampler2DRect screenMap; +VARYING vec4 vertex_color; +VARYING vec2 vary_texcoord0; +  void main()   { -	gl_FragColor = 	texture2DRect(screenMap, gl_TexCoord[0].xy) * gl_Color; +	gl_FragColor = 	texture2DRect(screenMap, vary_texcoord0.xy) * vertex_color;  } diff --git a/indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl b/indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl index 2b471d99e8..641d670c26 100644 --- a/indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/splattexturerectV.glsl @@ -25,14 +25,17 @@  uniform mat4 modelview_projection_matrix; -attribute vec3 position; -attribute vec2 texcoord0; -attribute vec4 diffuse_color; +ATTRIBUTE vec3 position; +ATTRIBUTE vec2 texcoord0; +ATTRIBUTE vec4 diffuse_color; + +VARYING vec4 vertex_color; +VARYING vec2 vary_texcoord0;  void main()  {  	gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); -	gl_TexCoord[0] = vec4(texcoord0,0,1); -	gl_FrontColor = diffuse_color; +	vary_texcoord0 = texcoord0; +	vertex_color = diffuse_color;  } diff --git a/indra/newview/app_settings/shaders/class1/interface/twotextureaddF.glsl b/indra/newview/app_settings/shaders/class1/interface/twotextureaddF.glsl index 3408cc44f8..3ded949943 100644 --- a/indra/newview/app_settings/shaders/class1/interface/twotextureaddF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/twotextureaddF.glsl @@ -26,7 +26,10 @@  uniform sampler2D tex0;  uniform sampler2D tex1; +VARYING vec2 vary_texcoord0; +VARYING vec2 vary_texcoord1; +  void main()   { -	gl_FragColor = texture2D(tex0, gl_TexCoord[0].xy)+texture2D(tex1, gl_TexCoord[1].xy); +	gl_FragColor = texture2D(tex0, vary_texcoord0.xy)+texture2D(tex1, vary_texcoord1.xy);  } diff --git a/indra/newview/app_settings/shaders/class1/interface/twotextureaddV.glsl b/indra/newview/app_settings/shaders/class1/interface/twotextureaddV.glsl index 2a36feaa21..3c2f297f7f 100644 --- a/indra/newview/app_settings/shaders/class1/interface/twotextureaddV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/twotextureaddV.glsl @@ -25,14 +25,17 @@  uniform mat4 modelview_projection_matrix; -attribute vec3 position; -attribute vec2 texcoord0; -attribute vec2 texcoord1; +ATTRIBUTE vec3 position; +ATTRIBUTE vec2 texcoord0; +ATTRIBUTE vec2 texcoord1; + +VARYING vec2 vary_texcoord0; +VARYING vec2 vary_texcoord1;  void main()  {  	gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); -	gl_TexCoord[0] = vec4(texcoord0,0,1); -	gl_TexCoord[1] = vec4(texcoord1,0,1); +	vary_texcoord0 = texcoord0; +	vary_texcoord1 = texcoord1;  } diff --git a/indra/newview/app_settings/shaders/class1/interface/uiF.glsl b/indra/newview/app_settings/shaders/class1/interface/uiF.glsl index 7694056b08..2602e489c8 100644 --- a/indra/newview/app_settings/shaders/class1/interface/uiF.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/uiF.glsl @@ -25,7 +25,10 @@  uniform sampler2D diffuseMap; +VARYING vec2 vary_texcoord0; +VARYING vec4 vertex_color; +  void main()   { -	gl_FragColor = gl_Color*texture2D(diffuseMap, gl_TexCoord[0].xy); +	gl_FragColor = vertex_color*texture2D(diffuseMap, vary_texcoord0.xy);  } diff --git a/indra/newview/app_settings/shaders/class1/interface/uiV.glsl b/indra/newview/app_settings/shaders/class1/interface/uiV.glsl index a9e42a432f..220dafef25 100644 --- a/indra/newview/app_settings/shaders/class1/interface/uiV.glsl +++ b/indra/newview/app_settings/shaders/class1/interface/uiV.glsl @@ -26,15 +26,17 @@  uniform mat4 texture_matrix0;  uniform mat4 modelview_projection_matrix; -attribute vec3 position; -attribute vec4 diffuse_color; -attribute vec2 texcoord0; +ATTRIBUTE vec3 position; +ATTRIBUTE vec4 diffuse_color; +ATTRIBUTE vec2 texcoord0; +VARYING vec4 vertex_color; +VARYING vec2 vary_texcoord0;  void main()  {  	gl_Position = modelview_projection_matrix * vec4(position, 1); -	gl_TexCoord[0] =  texture_matrix0 * vec4(texcoord0,0,1); -	gl_FrontColor = diffuse_color; +	vary_texcoord0 =  (texture_matrix0 * vec4(texcoord0,0,1)).xy; +	vertex_color = diffuse_color;  } | 
