main.vert 378 Bytes
Newer Older
1
2
3
4
5
6
7
#version 440

layout(location = 0) in vec4 position;

layout(std140, binding = 0) uniform buf {
    mat4 mvp;
    mat4 lightMvp;
Laszlo Agocs's avatar
Laszlo Agocs committed
8
    mat4 shadowBias;
9
10
11
12
13
14
15
16
17
    int useShadow;
} ubuf;

out gl_PerVertex { vec4 gl_Position; };

layout(location = 0) out vec4 vLCVertPos;

void main()
{
Laszlo Agocs's avatar
Laszlo Agocs committed
18
    vLCVertPos = ubuf.shadowBias * ubuf.lightMvp * position;
19
20
    gl_Position = ubuf.mvp * position;
}