Draw walls using perspective divide

This commit is contained in:
2021-03-18 12:58:17 +01:00
parent e98e7256d2
commit 447268117c
5 changed files with 80 additions and 17 deletions
+18
View File
@@ -0,0 +1,18 @@
#version 430 core
layout (location = 0) in vec3 pos;
layout (location = 1) in vec4 params;
out vec4 vParams;
uniform mat4 worldMat;
mat4 perspective =
mat4 (1,0,0,0
,0,1,0,0
,0,0,1,1
,0,0,0,1
) ;
void main()
{
gl_Position = perspective * worldMat * vec4(pos.xyz, 1);
vParams = params;
}