Skip to content

Commit

Permalink
VOXELFORMAT: VXL/HVA: apply the section scale to the hva matrices
Browse files Browse the repository at this point in the history
  • Loading branch information
mgerhardy committed Jan 13, 2025
1 parent 5734b5e commit d81f493
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modules/voxelformat/private/commandconquer/VXLShared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "VXLShared.h"
#include "core/Log.h"
#include "scenegraph/CoordinateSystemUtil.h"
#include <glm/ext/matrix_transform.hpp>

namespace voxelformat {

Expand Down Expand Up @@ -61,6 +62,7 @@ glm::mat4 convertHVARead(const VXLMatrix &matrix, const vxl::VXLLayerInfo &foote
glm::vec4 &translation = vengiMatrix[3];
// the hva matrices have to be scaled
const glm::vec3 sectionScale = footer.calcScale();
vengiMatrix = glm::scale(vengiMatrix, sectionScale);
translation.x *= footer.scale * sectionScale.x;
translation.y *= footer.scale * sectionScale.z;
translation.z *= footer.scale * sectionScale.y;
Expand Down

0 comments on commit d81f493

Please sign in to comment.