Browse Source

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

Popov72 4 years ago
parent
commit
020448bc30

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

@@ -10,7 +10,7 @@
 		{			
 		{			
 			float y = floor(vertexIndex / morphTargetTextureInfo.y);
 			float y = floor(vertexIndex / morphTargetTextureInfo.y);
 			float x = vertexIndex - y * 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;
 			return texture(morphTargets, textureUV).xyz;
 		}
 		}
 	#endif
 	#endif