diff --git a/res/org/lwjgl/demo/opengl/shader/raymarching.vs.glsl b/res/org/lwjgl/demo/opengl/shader/raymarching.vs.glsl index 0c391294..bf0324fc 100644 --- a/res/org/lwjgl/demo/opengl/shader/raymarching.vs.glsl +++ b/res/org/lwjgl/demo/opengl/shader/raymarching.vs.glsl @@ -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; diff --git a/src/org/lwjgl/demo/opengl/shader/RayMarchingVolumeTexture.java b/src/org/lwjgl/demo/opengl/shader/RayMarchingVolumeTexture.java index 4fe05c73..172b98be 100644 --- a/src/org/lwjgl/demo/opengl/shader/RayMarchingVolumeTexture.java +++ b/src/org/lwjgl/demo/opengl/shader/RayMarchingVolumeTexture.java @@ -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;