1 attribute mediump vec3 aPosition;
2 attribute mediump vec3 aNormal;
3 attribute highp vec2 aTexCoord;
4 uniform mediump mat4 uMvpMatrix;
5 varying mediump vec4 vVertex;
6 varying mediump vec3 vNormal;
7 varying mediump vec2 vTexCoord;
8 varying mediump vec2 vTextureOffset;
12 gl_Position = uMvpMatrix * vec4( aPosition.xy, 0.0, 1.0 );
13 vTexCoord = aTexCoord.xy;
16 vVertex = vec4( aPosition, 1.0 );
17 float length = max(0.01, length(aNormal.xy)) * 40.0;
18 vTextureOffset = aNormal.xy / length;