2018-09-08 04:06:10 +00:00
|
|
|
#version 430
|
2018-09-07 04:41:34 +00:00
|
|
|
layout(location = 0) in vec3 vertex_position;
|
|
|
|
layout(location = 1) in vec4 vertex_color;
|
2018-09-08 04:06:10 +00:00
|
|
|
layout(location = 2) in vec3 vertex_offset;
|
|
|
|
|
|
|
|
// TODO: Try this with location 0
|
|
|
|
layout(location = 3) uniform mat4 vp;
|
2018-09-07 04:41:34 +00:00
|
|
|
|
2018-09-10 01:20:56 +00:00
|
|
|
out vec4 fragment_color;
|
2018-09-07 04:41:34 +00:00
|
|
|
void main()
|
|
|
|
{
|
2018-09-10 01:20:56 +00:00
|
|
|
fragment_color = vertex_color;
|
2018-09-08 04:06:10 +00:00
|
|
|
gl_Position = vp * vec4(vertex_position + vertex_offset, 1.0);
|
2018-09-07 04:41:34 +00:00
|
|
|
}
|