1 layout (location=0) in vec3 a_co;
2 layout (location=1) in vec4 a_norm;
3 layout (location=2) in vec2 a_uv;
5 #include "motion_vectors_vs.glsl"
19 float w = ((a_norm.w)-0.5)*2.0 + fract(uInfo.z) - 0.0;
20 float c = -cos(w*0.6);
21 float s = -sin(w*0.6);
24 float w1 = clamp( w*4.0 - a_co.y*10.0, -1.0, 1.0 ) * (3.14159265*0.5);
28 float yoff = step(0.01,fract(uInfo.z))*-0.5;
31 mlocal[0] = vec3(c1, s1,0.0);
32 mlocal[1] = vec3(-s1,c1,0.0);
33 mlocal[2] = vec3(0.0,0.0,1.0);
34 mlocal[3] = vec3(c*r,uInfo.y*0.875 + s*r,uInfo.x*0.5);
36 vec3 local_pos0 = mlocal * vec4( a_co, 1.0 );
37 vec3 world_pos0 = uMdl * vec4( local_pos0, 1.0 );
39 vec4 vproj0 = uPv * vec4( world_pos0, 1.0 );
40 vec4 vproj1 = uPvmPrev * vec4( local_pos0, 1.0 );
42 vs_motion_out( vproj0, vproj1 );
46 aUv = a_uv + vec2( floor(uInfo.z+0.5)*(1.0/64.0), yoff );
47 aNorm = vec4( mat3(uMdl) * mat3(mlocal) * a_norm.xyz, a_norm.w );
49 aWorldCo = world_pos0;