blob: d4e5dbc07a43c5b9c6cf1b04d270d8fb99684344 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#version 330 core
layout(location = 0) in vec3 apos;
layout(location = 1) in vec3 anormal;
layout(location = 2) in vec2 atex_coords;
out vec3 frag_pos;
out vec3 normal;
out vec2 tex_coords;
uniform mat4 projection;
uniform mat4 view;
uniform mat4 model;
void
main(void)
{
frag_pos = vec3(model*vec4(apos, 1.0f);
normal = mat3(transpose(inverse(view*model)))*anormal;
tex_coords = atex_coords;
gl_Position = projection*view*model*vec4(apos, 1.0f);
}
|