2015-10-26 20:36:19 +00:00
|
|
|
#version 120
|
|
|
|
|
|
|
|
varying vec3 screenCoordsPassthrough;
|
|
|
|
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"
|
2017-10-30 20:06:52 +00:00
|
|
|
|
2015-10-26 20:36:19 +00:00
|
|
|
void main(void)
|
|
|
|
{
|
|
|
|
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
|
|
|
|
|
|
|
|
mat4 scalemat = mat4(0.5, 0.0, 0.0, 0.0,
|
2018-06-22 00:05:45 +00:00
|
|
|
0.0, -0.5, 0.0, 0.0,
|
|
|
|
0.0, 0.0, 0.5, 0.0,
|
|
|
|
0.5, 0.5, 0.5, 1.0);
|
2015-10-26 20:36:19 +00:00
|
|
|
|
|
|
|
vec4 texcoordProj = ((scalemat) * ( gl_Position));
|
2019-08-30 19:01:03 +00:00
|
|
|
screenCoordsPassthrough = texcoordProj.xyw;
|
2015-10-26 20:36:19 +00:00
|
|
|
|
|
|
|
position = gl_Vertex;
|
|
|
|
|
2020-03-14 12:39:32 +00:00
|
|
|
linearDepth = gl_Position.z;
|
2017-10-30 20:06:52 +00:00
|
|
|
|
2019-01-30 22:28:00 +00:00
|
|
|
setupShadowCoords(gl_ModelViewMatrix * gl_Vertex, normalize((gl_NormalMatrix * gl_Normal).xyz));
|
2015-10-26 20:36:19 +00:00
|
|
|
}
|