mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-17 09:51:38 +00:00
62e9112133
All this comes from a time when I didn't use version.h so it's better to do it the same way as GZDoom to allow easy renaming of the engine.
39 lines
817 B
Text
39 lines
817 B
Text
#version 330
|
|
|
|
out vec4 v_color;
|
|
out float v_distance;
|
|
out vec4 v_texCoord;
|
|
out vec4 v_detailCoord;
|
|
out 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_textureMatrix;
|
|
|
|
in vec4 i_vertPos;
|
|
in vec4 i_texCoord;
|
|
in vec4 i_color;
|
|
|
|
|
|
const float c_zero = 0.0;
|
|
const float c_one = 1.0;
|
|
|
|
void main()
|
|
{
|
|
vec4 vertex = u_rotMatrix * i_vertPos;
|
|
vec4 eyeCoordPosition = u_modelMatrix * vertex;
|
|
gl_Position = u_projectionMatrix * eyeCoordPosition;
|
|
|
|
eyeCoordPosition.xyz /= eyeCoordPosition.w;
|
|
|
|
v_texCoord = u_textureMatrix * i_texCoord;
|
|
v_detailCoord = u_detailMatrix * i_texCoord;
|
|
|
|
v_fogCoord = abs(eyeCoordPosition.z);
|
|
|
|
v_color = i_color;
|
|
v_distance = eyeCoordPosition.z;
|
|
}
|