Browse Source

Fix morph targets using texture when max texture width is less than 8192 pixels

Popov72 4 years ago
parent
commit
020448bc30
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/Shaders/ShadersInclude/morphTargetsVertexGlobalDeclaration.fx

+ 1 - 1
src/Shaders/ShadersInclude/morphTargetsVertexGlobalDeclaration.fx

@@ -10,7 +10,7 @@
 		{			
 			float y = floor(vertexIndex / morphTargetTextureInfo.y);
 			float x = vertexIndex - y * morphTargetTextureInfo.y;
-			vec3 textureUV = vec3((x + 0.5) / morphTargetTextureInfo.y, y / morphTargetTextureInfo.z, targetIndex);
+			vec3 textureUV = vec3((x + 0.5) / morphTargetTextureInfo.y, (y + 0.5) / morphTargetTextureInfo.z, targetIndex);
 			return texture(morphTargets, textureUV).xyz;
 		}
 	#endif