2015-10-26 20:36:19 +00:00
|
|
|
#version 120
|
2021-07-09 17:05:27 +00:00
|
|
|
|
|
|
|
uniform mat4 projectionMatrix;
|
|
|
|
|
2015-10-26 20:36:19 +00:00
|
|
|
varying vec4 position;
|
2020-03-14 12:39:32 +00:00
|
|
|
varying float linearDepth;
|
2015-10-26 20:36:19 +00:00
|
|
|
|
2018-06-24 22:40:52 +00:00
|
|
|
#include "shadows_vertex.glsl"
|
2021-06-01 19:15:25 +00:00
|
|
|
#include "depth.glsl"
|
2017-10-30 20:06:52 +00:00
|
|
|
|
2015-10-26 20:36:19 +00:00
|
|
|
void main(void)
|
|
|
|
{
|
2021-07-09 17:05:27 +00:00
|
|
|
gl_Position = projectionMatrix * (gl_ModelViewMatrix * gl_Vertex);
|
2015-10-26 20:36:19 +00:00
|
|
|
|
|
|
|
position = gl_Vertex;
|
|
|
|
|
2021-06-01 19:15:25 +00:00
|
|
|
vec4 viewPos = gl_ModelViewMatrix * gl_Vertex;
|
2021-07-09 17:05:27 +00:00
|
|
|
linearDepth = getLinearDepth(gl_Position.z, viewPos.z);
|
2017-10-30 20:06:52 +00:00
|
|
|
|
2021-06-01 19:15:25 +00:00
|
|
|
setupShadowCoords(viewPos, normalize((gl_NormalMatrix * gl_Normal).xyz));
|
2015-10-26 20:36:19 +00:00
|
|
|
}
|