CMake refactor, fix warnings

This commit is contained in:
2022-10-08 19:05:31 +02:00
parent baf9b17a14
commit 028829a291
36 changed files with 219 additions and 394 deletions

View File

@@ -1,7 +0,0 @@
#version 330 core
void main() {
// Empty as we aren't rendering to any color buffer
}

View File

@@ -1,11 +0,0 @@
#version 330 core
layout(location = 0) in vec3 a_position;
uniform mat4 u_modelViewProjMatrix;
void main() {
gl_Position = u_modelViewProjMatrix * vec4(a_position, 1.0f);
}

View File

@@ -1,17 +0,0 @@
#version 330 core
in vec4 v_fragmentPosition;
uniform vec3 v_lightPos;
uniform float pointShadowDepthMapFarPlane;
void main() {
// Distance between fragment and light source
float lightDistance = length(v_fragmentPosition.xyz - v_lightPos);
// map to [0;1] range
lightDistance = lightDistance / pointShadowDepthMapFarPlane;
gl_FragDepth = lightDistance;
}

View File

@@ -1,25 +0,0 @@
#version 330 core
layout (triangles) in;
layout (triangle_strip, max_vertices=18) out;
uniform mat4 u_shadowMatrices[6];
out vec4 v_fragmentPosition;
void main() {
for(int face = 0; face < 6; face++) {
gl_Layer = face;
for(int i = 0; i < 3; i++) {
v_fragmentPosition = gl_in[i].gl_Position;
gl_Position = u_shadowMatrices[face] * v_fragmentPosition;
EmitVertex();
}
EndPrimitive();
}
}

View File

@@ -1,10 +0,0 @@
#version 330 core
layout(location = 0) in vec3 a_position;
uniform mat4 u_modelMatrix;
void main() {
gl_Position = u_modelMatrix * vec4(a_position, 1.0f);
}