Skip to content

Commit

Permalink
VOXELFORMAT: VOX: flips, instances, rotates not handled correctly #275
Browse files Browse the repository at this point in the history
  • Loading branch information
mgerhardy committed Jun 29, 2023
1 parent 8adac0f commit 9634f3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/voxelformat/VoxFormat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ bool VoxFormat::loadInstance(const ogt_vox_scene *scene, uint32_t ogt_instanceId
bool groupHidden) {
const ogt_vox_instance &ogtInstance = scene->instances[ogt_instanceIdx];
const ogt_vox_model *ogtModel = scene->models[ogtInstance.model_index];
const glm::mat4 ogtMat = ogtTransformToMat(ogtInstance.transform, ogtModel);
const glm::mat4 ogtMat = ogtTransformToMat(ogt_vox_sample_instance_transform(&ogtInstance, 0, scene), ogtModel);
const glm::vec4 pivot((float)(int)(ogtModel->size_x / 2), (float)(int)(ogtModel->size_y / 2),
(float)(int)(ogtModel->size_z / 2), 0.0f);
const glm::ivec3 &transformedMins = calcTransform(ogtMat, glm::ivec3(0), pivot);
Expand Down

0 comments on commit 9634f3a

Please sign in to comment.