mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-09 01:30:49 +00:00
d812c2997c
Needed to allow using the same shader with the backend.
30 lines
597 B
Text
30 lines
597 B
Text
out vec4 v_color;
|
|
out float v_distance;
|
|
out vec4 v_texCoord;
|
|
out float v_fogCoord;
|
|
out vec4 v_eyeCoordPosition;
|
|
|
|
uniform float u_usePalette;
|
|
|
|
in vec4 i_vertPos;
|
|
in vec4 i_texCoord;
|
|
in vec4 i_color;
|
|
|
|
|
|
|
|
void main()
|
|
{
|
|
vec4 vertex = ModelMatrix * i_vertPos;
|
|
vec4 eyeCoordPosition = ViewMatrix * vertex;
|
|
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;
|
|
}
|