diff options
| author | Dave Parks <davep@lindenlab.com> | 2011-09-15 00:54:25 -0500 | 
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2011-09-15 00:54:25 -0500 | 
| commit | 530981a2149a74e1dc003cea1bbc9dc392fcae60 (patch) | |
| tree | f629a2dbc004d23e0f9f056366290e397ec51caf /indra/newview/app_settings/shaders/class2 | |
| parent | 7c95af74f195c9ec4ebc0fc0264d98cd4a85be49 (diff) | |
SH-2243 work in progress -- no more deprecated built-in matrix state when using shaders.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2')
17 files changed, 124 insertions, 59 deletions
| diff --git a/indra/newview/app_settings/shaders/class2/avatar/eyeballV.glsl b/indra/newview/app_settings/shaders/class2/avatar/eyeballV.glsl index c0065f0bbe..43e19909d4 100644 --- a/indra/newview/app_settings/shaders/class2/avatar/eyeballV.glsl +++ b/indra/newview/app_settings/shaders/class2/avatar/eyeballV.glsl @@ -22,7 +22,11 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +uniform mat3 normal_matrix; +uniform mat4 texture_matrix0; +uniform mat4 modelview_matrix; +uniform mat4 modelview_projection_matrix;  attribute vec3 position;  attribute vec4 diffuse_color; @@ -35,11 +39,11 @@ void calcAtmospherics(vec3 inPositionEye);  void main()  {  	//transform vertex -	vec3 pos = (gl_ModelViewMatrix * vec4(position.xyz, 1.0)).xyz; -	gl_Position = gl_ModelViewProjectionMatrix * vec4(position.xyz, 1.0); -	gl_TexCoord[0] = gl_TextureMatrix[0] * vec4(texcoord0,0,1); +	vec3 pos = (modelview_matrix * vec4(position.xyz, 1.0)).xyz; +	gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); +	gl_TexCoord[0] = texture_matrix0 * vec4(texcoord0,0,1); -	vec3 norm = normalize(gl_NormalMatrix * normal); +	vec3 norm = normalize(normal_matrix * normal);  	calcAtmospherics(pos.xyz); diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaSkinnedV.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaSkinnedV.glsl index 501fcb004b..df4d26997a 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaSkinnedV.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaSkinnedV.glsl @@ -21,6 +21,11 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ + +uniform mat4 projection_matrix; +uniform mat4 texture_matrix0; +uniform mat4 modelview_matrix; +uniform mat4 modelview_projection_matrix;  attribute vec3 position;  attribute vec3 normal; @@ -79,15 +84,15 @@ float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, floa  void main()  { -	gl_TexCoord[0] = gl_TextureMatrix[0] * vec4(texcoord0,0,1); +	gl_TexCoord[0] = texture_matrix0 * vec4(texcoord0,0,1);  	mat4 mat = getObjectSkinnedTransform(); -	mat = gl_ModelViewMatrix * mat; +	mat = modelview_matrix * mat;  	vec3 pos = (mat*vec4(position, 1.0)).xyz; -	gl_Position = gl_ProjectionMatrix * vec4(pos, 1.0); +	gl_Position = projection_matrix * vec4(pos, 1.0);  	vec4 n = vec4(position, 1.0);  	n.xyz += normal.xyz; @@ -128,7 +133,7 @@ void main()  	gl_FogFragCoord = pos.z; -	pos.xyz = (gl_ModelViewProjectionMatrix * vec4(position.xyz, 1.0)).xyz; +	pos.xyz = (modelview_projection_matrix * vec4(position.xyz, 1.0)).xyz;  	vary_fragcoord.xyz = pos.xyz + vec3(0,0,near_clip);  } diff --git a/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl b/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl index b0ae0107fb..996203ffd6 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/alphaV.glsl @@ -22,7 +22,12 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +uniform mat3 normal_matrix; +uniform mat4 texture_matrix0; +uniform mat4 modelview_matrix; +uniform mat4 modelview_projection_matrix; +  attribute vec4 position;  attribute vec3 normal;  attribute vec4 diffuse_color; @@ -84,12 +89,12 @@ void main()  	//transform vertex  	vec4 vert = vec4(position.xyz, 1.0);  	vary_texture_index = position.w; -	vec4 pos = (gl_ModelViewMatrix * vert); -	gl_Position = gl_ModelViewProjectionMatrix*vec4(position.xyz, 1.0); +	vec4 pos = (modelview_matrix * vert); +	gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); -	gl_TexCoord[0] = gl_TextureMatrix[0] * vec4(texcoord0,0,1); +	gl_TexCoord[0] = texture_matrix0 * vec4(texcoord0,0,1); -	vec3 norm = normalize(gl_NormalMatrix * normal); +	vec3 norm = normalize(normal_matrix * normal);  	float dp_directional_light = max(0.0, dot(norm, gl_LightSource[0].position.xyz));  	vary_position = pos.xyz + gl_LightSource[0].position.xyz * (1.0-dp_directional_light)*shadow_offset; @@ -123,7 +128,7 @@ void main()  	gl_FogFragCoord = pos.z; -	pos = gl_ModelViewProjectionMatrix * vert; +	pos = modelview_projection_matrix * vert;  	vary_fragcoord.xyz = pos.xyz + vec3(0,0,near_clip);  } diff --git a/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl b/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl index f35af53f95..3e35675784 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/avatarAlphaV.glsl @@ -23,6 +23,7 @@   * $/LicenseInfo$   */ +uniform mat4 projection_matrix;  attribute vec3 position;  attribute vec3 normal; @@ -99,7 +100,7 @@ void main()  	norm.z = dot(trans[2].xyz, normal);  	norm = normalize(norm); -	gl_Position = gl_ProjectionMatrix * pos; +	gl_Position = projection_matrix * pos;  	float dp_directional_light = max(0.0, dot(norm, gl_LightSource[0].position.xyz));  	vary_position = pos.xyz + gl_LightSource[0].position.xyz * (1.0-dp_directional_light)*shadow_offset; diff --git a/indra/newview/app_settings/shaders/class2/deferred/edgeV.glsl b/indra/newview/app_settings/shaders/class2/deferred/edgeV.glsl index 964f12afcf..1f5470db3c 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/edgeV.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/edgeV.glsl @@ -23,6 +23,7 @@   * $/LicenseInfo$   */ +uniform mat4 modelview_projection_matrix;  attribute vec3 position; @@ -32,7 +33,7 @@ uniform vec2 screen_res;  void main()  {  	//transform vertex -	vec4 pos = gl_ModelViewProjectionMatrix * vec4(position.xyz, 1.0); +	vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);  	gl_Position = pos;   	vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;  } diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightV.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightV.glsl index e52edcba41..424299269f 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/softenLightV.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightV.glsl @@ -22,7 +22,8 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +uniform mat4 modelview_projection_matrix;  attribute vec3 position; @@ -33,7 +34,7 @@ varying vec2 vary_fragcoord;  void main()  {  	//transform vertex -	vec4 pos = gl_ModelViewProjectionMatrix * vec4(position.xyz, 1.0); +	vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);  	gl_Position = pos;  diff --git a/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl b/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl index 2cf7375d4d..60ba2d7ad4 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/sunLightV.glsl @@ -22,7 +22,9 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +uniform mat4 modelview_projection_matrix; +  attribute vec3 position;  varying vec2 vary_fragcoord; @@ -32,7 +34,7 @@ uniform vec2 screen_res;  void main()  {  	//transform vertex -	vec4 pos = gl_ModelViewProjectionMatrix * vec4(position.xyz, 1.0); +	vec4 pos = modelview_projection_matrix * vec4(position.xyz, 1.0);  	gl_Position = pos;   	vary_fragcoord = (pos.xy * 0.5 + 0.5)*screen_res;	 diff --git a/indra/newview/app_settings/shaders/class2/effects/blurV.glsl b/indra/newview/app_settings/shaders/class2/effects/blurV.glsl index 556e131d34..4fd4b101ff 100644 --- a/indra/newview/app_settings/shaders/class2/effects/blurV.glsl +++ b/indra/newview/app_settings/shaders/class2/effects/blurV.glsl @@ -22,7 +22,8 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +uniform mat4 modelview_projection_matrix;  attribute vec3 position;  attribute vec2 texcoord0; @@ -34,7 +35,7 @@ uniform float blurWidth;  void main(void)  {  	// Transform vertex -	gl_Position = gl_ModelViewProjectionMatrix * vec4(position.xyz, 1.0); +	gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);  	vec2 blurDelta = texelSize * blurDirection * vec2(blurWidth, blurWidth);  	vec2 s = vec4(texcoord0,0,1).st - (blurDelta * 3.0); diff --git a/indra/newview/app_settings/shaders/class2/effects/drawQuadV.glsl b/indra/newview/app_settings/shaders/class2/effects/drawQuadV.glsl index fbb87b6578..d3c93ab05f 100644 --- a/indra/newview/app_settings/shaders/class2/effects/drawQuadV.glsl +++ b/indra/newview/app_settings/shaders/class2/effects/drawQuadV.glsl @@ -22,7 +22,8 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +uniform mat4 modelview_projection_matrix;  attribute vec3 position;  attribute vec2 texcoord0; @@ -32,7 +33,7 @@ attribute vec2 texcoord1;  void main(void)  {  	//transform vertex -	gl_Position = gl_ModelViewProjectionMatrix * vec4(position.xyz, 1.0); +	gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);  	gl_TexCoord[0] = vec4(texcoord0,0,1);  	gl_TexCoord[1] = vec4(texcoord1,0,1);  } diff --git a/indra/newview/app_settings/shaders/class2/environment/terrainV.glsl b/indra/newview/app_settings/shaders/class2/environment/terrainV.glsl index 1a7edbd61b..69f4d4ae45 100644 --- a/indra/newview/app_settings/shaders/class2/environment/terrainV.glsl +++ b/indra/newview/app_settings/shaders/class2/environment/terrainV.glsl @@ -22,7 +22,11 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +uniform mat3 normal_matrix; +uniform mat4 texture_matrix0; +uniform mat4 modelview_matrix; +uniform mat4 modelview_projection_matrix;  attribute vec3 position;  attribute vec3 normal; @@ -52,10 +56,10 @@ vec4 texgen_object(vec4  vpos, vec4 tc, mat4 mat, vec4 tp0, vec4 tp1)  void main()  {  	//transform vertex -	gl_Position = gl_ModelViewProjectionMatrix * vec4(position.xyz, 1.0); +	gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0); -	vec4 pos = gl_ModelViewMatrix * vec4(position.xyz, 1.0); -	vec3 norm = normalize(gl_NormalMatrix * normal); +	vec4 pos = modelview_matrix * vec4(position.xyz, 1.0); +	vec3 norm = normalize(normal_matrix * normal);  	calcAtmospherics(pos.xyz); @@ -67,7 +71,7 @@ void main()  	gl_FrontColor = color;  	// Transform and pass tex coords - 	gl_TexCoord[0].xy = texgen_object(vec4(position.xyz, 1.0), vec4(texcoord0,0,1), gl_TextureMatrix[0], gl_ObjectPlaneS[0], gl_ObjectPlaneT[0]).xy; + 	gl_TexCoord[0].xy = texgen_object(vec4(position.xyz, 1.0), vec4(texcoord0,0,1), texture_matrix0, gl_ObjectPlaneS[0], gl_ObjectPlaneT[0]).xy;  	vec4 t = vec4(texcoord1,0,1); diff --git a/indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl b/indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl index 8a88957659..b9eff87a13 100644 --- a/indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl +++ b/indra/newview/app_settings/shaders/class2/objects/fullbrightShinyV.glsl @@ -22,7 +22,12 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +uniform mat3 normal_matrix; +uniform mat4 texture_matrix0; +uniform mat4 texture_matrix1; +uniform mat4 modelview_matrix; +uniform mat4 modelview_projection_matrix;  void calcAtmospherics(vec3 inPositionEye); @@ -41,14 +46,14 @@ void main()  	//transform vertex  	vec4 vert = vec4(position.xyz,1.0);  	vary_texture_index = position.w; -	vec4 pos = (gl_ModelViewMatrix * vert); -	gl_Position = gl_ModelViewProjectionMatrix*vec4(position.xyz, 1.0); +	vec4 pos = (modelview_matrix * vert); +	gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); -	vec3 norm = normalize(gl_NormalMatrix * normal); +	vec3 norm = normalize(normal_matrix * normal);  	vec3 ref = reflect(pos.xyz, -norm); -	gl_TexCoord[0] = gl_TextureMatrix[0] * vec4(texcoord0,0,1); -	gl_TexCoord[1] = gl_TextureMatrix[1]*vec4(ref,1.0); +	gl_TexCoord[0] = texture_matrix0 * vec4(texcoord0,0,1); +	gl_TexCoord[1] = texture_matrix1*vec4(ref,1.0);  	calcAtmospherics(pos.xyz); diff --git a/indra/newview/app_settings/shaders/class2/objects/fullbrightV.glsl b/indra/newview/app_settings/shaders/class2/objects/fullbrightV.glsl index f5ff1d1d00..b7f7af7885 100644 --- a/indra/newview/app_settings/shaders/class2/objects/fullbrightV.glsl +++ b/indra/newview/app_settings/shaders/class2/objects/fullbrightV.glsl @@ -22,7 +22,10 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +uniform mat4 texture_matrix0; +uniform mat4 modelview_matrix; +uniform mat4 modelview_projection_matrix;  attribute vec4 position;  attribute vec2 texcoord0; @@ -39,9 +42,9 @@ void main()  	//transform vertex  	vec4 vert = vec4(position.xyz,1.0);  	vary_texture_index = position.w; -	vec4 pos = (gl_ModelViewMatrix * vert); -	gl_Position = gl_ModelViewProjectionMatrix*vec4(position.xyz, 1.0); -	gl_TexCoord[0] = gl_TextureMatrix[0] * vec4(texcoord0,0,1); +	vec4 pos = (modelview_matrix * vert); +	gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); +	gl_TexCoord[0] = texture_matrix0 * vec4(texcoord0,0,1);  	calcAtmospherics(pos.xyz); diff --git a/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl b/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl index d6fca4cda7..4511c4bc91 100644 --- a/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl +++ b/indra/newview/app_settings/shaders/class2/objects/shinyV.glsl @@ -22,7 +22,12 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +uniform mat3 normal_matrix; +uniform mat4 texture_matrix0; +uniform mat4 texture_matrix1; +uniform mat4 modelview_matrix; +uniform mat4 modelview_projection_matrix;  attribute vec4 position;  attribute vec2 texcoord0; @@ -42,14 +47,14 @@ void main()  	//transform vertex  	vec4 vert = vec4(position.xyz,1.0);  	vary_texture_index = position.w; -	vec4 pos = (gl_ModelViewMatrix * vert); -	gl_Position = gl_ModelViewProjectionMatrix*vec4(position.xyz, 1.0); +	vec4 pos = (modelview_matrix * vert); +	gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); -	vec3 norm = normalize(gl_NormalMatrix * normal); +	vec3 norm = normalize(normal_matrix * normal);  	vec3 ref = reflect(pos.xyz, -norm); -	gl_TexCoord[0] = gl_TextureMatrix[0] * vec4(texcoord0,0,1); -	gl_TexCoord[1] = gl_TextureMatrix[1]*vec4(ref,1.0); +	gl_TexCoord[0] = texture_matrix0 * vec4(texcoord0,0,1); +	gl_TexCoord[1] = texture_matrix1*vec4(ref,1.0);  	calcAtmospherics(pos.xyz); diff --git a/indra/newview/app_settings/shaders/class2/objects/simpleNonIndexedV.glsl b/indra/newview/app_settings/shaders/class2/objects/simpleNonIndexedV.glsl index d2a83c9724..5f78495ae3 100644 --- a/indra/newview/app_settings/shaders/class2/objects/simpleNonIndexedV.glsl +++ b/indra/newview/app_settings/shaders/class2/objects/simpleNonIndexedV.glsl @@ -2,10 +2,31 @@   * @file simpleNonIndexedV.glsl   *   * $LicenseInfo:firstyear=2007&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2007, 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 mat3 normal_matrix; +uniform mat4 texture_matrix0; +uniform mat4 modelview_matrix; +uniform mat4 modelview_projection_matrix;  attribute vec3 position;  attribute vec2 texcoord0; @@ -20,12 +41,12 @@ void main()  	//transform vertex  	vec4 vert = vec4(position.xyz,1.0); -	gl_Position = gl_ModelViewProjectionMatrix*vert; -	gl_TexCoord[0] = gl_TextureMatrix[0] * vec4(texcoord0, 0, 1); +	gl_Position = modelview_projection_matrix*vert; +	gl_TexCoord[0] = texture_matrix0 * vec4(texcoord0, 0, 1); -	vec4 pos = (gl_ModelViewMatrix * vert); +	vec4 pos = (modelview_matrix * vert); -	vec3 norm = normalize(gl_NormalMatrix * normal); +	vec3 norm = normalize(normal_matrix * normal);  	calcAtmospherics(pos.xyz); diff --git a/indra/newview/app_settings/shaders/class2/objects/simpleV.glsl b/indra/newview/app_settings/shaders/class2/objects/simpleV.glsl index c2db1e1949..91ee5e016e 100644 --- a/indra/newview/app_settings/shaders/class2/objects/simpleV.glsl +++ b/indra/newview/app_settings/shaders/class2/objects/simpleV.glsl @@ -22,8 +22,11 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  +uniform mat3 normal_matrix; +uniform mat4 texture_matrix0; +uniform mat4 modelview_matrix; +uniform mat4 modelview_projection_matrix;  attribute vec4 position;  attribute vec2 texcoord0; @@ -40,13 +43,13 @@ void main()  	//transform vertex  	vec4 vert = vec4(position.xyz,1.0);  	vary_texture_index = position.w; -	vec4 pos = (gl_ModelViewMatrix * vert); -	gl_Position = gl_ModelViewProjectionMatrix*vec4(position.xyz, 1.0); -	gl_TexCoord[0] = gl_TextureMatrix[0] * vec4(texcoord0, 0, 1); +	vec4 pos = (modelview_matrix * vert); +	gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0); +	gl_TexCoord[0] = texture_matrix0 * vec4(texcoord0, 0, 1); -	vec3 norm = normalize(gl_NormalMatrix * normal); +	vec3 norm = normalize(normal_matrix * normal);  	calcAtmospherics(pos.xyz); diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl index 297b3904a6..67b5e7fb83 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl @@ -22,7 +22,9 @@   * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA   * $/LicenseInfo$   */ -  + +uniform mat4 modelview_projection_matrix; +  attribute vec3 position;  attribute vec2 texcoord0; @@ -60,7 +62,7 @@ void main()  {  	// World / view / projection -	gl_Position = gl_ModelViewProjectionMatrix * vec4(position.xyz, 1.0); +	gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);  	gl_TexCoord[0] = vec4(texcoord0,0,1); diff --git a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl index 84e1f827d6..50fdba64c2 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/skyV.glsl @@ -23,6 +23,7 @@   * $/LicenseInfo$   */ +uniform mat4 modelview_projection_matrix;  attribute vec3 position;  attribute vec2 texcoord0; @@ -59,7 +60,7 @@ void main()  {  	// World / view / projection -	gl_Position = gl_ModelViewProjectionMatrix * vec4(position.xyz, 1.0); +	gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);  	gl_TexCoord[0] = vec4(texcoord0,0,1);  	// Get relative position | 
