TextureShader.vert 576 Bytes
Newer Older
1
2
3
4
5
#version 450 core

// Input vertex data, different for all executions of this shader.
layout(location = 0) in vec3 vertexPosition_modelspace;
layout(location = 1) in vec2 vertexUV;
Anakin's avatar
Anakin committed
6
7
8
9
layout(location = 2) in mat4 mvp;
//layout(location = 3) in mat4 mvp;
//layout(location = 4) in mat4 mvp;
//layout(location = 5) in mat4 mvp;
10
11
12
13
14

// Output
out vec2 UV;

// Values that stay constant for the whole mesh.
Anakin's avatar
Anakin committed
15
//uniform mat4 MVP;
16
17
18
19

void main(){

	// Output position of the vertex, in clip space : MVP * position
Anakin's avatar
Anakin committed
20
	gl_Position =  mvp * vec4(vertexPosition_modelspace, 1);
21
22
23
24

	UV = vertexUV;

}