1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2024-12-29 03:19:44 +00:00
OpenMW/files/shaders/compatibility/depthclipped.vert

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

23 lines
463 B
GLSL
Raw Normal View History

2022-05-14 01:58:00 +00:00
#version 120
varying vec2 diffuseMapUV;
varying float alphaPassthrough;
2023-02-25 19:03:39 +00:00
#include "lib/core/vertex.h.glsl"
2022-05-14 01:58:00 +00:00
#include "vertexcolors.glsl"
void main()
{
2023-02-25 19:03:39 +00:00
gl_Position = modelToClip(gl_Vertex);
vec4 viewPos = modelToView(gl_Vertex);
gl_ClipVertex = viewPos;
2022-05-14 01:58:00 +00:00
if (colorMode == 2)
alphaPassthrough = gl_Color.a;
else
alphaPassthrough = gl_FrontMaterial.diffuse.a;
diffuseMapUV = (gl_TextureMatrix[0] * gl_MultiTexCoord0).xy;
}