16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 00:09:18 +02:00

fixes, fog experiments, add shaders to tree

This commit is contained in:
VB
2017-06-29 13:07:10 +02:00
parent 22f6d1f0f7
commit 2e022a91dd
10 changed files with 248 additions and 50 deletions

21
shaders/lighting.vert Normal file
View File

@@ -0,0 +1,21 @@
#version 330
layout (location = 0) in vec3 v_vert;
layout (location = 1) in vec3 v_normal;
layout (location = 2) in vec2 v_coord;
out vec3 f_normal;
out vec2 f_coord;
out vec3 f_pos;
uniform mat4 modelview;
uniform mat3 modelviewnormal;
uniform mat4 projection;
void main()
{
gl_Position = (projection * modelview) * vec4(v_vert, 1.0f);
f_normal = modelviewnormal * v_normal;
f_coord = v_coord;
f_pos = vec3(modelview * vec4(v_vert, 1.0f));
}