17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-19 00:19:19 +02:00

Cast shadows of the cab lamp from the cab in the GL 4.6 renderer

This commit is contained in:
2026-10-16 02:43:27 +02:00
parent 4d3a401aae
commit 06d7b9e9f0
15 changed files with 568 additions and 8 deletions

15
shaders/shadowcube.vert Normal file
View File

@@ -0,0 +1,15 @@
layout(location = 0) in vec3 v_vert;
layout(location = 2) in vec2 v_coord;
// position in the space of the cube shadow map being drawn (origin at the lamp), see shadowcube.geom
out vec3 g_pos;
out vec2 g_coord;
#include <common>
void main()
{
g_pos = (effective_modelview() * vec4(v_vert, 1.0f)).xyz;
g_coord = v_coord;
gl_Position = vec4(g_pos, 1.0f);
}