summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings
diff options
context:
space:
mode:
authorRunitai Linden <davep@lindenlab.com>2021-12-15 15:43:23 -0600
committerRunitai Linden <davep@lindenlab.com>2021-12-15 15:43:23 -0600
commit20345827eb5b9ebc658ac506f0d41f2a149d895d (patch)
tree85c5352b61af64e8e9ccf3f79a3f82e1b0856be4 /indra/newview/app_settings
parent199775b7ac214cfc3492c343c3f6046effcde7ed (diff)
SL-16489 Fix for rigged attachment glow showing up near origin.
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/emissiveV.glsl17
1 files changed, 14 insertions, 3 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/emissiveV.glsl b/indra/newview/app_settings/shaders/class1/deferred/emissiveV.glsl
index 5e4f08b017..08b1147ab0 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/emissiveV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/emissiveV.glsl
@@ -40,15 +40,26 @@ vec3 atmosAffectDirectionalLight(float lightIntensity);
VARYING vec4 vertex_color;
VARYING vec2 vary_texcoord0;
+#ifdef HAS_SKIN
+mat4 getObjectSkinnedTransform();
+uniform mat4 projection_matrix;
+#endif
void main()
{
//transform vertex
- vec4 vert = vec4(position.xyz, 1.0);
- vec4 pos = (modelview_matrix * vert);
passTextureIndex();
- gl_Position = modelview_projection_matrix*vec4(position.xyz, 1.0);
+#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);
+ vec4 pos = (modelview_matrix * vec4(position.xyz, 1.0));
+#endif
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;