raze-gles/wadsrc/static/engine/shaders/glsl/polymost.vp

31 lines
686 B
Text
Raw Normal View History

out vec4 v_color;
out float v_distance;
out vec4 v_texCoord;
out float v_fogCoord;
2020-01-03 17:34:43 +00:00
out vec4 v_eyeCoordPosition;
out vec4 v_worldPosition;
layout(location = 0) in vec4 i_vertPos;
layout(location = 1) in vec4 i_texCoord;
layout(location = 2) in vec4 i_color;
void main()
{
vec4 vertex = ModelMatrix * i_vertPos;
vec4 eyeCoordPosition = ViewMatrix * vertex;
2020-01-03 17:34:43 +00:00
v_eyeCoordPosition = eyeCoordPosition;
gl_Position = ProjectionMatrix * eyeCoordPosition;
eyeCoordPosition.xyz /= eyeCoordPosition.w;
v_texCoord = TextureMatrix * i_texCoord;
v_fogCoord = abs(eyeCoordPosition.z);
v_color = i_color;
v_distance = eyeCoordPosition.z;
v_worldPosition = vertex;
}