summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl')
-rwxr-xr-xindra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl11
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl b/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl
index 3c026796c8..7e83389f6e 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl
@@ -26,6 +26,13 @@
uniform mat3 normal_matrix;
uniform mat4 texture_matrix0;
uniform mat4 modelview_projection_matrix;
+uniform bool invert_tex_y = false;
+const mat4 invTexM = mat4(
+ 1, 0, 0, 0,
+ 0,-1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1
+);
ATTRIBUTE vec3 position;
ATTRIBUTE vec4 diffuse_color;
@@ -44,6 +51,10 @@ void main()
//transform vertex
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
+ if(invert_tex_y)
+ {
+ vary_texcoord0 = vec2(invTexM * vec4(vary_texcoord0,0,1)).xy;
+ }
passTextureIndex();
vary_normal = normalize(normal_matrix * normal);