annotate Shaders/Shader.vsh @ 8:78830332a3be tip

Merged
author Eric Wing <ewing@anscamobile.com>
date Thu, 11 Aug 2011 15:46:13 -0700
parents 5ec52341f221
children
rev   line source
0
5ec52341f221 Initial commit
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
1 //
5ec52341f221 Initial commit
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
2 // Shader.vsh
5ec52341f221 Initial commit
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
3 // MySampleProject
5ec52341f221 Initial commit
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
4 //
5ec52341f221 Initial commit
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
5 // Created by Eric Wing on 7/29/11.
5ec52341f221 Initial commit
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
6 // Copyright 2011 __MyCompanyName__. All rights reserved.
5ec52341f221 Initial commit
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
7 //
5ec52341f221 Initial commit
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
8
5ec52341f221 Initial commit
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
9 attribute vec4 position;
5ec52341f221 Initial commit
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
10 attribute vec4 color;
5ec52341f221 Initial commit
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
11
5ec52341f221 Initial commit
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
12 varying vec4 colorVarying;
5ec52341f221 Initial commit
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
13
5ec52341f221 Initial commit
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
14 uniform float translate;
5ec52341f221 Initial commit
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
15
5ec52341f221 Initial commit
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
16 void main()
5ec52341f221 Initial commit
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
17 {
5ec52341f221 Initial commit
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
18 gl_Position = position;
5ec52341f221 Initial commit
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
19 gl_Position.y += sin(translate) / 2.0;
5ec52341f221 Initial commit
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
20
5ec52341f221 Initial commit
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
21 colorVarying = color;
5ec52341f221 Initial commit
Eric Wing <ewing@anscamobile.com>
parents:
diff changeset
22 }