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

39 lines
942 B
Text
Raw Normal View History

#version 120
varying vec4 v_color;
varying float v_distance;
varying vec4 v_texCoord;
varying vec4 v_detailCoord;
varying vec4 v_glowCoord;
varying float v_fogCoord;
uniform float u_usePalette;
uniform mat4 u_rotMatrix;
uniform mat4 u_modelMatrix;
uniform mat4 u_projectionMatrix;
uniform mat4 u_detailMatrix;
uniform mat4 u_glowMatrix;
const float c_zero = 0.0;
const float c_one = 1.0;
void main()
{
vec4 vertex = u_rotMatrix * gl_Vertex;
vec4 eyeCoordPosition = u_modelMatrix * vertex;
gl_Position = u_projectionMatrix * eyeCoordPosition;
eyeCoordPosition.xyz /= eyeCoordPosition.w;
v_texCoord = gl_MultiTexCoord0;
//gl_TexCoord[0] = mix(gl_TexCoord[0].xyzw, gl_TexCoord[0].yxzw, u_usePalette); WTF is this???
v_detailCoord = u_detailMatrix * gl_MultiTexCoord0;
v_glowCoord = u_glowMatrix * gl_MultiTexCoord0;
v_fogCoord = abs(eyeCoordPosition.z);
v_color = gl_Color;
v_distance = gl_Vertex.z;
}