2022-01-29 00:43:11 +08:00
|
|
|
#version 330
|
|
|
|
|
|
|
|
uniform mat4 projection;
|
|
|
|
uniform mat4 view;
|
|
|
|
uniform mat4 model;
|
|
|
|
uniform mat4 lightspace;
|
|
|
|
|
|
|
|
layout (location = 0) in vec3 vert;
|
|
|
|
layout (location = 1) in vec3 normal;
|
|
|
|
layout (location = 2) in vec2 texCoord;
|
|
|
|
layout (location = 4) in float light;
|
|
|
|
|
|
|
|
out vec4 fragPos;
|
2022-02-21 15:11:13 +08:00
|
|
|
out vec4 fragPosView;
|
2022-01-29 00:43:11 +08:00
|
|
|
out vec4 fragPosLightspace;
|
|
|
|
out vec3 fragNormal;
|
|
|
|
out vec2 fragTexCoord;
|
|
|
|
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
fragTexCoord = texCoord;
|
|
|
|
fragPos = model * vec4(vert, 1);
|
2022-02-21 15:11:13 +08:00
|
|
|
fragPosView = view * fragPos;
|
2022-01-29 00:43:11 +08:00
|
|
|
fragPosLightspace = lightspace * fragPos;
|
|
|
|
fragNormal = normal;
|
2022-02-21 15:11:13 +08:00
|
|
|
gl_Position = projection * fragPosView;
|
2022-01-29 00:43:11 +08:00
|
|
|
}
|
|
|
|
|