1/*---------------------------------------------------------------------------*
2
3  Copyright (C) Nintendo.  All rights reserved.
4
5  These coded instructions, statements, and computer programs contain
6  proprietary information of Nintendo of America Inc. and/or Nintendo
7  Company Ltd., and are protected by Federal copyright law.  They may
8  not be disclosed to third parties or copied or duplicated in any form,
9  in whole or in part, without the prior written consent of Nintendo.
10
11 *---------------------------------------------------------------------------*/
12// index bit assignment:
13// MSB
14// position x offset: 12
15// position y offset: 5
16// texcoord x value:  8
17// texcoord y value:  7
18// LSB
19
20uniform vec3 u_BasePosition;
21uniform vec2 u_Scale;
22varying vec2 v_TexCoord;
23
24void main()
25{
26    gl_Position = vec4((u_BasePosition.x + (gl_VertexID >> 20)) * u_Scale.x - 1,
27                       (u_BasePosition.y + ((gl_VertexID >> 15) & 0x1f)) * u_Scale.y + 1,
28                       u_BasePosition.z,
29                       1.0);
30    v_TexCoord = vec2(((gl_VertexID >> 7) & 0xff)/255.0,
31                      ((gl_VertexID >> 0) & 0x7f)/127.0);
32}
33
34