old-Testgame/shaders/triangle.v.glsl
2016-08-28 14:55:35 +02:00

10 lines
260 B
GLSL

attribute vec3 coord3d;
attribute vec3 v_color;
varying vec3 f_color;
varying vec3 f_coord3d;
uniform mat4 m_transform;
void main(void) {
gl_Position = m_transform*vec4(coord3d, 1.0);
f_color = v_color;
f_coord3d = (m_transform*vec4(coord3d,1.0)).xyz;
}