author | Michael Hartman <omh1280@gmail.com> |
Sun, 30 Dec 2012 09:23:30 -0500 | |
branch | webgl |
changeset 8334 | abb48dd39e26 |
child 11317 | 62287d4044e7 |
permissions | -rw-r--r-- |
8334
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
1 |
|
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
2 |
|
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
3 |
attribute vec2 vertex; |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
4 |
attribute vec4 color; |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
5 |
|
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
6 |
varying vec4 vcolor; |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
7 |
|
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
8 |
uniform mat4 mvp; |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
9 |
|
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
10 |
void main() |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
11 |
{ |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
12 |
vec4 p = mvp * vec4(vertex, 0.0, 1.0); |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
13 |
gl_Position = p; |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
14 |
vcolor = color; |
abb48dd39e26
Added shaders and -GL2 option
Michael Hartman <omh1280@gmail.com>
parents:
diff
changeset
|
15 |
} |