summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/interface
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/interface')
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/debugV.glsl13
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/highlightV.glsl13
-rw-r--r--indra/newview/app_settings/shaders/class1/interface/occlusionSkinnedV.glsl40
3 files changed, 66 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class1/interface/debugV.glsl b/indra/newview/app_settings/shaders/class1/interface/debugV.glsl
index f4d704577a..153998f1d5 100644
--- a/indra/newview/app_settings/shaders/class1/interface/debugV.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/debugV.glsl
@@ -27,8 +27,21 @@ uniform mat4 modelview_projection_matrix;
ATTRIBUTE vec3 position;
+#ifdef HAS_SKIN
+mat4 getObjectSkinnedTransform();
+uniform mat4 projection_matrix;
+uniform mat4 modelview_matrix;
+#endif
+
void main()
{
+#ifdef HAS_SKIN
+ mat4 mat = getObjectSkinnedTransform();
+ mat = modelview_matrix * mat;
+ vec4 pos = mat * vec4(position.xyz,1.0);
+ gl_Position = projection_matrix * pos;
+#else
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+#endif
}
diff --git a/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl b/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl
index 9bf7b60eb7..0b362cf46c 100644
--- a/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl
+++ b/indra/newview/app_settings/shaders/class1/interface/highlightV.glsl
@@ -31,10 +31,23 @@ ATTRIBUTE vec2 texcoord0;
VARYING vec2 vary_texcoord0;
+#ifdef HAS_SKIN
+mat4 getObjectSkinnedTransform();
+uniform mat4 projection_matrix;
+uniform mat4 modelview_matrix;
+#endif
+
void main()
{
//transform vertex
+#ifdef HAS_SKIN
+ mat4 mat = getObjectSkinnedTransform();
+ mat = modelview_matrix * mat;
+ vec4 pos = mat * vec4(position.xyz,1.0);
+ gl_Position = projection_matrix * pos;
+#else
gl_Position = modelview_projection_matrix * vec4(position.xyz, 1.0);
+#endif
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
}
diff --git a/indra/newview/app_settings/shaders/class1/interface/occlusionSkinnedV.glsl b/indra/newview/app_settings/shaders/class1/interface/occlusionSkinnedV.glsl
new file mode 100644
index 0000000000..7305065a05
--- /dev/null
+++ b/indra/newview/app_settings/shaders/class1/interface/occlusionSkinnedV.glsl
@@ -0,0 +1,40 @@
+/**
+ * @file occlusionSkinnedV.glsl
+ *
+ * $LicenseInfo:firstyear=2021&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 mat4 projection_matrix;
+uniform mat4 modelview_matrix;
+
+ATTRIBUTE vec3 position;
+
+mat4 getObjectSkinnedTransform();
+
+void main()
+{
+ mat4 mat = getObjectSkinnedTransform();
+ mat = modelview_matrix * mat;
+ vec3 pos = (mat*vec4(position.xyz, 1.0)).xyz;
+ gl_Position = projection_matrix*vec4(pos, 1.0);
+}
+