summaryrefslogtreecommitdiff
path: root/servers/rendering/renderer_rd
diff options
context:
space:
mode:
authorWindy Darian <WindyDarian@users.noreply.github.com>2022-05-20 07:17:22 -0400
committerWindy Darian <WindyDarian@users.noreply.github.com>2022-05-20 07:59:45 -0400
commita3e016e07eba188057b52c3ee579fea8e63e5b9f (patch)
tree5f88a98cee576827c225411751866c034970e75b /servers/rendering/renderer_rd
parent29708f79a8581bd126072567c6fe9083e7cec9ae (diff)
Fix normal and tangent blending in blend shapes
Diffstat (limited to 'servers/rendering/renderer_rd')
-rw-r--r--servers/rendering/renderer_rd/shaders/skeleton.glsl6
1 files changed, 3 insertions, 3 deletions
diff --git a/servers/rendering/renderer_rd/shaders/skeleton.glsl b/servers/rendering/renderer_rd/shaders/skeleton.glsl
index 4ef6a26443..a893a66c94 100644
--- a/servers/rendering/renderer_rd/shaders/skeleton.glsl
+++ b/servers/rendering/renderer_rd/shaders/skeleton.glsl
@@ -160,7 +160,7 @@ void main() {
}
if (params.has_tangent) {
- blend_tangent += decode_abgr_2_10_10_10(src_blend_shapes.data[base_offset]).rgb;
+ blend_tangent += decode_abgr_2_10_10_10(src_blend_shapes.data[base_offset]).rgb * w;
}
blend_total += w;
@@ -174,8 +174,8 @@ void main() {
}
vertex += blend_vertex;
- normal += normalize(normal + blend_normal);
- tangent.rgb += normalize(tangent.rgb + blend_tangent);
+ normal = normalize(normal + blend_normal);
+ tangent.rgb = normalize(tangent.rgb + blend_tangent);
}
if (params.has_skeleton) {