1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
723 B
GLSL
Raw Normal View History

#version 120
2023-02-25 11:03:39 -08:00
#include "lib/core/vertex.h.glsl"
varying vec4 position;
2020-03-14 16:39:32 +04:00
varying float linearDepth;
#include "shadows_vertex.glsl"
2023-02-25 11:03:39 -08:00
#include "lib/view/depth.glsl"
uniform vec3 nodePosition;
uniform vec3 playerPos;
varying vec3 worldPos;
varying vec2 rippleMapUV;
void main(void)
{
2023-02-25 11:03:39 -08:00
gl_Position = modelToClip(gl_Vertex);
position = gl_Vertex;
worldPos = position.xyz + nodePosition.xyz;
rippleMapUV = (worldPos.xy - playerPos.xy + (@rippleMapSize * @rippleMapWorldScale / 2.0)) / @rippleMapSize / @rippleMapWorldScale;
2023-02-25 11:03:39 -08:00
vec4 viewPos = modelToView(gl_Vertex);
linearDepth = getLinearDepth(gl_Position.z, viewPos.z);
2021-06-01 12:15:25 -07:00
setupShadowCoords(viewPos, normalize((gl_NormalMatrix * gl_Normal).xyz));
}