Moved the example game's assets
This commit is contained in:
1 parent
0559415e5b
commit
1d97a6f543
55 files changed
+2
-2
No files matched your search
@@ -0,0 +1,5 @@
|
||||
#version 330 core
|
||||
|
||||
void main() {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
#version 330 core
|
||||
|
||||
layout(location = 0) in vec3 pos;
|
||||
|
||||
uniform mat4 lightSpace;
|
||||
uniform mat4 model[60];
|
||||
|
||||
out vec3 texCoord;
|
||||
|
||||
void main() {
|
||||
gl_Position = lightSpace * model[gl_InstanceID] * vec4(pos, 1.0);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
#version 330 core
|
||||
|
||||
in vec4 fragPos;
|
||||
|
||||
uniform vec3 lightPos;
|
||||
uniform float farPlane;
|
||||
|
||||
void main() {
|
||||
float dist = length(fragPos.xyz - lightPos);
|
||||
dist /= farPlane;
|
||||
gl_FragDepth = dist;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
#version 330 core
|
||||
|
||||
layout(triangles) in;
|
||||
layout(triangle_strip, max_vertices = 18) out;
|
||||
|
||||
uniform mat4 lightSpaceMat[6];
|
||||
|
||||
out vec4 fragPos;
|
||||
|
||||
void main() {
|
||||
for (int face = 0; face < 6; face++) {
|
||||
gl_Layer = face;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
fragPos = gl_in[i].gl_Position;
|
||||
gl_Position = lightSpaceMat[face] * fragPos;
|
||||
EmitVertex();
|
||||
}
|
||||
EndPrimitive();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#version 330 core
|
||||
|
||||
layout(location = 0) in vec3 pos;
|
||||
|
||||
uniform mat4 model[60];
|
||||
|
||||
void main() {
|
||||
gl_Position = model[gl_InstanceID] * vec4(pos, 1.0);
|
||||
}
|
||||
Reference in new issue
Block a user