2015-10-26 21:36:19 +01:00
|
|
|
#version 120
|
2021-07-09 10:05:27 -07:00
|
|
|
|
2022-04-26 19:54:24 +02:00
|
|
|
#include "openmw_vertex.h.glsl"
|
2021-07-09 10:05:27 -07:00
|
|
|
|
2015-10-26 21:36:19 +01:00
|
|
|
varying vec4 position;
|
2020-03-14 16:39:32 +04:00
|
|
|
varying float linearDepth;
|
2015-10-26 21:36:19 +01:00
|
|
|
|
2018-06-24 23:40:52 +01:00
|
|
|
#include "shadows_vertex.glsl"
|
2021-06-01 12:15:25 -07:00
|
|
|
#include "depth.glsl"
|
2017-10-30 20:06:52 +00:00
|
|
|
|
2015-10-26 21:36:19 +01:00
|
|
|
void main(void)
|
|
|
|
{
|
2022-04-26 19:54:24 +02:00
|
|
|
gl_Position = mw_modelToClip(gl_Vertex);
|
2015-10-26 21:36:19 +01:00
|
|
|
|
|
|
|
position = gl_Vertex;
|
|
|
|
|
2022-04-26 19:54:24 +02:00
|
|
|
vec4 viewPos = mw_modelToView(gl_Vertex);
|
2021-07-09 10:05:27 -07:00
|
|
|
linearDepth = getLinearDepth(gl_Position.z, viewPos.z);
|
2017-10-30 20:06:52 +00:00
|
|
|
|
2021-06-01 12:15:25 -07:00
|
|
|
setupShadowCoords(viewPos, normalize((gl_NormalMatrix * gl_Normal).xyz));
|
2015-10-26 21:36:19 +01:00
|
|
|
}
|