mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-30 20:13:22 +08:00
22 lines
492 B
GLSL
22 lines
492 B
GLSL
#version 330 core
|
|
layout (location = 0) in vec3 aPos;
|
|
layout (location = 1) in vec3 aNormal;
|
|
layout (location = 2) in vec2 aTexCoords;
|
|
|
|
// declare an interface block; see 'Advanced GLSL' for what these are.
|
|
out VS_OUT {
|
|
vec3 FragPos;
|
|
vec3 Normal;
|
|
vec2 TexCoords;
|
|
} vs_out;
|
|
|
|
uniform mat4 projection;
|
|
uniform mat4 view;
|
|
|
|
void main()
|
|
{
|
|
vs_out.FragPos = aPos;
|
|
vs_out.Normal = aNormal;
|
|
vs_out.TexCoords = aTexCoords;
|
|
gl_Position = projection * view * vec4(aPos, 1.0);
|
|
} |