layout (location=0) in vec3 a_co; layout (location=1) in vec3 a_norm; layout (location=2) in vec2 a_uv; layout (location=3) in vec4 a_colour; layout (location=4) in vec4 a_weights; layout (location=5) in ivec4 a_groups; #include "motion_vectors_vs.glsl" uniform mat4x3 uMdl; uniform mat4 uPv; uniform mat4 uPvmPrev; uniform vec4 uOffset; out vec4 aColour; out vec2 aUv; out vec3 aNorm; out vec3 aCo; out vec3 aWorldCo; void main() { vec3 co = a_co*uOffset.w+uOffset.xyz; vec3 world_pos0 = uMdl * vec4( co, 1.0 ); vec4 vproj0 = uPv * vec4( world_pos0, 1.0 ); vec4 vproj1 = uPvmPrev * vec4( co, 1.0 ); vs_motion_out( vproj0, vproj1 ); gl_Position = vproj0; aWorldCo = world_pos0; aColour = a_colour; aUv = a_uv; aNorm = mat3(uMdl) * a_norm; aCo = a_co; }