2022-02-05 20:44:31 +00:00
|
|
|
R"(#version 330 core
|
|
|
|
// Input vertex data, different for all executions of this shader.
|
|
|
|
layout(location = 0) in vec3 vertexPosition_modelspace;
|
2022-02-06 13:47:33 +00:00
|
|
|
layout(location = 1) in vec2 texCoords;
|
2022-02-05 20:44:31 +00:00
|
|
|
|
|
|
|
//// Values that stay constant for the whole mesh.
|
|
|
|
uniform mat4 MVP;
|
|
|
|
uniform mat4 translation;
|
|
|
|
|
2022-02-06 13:47:33 +00:00
|
|
|
out vec2 v_texcoords;
|
2022-02-05 20:44:31 +00:00
|
|
|
|
|
|
|
void main(){
|
|
|
|
// Output position of the vertex, in clip space : MVP * position
|
|
|
|
vec4 pos = MVP * translation * vec4(vertexPosition_modelspace,1);
|
|
|
|
gl_Position = pos;
|
2022-02-06 13:47:33 +00:00
|
|
|
v_texcoords = texCoords;
|
2022-02-05 20:44:31 +00:00
|
|
|
})";
|