summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class3
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-09-15 00:54:25 -0500
committerDave Parks <davep@lindenlab.com>2011-09-15 00:54:25 -0500
commit530981a2149a74e1dc003cea1bbc9dc392fcae60 (patch)
treef629a2dbc004d23e0f9f056366290e397ec51caf /indra/newview/app_settings/shaders/class3
parent7c95af74f195c9ec4ebc0fc0264d98cd4a85be49 (diff)
SH-2243 work in progress -- no more deprecated built-in matrix state when using shaders.
Diffstat (limited to 'indra/newview/app_settings/shaders/class3')
-rw-r--r--indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/giFinalV.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/giV.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/postDeferredV.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/postgiV.glsl6
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/softenLightV.glsl5
8 files changed, 31 insertions, 16 deletions
diff --git a/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl b/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl
index f1d06b4fec..c10635c898 100644
--- a/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl
+++ b/indra/newview/app_settings/shaders/class3/avatar/avatarV.glsl
@@ -22,7 +22,9 @@
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+
+uniform mat4 projection_matrix;
+
attribute vec3 position;
attribute vec3 normal;
attribute vec2 texcoord0;
@@ -123,7 +125,7 @@ void main()
vec4 color = calcLighting(pos.xyz, norm, vec4(1,1,1,1), vec4(0.0));
gl_FrontColor = color;
- gl_Position = gl_ProjectionMatrix * pos;
+ gl_Position = projection_matrix * pos;
gl_TexCoord[2] = vec4(pos.xyz, 1.0);
diff --git a/indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl b/indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl
index 870d4c36bc..5e75aec171 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/giDownsampleV.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;
@@ -31,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/class3/deferred/giFinalV.glsl b/indra/newview/app_settings/shaders/class3/deferred/giFinalV.glsl
index 76206f88d9..969b6e2f1c 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/giFinalV.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/giFinalV.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;
@@ -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/class3/deferred/giV.glsl b/indra/newview/app_settings/shaders/class3/deferred/giV.glsl
index 1a23be349e..2766691bd0 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/giV.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/giV.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 vec4 diffuse_color;
attribute vec2 texcoord0;
@@ -35,7 +37,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/class3/deferred/luminanceV.glsl b/indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl
index a2606f2fb2..d0205fa824 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/luminanceV.glsl
@@ -22,7 +22,9 @@
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
-
+
+uniform mat4 modelview_projection_matrix;
+
varying vec2 vary_fragcoord;
uniform vec2 screen_res;
@@ -33,7 +35,7 @@ attribute vec4 diffuse_color;
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/class3/deferred/postDeferredV.glsl b/indra/newview/app_settings/shaders/class3/deferred/postDeferredV.glsl
index 2d0b60d513..2d7fa22edc 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/postDeferredV.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/postDeferredV.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;
@@ -31,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/class3/deferred/postgiV.glsl b/indra/newview/app_settings/shaders/class3/deferred/postgiV.glsl
index 25bdfdce45..e9c6f3e27b 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/postgiV.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/postgiV.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;
@@ -31,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/class3/deferred/softenLightV.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightV.glsl
index 9e07a4d219..8e405de9a3 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/softenLightV.glsl
+++ b/indra/newview/app_settings/shaders/class3/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;
attribute vec2 texcoord0;
@@ -34,7 +35,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;
vary_fragcoord = (pos.xy*0.5+0.5)*screen_res;