Browse Source

WebGLMorphtargets: Fix data texture buffer alpha. (#22573)

Michael Herzog 3 years ago
parent
commit
aed8d5b9fe
1 changed files with 5 additions and 3 deletions
  1. 5 3
      src/renderers/webgl/WebGLMorphtargets.js

+ 5 - 3
src/renderers/webgl/WebGLMorphtargets.js

@@ -107,6 +107,7 @@ function WebGLMorphtargets( gl, capabilities, textures ) {
 						buffer[ offset + stride + 0 ] = morph.x;
 						buffer[ offset + stride + 1 ] = morph.y;
 						buffer[ offset + stride + 2 ] = morph.z;
+						buffer[ offset + stride + 3 ] = 0;
 
 						if ( hasMorphNormals === true ) {
 
@@ -114,9 +115,10 @@ function WebGLMorphtargets( gl, capabilities, textures ) {
 
 							if ( morphNormal.normalized === true ) denormalize( morph, morphNormal );
 
-							buffer[ offset + stride + 3 ] = morph.x;
-							buffer[ offset + stride + 4 ] = morph.y;
-							buffer[ offset + stride + 5 ] = morph.z;
+							buffer[ offset + stride + 4 ] = morph.x;
+							buffer[ offset + stride + 5 ] = morph.y;
+							buffer[ offset + stride + 6 ] = morph.z;
+							buffer[ offset + stride + 7 ] = 0;
 
 						}