26 lines
608 B
GLSL
26 lines
608 B
GLSL
#version 440
|
|
|
|
layout (location = 0) in vec3 position;
|
|
layout (location = 1) in vec3 normal;
|
|
layout (location = 2) in vec2 v_color;
|
|
layout (location = 3) in vec2 texCoords;
|
|
|
|
out vec2 TexCoords;
|
|
out vec3 fragPos;
|
|
out vec3 fragNormal;
|
|
out vec4 fragPosLightSpace;
|
|
|
|
uniform mat4 mvp;
|
|
uniform mat4 ModelViewMatrix;
|
|
uniform mat3 NormalMatrix;
|
|
uniform mat4 lightmvp;
|
|
|
|
void main()
|
|
{
|
|
fragNormal = normalize(NormalMatrix * normal);
|
|
fragPos = vec3(ModelViewMatrix * vec4(position,1.0));
|
|
TexCoords = texCoords;
|
|
fragPosLightSpace = lightmvp * vec4(position,1.0);
|
|
gl_Position = mvp * vec4(position, 1.0f);
|
|
}
|