added rendering of MOCV vertex colours
This commit is contained in:
@@ -2,8 +2,10 @@
|
||||
layout(location = 0) in vec3 vertex_position; // position
|
||||
layout(location = 1) in vec3 vertex_normal; // colour of each vertex point
|
||||
layout(location = 2) in vec2 vertex_tex;
|
||||
layout(location = 3) in vec4 vertex_colour;
|
||||
|
||||
out vec2 TexCoord;
|
||||
out vec4 VertexColour;
|
||||
|
||||
uniform mat4 matrix; // must match "matrix" in C code
|
||||
uniform mat4 view; // must match "view" in C code
|
||||
@@ -12,4 +14,5 @@ uniform mat4 proj; // must match "proj" in C code
|
||||
void main() {
|
||||
gl_Position = proj * view * matrix * vec4(vertex_position, 1.0);
|
||||
TexCoord = vertex_tex;
|
||||
VertexColour = vertex_colour;
|
||||
}
|
||||
Reference in New Issue
Block a user