Fix lovrInstanceID on non-singlepass setups;
@@ -13,7 +13,6 @@ const char* lovrShaderVertexPrefix = ""
"#else \n"
"#define lovrNormalMatrix mat3(transpose(inverse(lovrModel))) \n"
"#endif \n"
-"#define lovrInstanceID (gl_InstanceID / lovrViewportCount) \n"
"#define lovrPoseMatrix ("
"lovrPose[lovrBones[0]] * lovrBoneWeights[0] +"
"lovrPose[lovrBones[1]] * lovrBoneWeights[1] +"
@@ -50,8 +49,10 @@ const char* lovrShaderVertexPrefix = ""
"#define lovrViewID (int(gl_ViewID_OVR)) \n"
"#elif defined INSTANCED_STEREO \n"
"#define lovrViewID gl_ViewportIndex \n"
+"#define lovrInstanceID (gl_InstanceID / lovrViewportCount) \n"
"#else \n"
"uniform lowp int lovrViewID; \n"
+"#define lovrInstanceID gl_InstanceID \n"
"#endif \n"
"#line 0 \n";
