Browse Source

Shaders: properly bind the instancedNormalMatrix PhongGL attribute.

It was only bound via the explicit binding, which isn't in GLES2. Yet
however it just worked, everywhere I tested, somehow.
pull/539/head
Vladimír Vondruš 4 years ago
parent
commit
5dd4a067a5
  1. 5
      src/Magnum/Shaders/PhongGL.cpp

5
src/Magnum/Shaders/PhongGL.cpp

@ -329,8 +329,11 @@ PhongGL::PhongGL(const Flags flags, const UnsignedInt lightCount
if(flags >= Flag::InstancedObjectId)
bindAttributeLocation(ObjectId::Location, "instanceObjectId");
#endif
if(flags & Flag::InstancedTransformation)
if(flags & Flag::InstancedTransformation) {
bindAttributeLocation(TransformationMatrix::Location, "instancedTransformationMatrix");
if(lightCount)
bindAttributeLocation(NormalMatrix::Location, "instancedNormalMatrix");
}
if(flags >= Flag::InstancedTextureOffset)
bindAttributeLocation(TextureOffset::Location, "instancedTextureOffset");
}

Loading…
Cancel
Save