18 lines
483 B
GLSL
18 lines
483 B
GLSL
#version 460
|
|
|
|
layout(location = 0) in vec3 vertex_position;
|
|
layout(location = 1) in vec3 vertex_colour;
|
|
|
|
uniform mat4 matrix;
|
|
uniform mat4 view;
|
|
uniform mat4 proj;
|
|
|
|
out vec3 colour;
|
|
|
|
void main() {
|
|
colour = vertex_colour;
|
|
// multiplication in column major order
|
|
// currently proj * view * matrix * vec4(vertex_position, 1.0) does not work! projection matrix is wrong?
|
|
// need to reread the chapter
|
|
gl_Position = proj * view * matrix * vec4(vertex_position, 1.0);
|
|
} |