mirror of https://github.com/bjornbytes/lovr.git
Fix lovrInstanceID on non-singlepass setups;
This commit is contained in:
parent
9b0812c4f9
commit
92ef5ee02d
|
@ -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";
|
||||
|
||||
|
|
Loading…
Reference in New Issue