CMake refactor, fix warnings
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
#version 330 core
|
||||
|
||||
void main() {
|
||||
|
||||
// Empty as we aren't rendering to any color buffer
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user