From 5a37c7f33e5b3584a3561f240392814940a69956 Mon Sep 17 00:00:00 2001 From: toruwest Date: Wed, 15 Oct 2014 23:11:11 +0900 Subject: Added. --- src/demos/instancedRendering/shader/triangles.vp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/demos/instancedRendering/shader/triangles.vp (limited to 'src/demos/instancedRendering/shader/triangles.vp') diff --git a/src/demos/instancedRendering/shader/triangles.vp b/src/demos/instancedRendering/shader/triangles.vp new file mode 100644 index 0000000..91cc6ef --- /dev/null +++ b/src/demos/instancedRendering/shader/triangles.vp @@ -0,0 +1,17 @@ +// Copyright 2014 JogAmp Community. All rights reserved. + +#if __VERSION__ >= 130 + #define attribute in + #define varying out +#endif + +uniform mat4 mgl_PMatrix; +uniform mat4 mgl_MVMatrix[NO_OF_INSTANCE]; +attribute vec3 mgl_Vertex; +attribute vec4 mgl_Color; +varying vec4 frontColor; + +void main(void) { + frontColor = mgl_Color; + gl_Position = mgl_PMatrix * mgl_MVMatrix[gl_InstanceID] * vec4(mgl_Vertex, 1); +} -- cgit v1.2.3