Remove the long dead text vertex shader.

This commit is contained in:
Bill Currie 2014-01-28 12:22:38 +09:00
parent 1d67f8f0c3
commit 68bd7e643d
3 changed files with 2 additions and 56 deletions

View File

@ -6,12 +6,11 @@ AM_CPPFLAGS= -I$(top_srcdir)/include $(GLX_CFLAGS)
shader_src= quakeforge.glsl \
iqm.frag iqm.vert \
quake2d.frag quakeico.vert \
quakespr.frag quakespr.vert \
quaketxt.vert
quakespr.frag quakespr.vert
shader_gen= quakeforge.slc \
iqm.fc iqm.vc \
quake2d.fc quakeico.vc \
quakespr.fc quakespr.vc quaketxt.vc
quakespr.fc quakespr.vc
glsl_src = \
glsl_alias.c glsl_bsp.c glsl_draw.c glsl_fog.c glsl_iqm.c glsl_lightmap.c \

View File

@ -76,10 +76,6 @@ static const char quakeicon_vert[] =
#include "quakeico.vc"
;
static const char quaketext_vert[] =
#include "quaketxt.vc"
;
static const char quake2d_frag[] =
#include "quake2d.fc"
;

View File

@ -1,49 +0,0 @@
uniform mat4 mvp_mat;
/** Vertex position.
x, y, cx, cy
\a vertex provides the onscreen location at which to draw the character
(\a x, \a y) and which corner of the character cell this vertex
represents (\a cx, \a cy). \a cx and \a cy must be either 0 or 1, or
wierd things will happen with the character cell.
*/
attribute vec4 vertex;
/** Vectex color.
r, g, b, a
*/
attribute vec4 vcolor;
/** The character to draw.
The quake character map supports only 256 characters, 0-255. Any other
value will give interesting results.
*/
attribute float dchar;
/** Coordinate in character map texture.
*/
varying vec4 color;
varying vec2 st;
void
main (void)
{
float row, col;
vec2 pos, corner, uv;
const vec2 inset = vec2 (0.03125, 0.03125);
const vec2 size = vec2 (0.0625, 0.0625);
row = floor (dchar / 16.0);
col = mod (dchar, 16.0);
pos = vertex.xy;
corner = vertex.zw;
uv = vec2 (col, row) + inset * (1.0 - 2.0 * corner) + corner;
uv *= size;
gl_Position = mvp_mat * vec4 (pos + corner * 8.0, 0.0, 1.0);
st = uv;
color = vcolor;
}