|
@@ -39,6 +39,12 @@ void main(void)
|
|
|
{
|
|
|
#include<instancesVertex>
|
|
|
|
|
|
+ #ifdef VELOCITY
|
|
|
+ // Compute velocity before bones computation
|
|
|
+ vCurrentPosition = viewProjection * finalWorld * vec4(position, 1.0);
|
|
|
+ vPreviousPosition = previousWorldViewProjection * vec4(position, 1.0);
|
|
|
+ #endif
|
|
|
+
|
|
|
#include<bonesVertex>
|
|
|
vec4 pos = vec4(finalWorld * vec4(position, 1.0));
|
|
|
|
|
@@ -49,11 +55,6 @@ void main(void)
|
|
|
vPosition = pos.xyz / pos.w;
|
|
|
#endif
|
|
|
|
|
|
- #ifdef VELOCITY
|
|
|
- vCurrentPosition = viewProjection * finalWorld * vec4(position, 1.0);
|
|
|
- vPreviousPosition = previousWorldViewProjection * vec4(position, 1.0);
|
|
|
- #endif
|
|
|
-
|
|
|
gl_Position = viewProjection * finalWorld * vec4(position, 1.0);
|
|
|
|
|
|
#if defined(ALPHATEST) || defined(BASIC_RENDER)
|