diff options
author | olamedia <[email protected]> | 2012-12-23 11:30:36 +0600 |
---|---|---|
committer | olamedia <[email protected]> | 2012-12-23 11:30:36 +0600 |
commit | f58bdfcb66353bb77213cab580bc49ef890417ad (patch) | |
tree | 2983a05d564891e92c115a679f9bfbf55465c755 /src/ru/olamedia/asset/shader/block.vp | |
parent | 5320fd1dad5b77fa227e83fbbe0a958f2c5fc283 (diff) |
0.1.7
Diffstat (limited to 'src/ru/olamedia/asset/shader/block.vp')
-rw-r--r-- | src/ru/olamedia/asset/shader/block.vp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/ru/olamedia/asset/shader/block.vp b/src/ru/olamedia/asset/shader/block.vp new file mode 100644 index 0000000..989d182 --- /dev/null +++ b/src/ru/olamedia/asset/shader/block.vp @@ -0,0 +1,25 @@ +//precision lowp float; +//precision lowp int; +uniform mat4 pmvMatrix[4]; // P, Mv, Mvi and Mvit +uniform vec4 sunColor; +uniform sampler2D mesh_ActiveTexture; + +attribute vec4 mesh_vertices; +attribute vec4 mesh_colors; + +attribute vec2 mesh_texCoord; + +invariant out vec4 position; +vec4 color; +smooth out vec2 texCoord; + +void main(void) +{ + // Transforming The Vertex Position To ModelView-Space + position = pmvMatrix[1] * mesh_vertices; // vertex eye position + texCoord = mesh_texCoord; + + gl_Position = pmvMatrix[0] * position; + + color = mesh_colors * sunColor; +} |