diff --git a/src/Magnum/Shaders/Phong.vert b/src/Magnum/Shaders/Phong.vert index 4578d03e2..c9c42160f 100644 --- a/src/Magnum/Shaders/Phong.vert +++ b/src/Magnum/Shaders/Phong.vert @@ -242,11 +242,13 @@ layout(location = TRANSFORMATION_MATRIX_ATTRIBUTE_LOCATION) #endif in highp mat4 instancedTransformationMatrix; +#ifdef HAS_LIGHTS #ifdef EXPLICIT_ATTRIB_LOCATION layout(location = NORMAL_MATRIX_ATTRIBUTE_LOCATION) #endif in highp mat3 instancedNormalMatrix; #endif +#endif #ifdef INSTANCED_TEXTURE_OFFSET #ifdef EXPLICIT_ATTRIB_LOCATION diff --git a/src/Magnum/Shaders/Test/PhongGLTest.cpp b/src/Magnum/Shaders/Test/PhongGLTest.cpp index c2abbacbd..5f5c3709e 100644 --- a/src/Magnum/Shaders/Test/PhongGLTest.cpp +++ b/src/Magnum/Shaders/Test/PhongGLTest.cpp @@ -247,6 +247,7 @@ constexpr struct { {"five lights", {}, 5}, {"zero lights", {}, 0}, {"instanced transformation", PhongGL::Flag::InstancedTransformation, 3}, + {"instanced transformation, zero lights", PhongGL::Flag::InstancedTransformation, 0}, {"instanced specular texture offset", PhongGL::Flag::SpecularTexture|PhongGL::Flag::InstancedTextureOffset, 3}, {"instanced normal texture offset", PhongGL::Flag::NormalTexture|PhongGL::Flag::InstancedTextureOffset, 3}, #ifndef MAGNUM_TARGET_GLES2