ecsgame/Shaders/default-vertex.vs

25 lines
610 B
Plaintext
Raw Normal View History

#version 320 es
2020-01-07 15:35:12 +01:00
layout (location = 0) in vec3 aPos;
2020-01-14 13:14:33 +01:00
layout (location = 1) in vec3 NORMAL;
layout (location = 2) in vec2 UV;
2020-11-18 15:30:31 +01:00
layout (location = 3) in vec3 TANGENT;
layout (location = 4) in vec3 BITANGENT;
2020-01-14 13:14:33 +01:00
out vec2 TexCoord;
out vec3 Normal;
out vec3 FragPos;
out vec4 FragPosLightSpace;
2020-01-07 15:35:12 +01:00
uniform mat4 model;
uniform mat4 view;
uniform mat4 projection;
uniform mat4 lightSpaceMatrix;
void main()
{
2020-01-07 15:35:12 +01:00
gl_Position = projection * view * model * vec4(aPos, 1.0);
2020-01-14 13:14:33 +01:00
TexCoord = UV;
Normal = NORMAL;
FragPos = vec3(model * vec4(aPos, 1.0));
FragPosLightSpace = lightSpaceMatrix * vec4(FragPos, 1.0);
}