csci5607/assignment-2a/src/vshader2a.glsl

12 lines
270 B
Text
Raw Normal View History

2023-04-03 07:56:41 +00:00
// vertex shader template
2023-04-04 07:22:46 +00:00
#version 150
in vec4 vertex_position;
in vec4 vertex_color;
out vec4 vcolor;
uniform mat4 M;
2023-04-08 21:53:37 +00:00
void main() {
gl_Position = M*vertex_position; // update vertex position using M
vcolor = vertex_color; // pass vertex color to fragment shader
}