summaryrefslogtreecommitdiff
path: root/resources/shader.vertexshader
blob: 55b5250736270f404e439e9239be1cc440192adf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#version 330 core

// Input vertex data, different for all executions of this shader.
layout(location = 0) in vec3 vertexPosition_modelspace;
layout(location = 1) in vec3 vertexColor;

uniform mat4 MVP;

out vec3 fragmentcolor;

void main() {

    gl_Position = MVP * vec4(vertexPosition_modelspace, 1);
    // gl_Position.w = 1.0;

    fragmentcolor.r = gl_position.x; //= vertexColor;
    fragmentcolor.g = gl_position.y; //= vertexColor;
    fragmentcolor.b = gl_position.z; //= vertexColor;
}