2019-10-06 08:46:23 +00:00
|
|
|
out vec4 v_color;
|
|
|
|
out float v_distance;
|
|
|
|
out vec4 v_texCoord;
|
2020-06-04 18:14:48 +00:00
|
|
|
out float v_fogCoord;
|
2020-01-03 17:34:43 +00:00
|
|
|
out vec4 v_eyeCoordPosition;
|
2019-07-12 08:44:36 +00:00
|
|
|
|
|
|
|
uniform float u_usePalette;
|
|
|
|
|
2019-10-06 08:46:23 +00:00
|
|
|
in vec4 i_vertPos;
|
|
|
|
in vec4 i_texCoord;
|
|
|
|
in vec4 i_color;
|
|
|
|
|
|
|
|
|
2019-07-12 08:44:36 +00:00
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
2020-06-04 19:34:27 +00:00
|
|
|
vec4 vertex = ModelMatrix * i_vertPos;
|
2020-06-04 18:14:48 +00:00
|
|
|
vec4 eyeCoordPosition = ViewMatrix * vertex;
|
2020-01-03 17:34:43 +00:00
|
|
|
v_eyeCoordPosition = eyeCoordPosition;
|
2020-06-04 18:14:48 +00:00
|
|
|
gl_Position = ProjectionMatrix * eyeCoordPosition;
|
2019-07-12 08:44:36 +00:00
|
|
|
|
|
|
|
eyeCoordPosition.xyz /= eyeCoordPosition.w;
|
|
|
|
|
2020-06-04 19:34:27 +00:00
|
|
|
v_texCoord = TextureMatrix * i_texCoord;
|
2019-07-12 08:44:36 +00:00
|
|
|
|
2020-06-04 18:14:48 +00:00
|
|
|
v_fogCoord = abs(eyeCoordPosition.z);
|
2019-07-12 08:44:36 +00:00
|
|
|
|
2019-10-06 08:46:23 +00:00
|
|
|
v_color = i_color;
|
2019-12-19 16:51:33 +00:00
|
|
|
v_distance = eyeCoordPosition.z;
|
2019-07-12 08:44:36 +00:00
|
|
|
}
|