Skip to content

Commit

Permalink
Fixup orientation of MagicaVoxel model
Browse files Browse the repository at this point in the history
  • Loading branch information
httpdigest committed Jan 4, 2024
1 parent 8771c46 commit b8cbb71
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions res/org/lwjgl/demo/opengl/shader/raymarching.vs.glsl
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
*/
#version 330 core

layout (location = 0) in vec3 pos;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ private Volume create3dVolume(String resource, int x, int y, int z) throws IOExc
BufferedInputStream bis = new BufferedInputStream(is);
new MagicaVoxelLoader().read(bis, new MagicaVoxelLoader.Callback() {
public void voxel(int x, int y, int z, byte c) {
v.field[idx(x, z, y, dims.x, dims.y)] = c;
v.field[idx(x, z, dims.z - 1 - y, dims.x, dims.y)] = c;
}
public void size(int x, int y, int z) {
dims.x = x;
Expand Down

0 comments on commit b8cbb71

Please sign in to comment.