OpenGL-utility/examples/debug/shaders/vertexShader.vert

18 lines
322 B
GLSL
Raw Normal View History

2021-01-20 00:18:31 +01:00
#version 330 core
layout (location = 0) in vec3 aPos;
2021-01-20 16:51:55 +01:00
layout (location = 1) in vec3 aCol;
2021-01-21 12:07:43 +01:00
layout (location = 2) in vec2 aUV;
2021-01-20 16:51:55 +01:00
out vec3 oCol;
2021-01-21 12:07:43 +01:00
out vec2 oUV;
2021-01-20 00:18:31 +01:00
2021-01-22 01:13:01 +01:00
uniform mat4 model;
uniform mat4 view;
uniform mat4 projection;
2021-01-20 00:18:31 +01:00
void main()
{
2021-01-20 16:51:55 +01:00
oCol = aCol;
2021-01-21 12:07:43 +01:00
oUV = aUV;
2021-01-22 01:13:01 +01:00
gl_Position = projection * view * model * vec4(aPos, 1.0);
2021-01-20 00:18:31 +01:00
}