blob: fc826f60b46c5258a6653a20df80466f74ff858a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
attribute highp vec2 vPos;
attribute highp vec2 vTex;
uniform highp vec3 animData;// w,h(premultiplied of anim), interpolation progress
uniform highp vec4 animPos;//x,y, x,y (two frames for interpolation)
uniform highp mat4 qt_Matrix;
varying highp vec4 fTexS;
varying lowp float progress;
void main()
{
progress = animData.z;
// Calculate frame location in texture
fTexS.xy = animPos.xy + vTex.xy * animData.xy;
// Next frame is also passed, for interpolation
fTexS.zw = animPos.zw + vTex.xy * animData.xy;
gl_Position = qt_Matrix * vec4(vPos.x, vPos.y, 0, 1);
}
|