add scale factor to obj shader and scale tank object up

This commit is contained in:
josh committed 2012-09-08 00:15:41 -04:00
1 parent abb0d99553
commit 22b52f5fcc
2 files changed
+7 -4

No files matched your search

+3 -1
View File
@@ -1,4 +1,6 @@
uniform float scale;
attribute vec3 pos;
attribute vec3 normal;
@@ -7,7 +9,7 @@ varying vec3 normal_i;
void main(void)
{
gl_Position = gl_ModelViewProjectionMatrix * vec4(pos, 1);
gl_Position = gl_ModelViewProjectionMatrix * vec4(scale * pos, 1);
pos_i = gl_Position.xyz;
normal_i = gl_NormalMatrix * normal;
}