From 534500f36d5c87e3262cd289d73abbc39713610e Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 3 May 2016 16:49:10 +0200 Subject: [PATCH] - fixed software-based model interpolation. --- src/gl/models/gl_models.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gl/models/gl_models.cpp b/src/gl/models/gl_models.cpp index 88c1795679..e2187c59c0 100644 --- a/src/gl/models/gl_models.cpp +++ b/src/gl/models/gl_models.cpp @@ -272,9 +272,9 @@ unsigned int FModelVertexBuffer::SetupFrame(unsigned int frame1, unsigned int fr float frac = gl_RenderState.GetInterpolationFactor(); for (unsigned i = 0; i < size; i++) { - iBuffer[i].x = vbo_ptr[frame1].x * (1.f - frac) + vbo_ptr[frame2].x * frac; - iBuffer[i].y = vbo_ptr[frame1].y * (1.f - frac) + vbo_ptr[frame2].y * frac; - iBuffer[i].z = vbo_ptr[frame1].z * (1.f - frac) + vbo_ptr[frame2].z * frac; + iBuffer[i].x = vbo_ptr[frame1 + i].x * (1.f - frac) + vbo_ptr[frame2 + i].x * frac; + iBuffer[i].y = vbo_ptr[frame1 + i].y * (1.f - frac) + vbo_ptr[frame2 + i].y * frac; + iBuffer[i].z = vbo_ptr[frame1 + i].z * (1.f - frac) + vbo_ptr[frame2 + i].z * frac; } } return frame1;