diff options
author | Fathi Boudra <fathi.boudra@linaro.org> | 2013-03-30 17:38:14 +0200 |
---|---|---|
committer | Fathi Boudra <fathi.boudra@linaro.org> | 2013-03-30 17:38:14 +0200 |
commit | 341f04dca0008c290cf065c4b36348fd80fe9700 (patch) | |
tree | ab372775bee83fd6c6500c75fd066315f725981d /data/shaders/bump-poly.vert |
Imported Upstream version 2012.12HEADupstream/2012.12upstreammaster
Diffstat (limited to 'data/shaders/bump-poly.vert')
-rw-r--r-- | data/shaders/bump-poly.vert | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/data/shaders/bump-poly.vert b/data/shaders/bump-poly.vert new file mode 100644 index 0000000..0207c37 --- /dev/null +++ b/data/shaders/bump-poly.vert @@ -0,0 +1,16 @@ +attribute vec3 position; +attribute vec3 normal; + +uniform mat4 ModelViewProjectionMatrix; +uniform mat4 NormalMatrix; + +varying vec3 Normal; + +void main(void) +{ + // Transform the normal to eye coordinates + Normal = normalize(vec3(NormalMatrix * vec4(normal, 1.0))); + + // Transform the position to clip coordinates + gl_Position = ModelViewProjectionMatrix * vec4(position, 1.0); +} |