diff --git a/src/Magnum/MeshTools/Test/CompileGLTest.cpp b/src/Magnum/MeshTools/Test/CompileGLTest.cpp index fb917822a..0e1d7aff5 100644 --- a/src/Magnum/MeshTools/Test/CompileGLTest.cpp +++ b/src/Magnum/MeshTools/Test/CompileGLTest.cpp @@ -918,54 +918,54 @@ void CompileGLTest::packedAttributes() { {Math::pack(Vector3{-0.75f, -0.75f, -0.35f}), Math::pack(Vector3{-0.5f, -0.5f, 1.0f}.normalized()), Math::pack(Vector2{0.0f, 0.0f}), 0x00ff00_rgb, 13562, - Vector4{0.4f, 0.3f, 0.2f, 0.1f}, Vector4us{0, 1, 2, 3}}, + Vector4{0.4f, 0.3f, 0.2f, 0.1f}, Vector4us{2, 1, 0, 3}}, {Math::pack(Vector3{ 0.00f, -0.75f, -0.25f}), Math::pack(Vector3{ 0.0f, -0.5f, 1.0f}.normalized()), Math::pack(Vector2{0.5f, 0.0f}), 0x808000_rgb, 13562, - Vector4{0.4f, 0.3f, 0.2f, 0.1f}, Vector4us{0, 1, 2, 3}}, + Vector4{0.4f, 0.3f, 0.2f, 0.1f}, Vector4us{2, 1, 0, 3}}, {Math::pack(Vector3{ 0.75f, -0.75f, -0.35f}), Math::pack(Vector3{ 0.5f, -0.5f, 1.0f}.normalized()), Math::pack(Vector2{1.0f, 0.0f}), 0xff0000_rgb, 13562, - Vector4{0.4f, 0.3f, 0.2f, 0.1f}, Vector4us{0, 1, 2, 3}}, + Vector4{0.4f, 0.3f, 0.2f, 0.1f}, Vector4us{2, 1, 0, 3}}, {Math::pack(Vector3{-0.75f, 0.00f, -0.25f}), Math::pack(Vector3{-0.5f, 0.0f, 1.0f}.normalized()), Math::pack(Vector2{0.0f, 0.5f}), 0x00ff80_rgb, 13562, - Vector4{0.4f, 0.3f, 0.2f, 0.1f}, Vector4us{0, 1, 2, 3}}, + Vector4{0.4f, 0.3f, 0.2f, 0.1f}, Vector4us{2, 1, 0, 3}}, {Math::pack(Vector3{ 0.00f, 0.00f, 0.00f}), Math::pack(Vector3{ 0.0f, 0.0f, 1.0f}.normalized()), Math::pack(Vector2{0.5f, 0.5f}), 0x808080_rgb, 13562, - Vector4{0.4f, 0.3f, 0.2f, 0.1f}, Vector4us{0, 1, 2, 3}}, + Vector4{0.4f, 0.3f, 0.2f, 0.1f}, Vector4us{2, 1, 0, 3}}, {Math::pack(Vector3{ 0.75f, 0.00f, -0.25f}), Math::pack(Vector3{ 0.5f, 0.0f, 1.0f}.normalized()), Math::pack(Vector2{1.0f, 0.5f}), 0xff0080_rgb, 13562, - Vector4{0.4f, 0.3f, 0.2f, 0.1f}, Vector4us{0, 1, 2, 3}}, + Vector4{0.4f, 0.3f, 0.2f, 0.1f}, Vector4us{2, 1, 0, 3}}, {Math::pack(Vector3{-0.75f, 0.00f, -0.25f}), Math::pack(Vector3{-0.5f, 0.0f, 1.0f}.normalized()), Math::pack(Vector2{0.0f, 0.5f}), 0x00ff80_rgb, 26234, - Vector4{0.4f, 0.3f, 0.2f, 0.1f}, Vector4us{0, 1, 2, 3}}, + Vector4{0.4f, 0.3f, 0.2f, 0.1f}, Vector4us{2, 1, 0, 3}}, {Math::pack(Vector3{ 0.00f, 0.00f, 0.00f}), Math::pack(Vector3{ 0.0f, 0.0f, 1.0f}.normalized()), Math::pack(Vector2{0.5f, 0.5f}), 0x808080_rgb, 26234, - Vector4{0.4f, 0.3f, 0.2f, 0.1f}, Vector4us{0, 1, 2, 3}}, + Vector4{0.4f, 0.3f, 0.2f, 0.1f}, Vector4us{2, 1, 0, 3}}, {Math::pack(Vector3{ 0.75f, 0.00f, -0.25f}), Math::pack(Vector3{ 0.5f, 0.0f, 1.0f}.normalized()), Math::pack(Vector2{1.0f, 0.5f}), 0xff0080_rgb, 26234, - Vector4{0.4f, 0.3f, 0.2f, 0.1f}, Vector4us{0, 1, 2, 3}}, + Vector4{0.4f, 0.3f, 0.2f, 0.1f}, Vector4us{2, 1, 0, 3}}, {Math::pack(Vector3{-0.75f, 0.75f, -0.35f}), Math::pack(Vector3{-0.5f, 0.5f, 1.0f}.normalized()), Math::pack(Vector2{0.0f, 1.0f}), 0x00ffff_rgb, 26234, - Vector4{0.4f, 0.3f, 0.2f, 0.1f}, Vector4us{0, 1, 2, 3}}, + Vector4{0.4f, 0.3f, 0.2f, 0.1f}, Vector4us{2, 1, 0, 3}}, {Math::pack(Vector3{ 0.0f, 0.75f, -0.25f}), Math::pack(Vector3{ 0.0f, 0.5f, 1.0f}.normalized()), Math::pack(Vector2{0.5f, 1.0f}), 0x8080ff_rgb, 26234, - Vector4{0.4f, 0.3f, 0.2f, 0.1f}, Vector4us{0, 1, 2, 3}}, + Vector4{0.4f, 0.3f, 0.2f, 0.1f}, Vector4us{2, 1, 0, 3}}, {Math::pack(Vector3{ 0.75f, 0.75f, -0.35f}), Math::pack(Vector3{ 0.5f, 0.5f, 1.0f}.normalized()), Math::pack(Vector2{1.0f, 1.0f}), 0xff00ff_rgb, 26234, - Vector4{0.4f, 0.3f, 0.2f, 0.1f}, Vector4us{0, 1, 2, 3}}, + Vector4{0.4f, 0.3f, 0.2f, 0.1f}, Vector4us{2, 1, 0, 3}}, }; static_assert(sizeof(PackedVertex) % 4 == 0, "the vertex is not 4-byte aligned and that's bad"); diff --git a/src/Magnum/Shaders/Phong.vert b/src/Magnum/Shaders/Phong.vert index 51dd4a18e..bf884f248 100644 --- a/src/Magnum/Shaders/Phong.vert +++ b/src/Magnum/Shaders/Phong.vert @@ -190,10 +190,10 @@ void main() { mat4 skinMatrix; int i = 0; for(; i != JOINTS_PER_VERTEX && i != 4; ++i) - skinMatrix += weights[i]*jointMatrices[int(jointIds[i])]; + skinMatrix += weights[i]*jointMatrices[jointIds[i]]; #if JOINTS_PER_VERTEX > 4 for(i = 0; i != JOINTS_PER_VERTEX - 4 && i != 4; ++i) - skinMatrix += secondaryWeights[i]*jointMatrices[int(secondaryJointIds[i])]; + skinMatrix += secondaryWeights[i]*jointMatrices[secondaryJointIds[i]]; #endif #endif