@@ -28,6 +28,30 @@ shader 0 "hud" [
2828 }
2929]
3030
31+ shader 0 " hudtext" [
32+ attribute vec4 vvertex, vcolor;
33+ attribute vec2 vtexcoord0;
34+ uniform mat4 hudmatrix;
35+ varying vec2 texcoord0;
36+ varying vec4 colorscale;
37+ void main(void)
38+ {
39+ gl_Position = hudmatrix * vvertex;
40+ texcoord0 = vtexcoord0;
41+ colorscale = vcolor;
42+ }
43+ ] [
44+ uniform sampler2DRect tex0;
45+ varying vec2 texcoord0;
46+ varying vec4 colorscale;
47+ fragdata(0) vec4 fragcolor;
48+ void main(void)
49+ {
50+ fragcolor = colorscale * texture2DRect(tex0, texcoord0);
51+ if(fragcolor.a != 0) fragcolor.rgb /= fragcolor.a;
52+ }
53+ ]
54+
3155shader 0 " hudrgb" [
3256 attribute vec4 vvertex, vcolor;
3357 attribute vec2 vtexcoord0;
@@ -125,30 +149,6 @@ shader 0 "hudrect" [
125149 }
126150]
127151
128- shader 0 " hudtext" [
129- attribute vec4 vvertex, vcolor;
130- attribute vec2 vtexcoord0;
131- uniform mat4 hudmatrix;
132- varying vec2 texcoord0;
133- varying vec4 colorscale;
134- void main(void)
135- {
136- gl_Position = hudmatrix * vvertex;
137- texcoord0 = vtexcoord0;
138- colorscale = vcolor;
139- }
140- ] [
141- uniform sampler2DRect tex0;
142- varying vec2 texcoord0;
143- varying vec4 colorscale;
144- fragdata(0) vec4 fragcolor;
145- void main(void)
146- {
147- fragcolor = colorscale * texture2DRect(tex0, texcoord0);
148- if(fragcolor.a != 0) fragcolor.rgb = fragcolor.rgb / fragcolor.a;
149- }
150- ]
151-
152152shader 0 " hud3d" [
153153 attribute vec4 vvertex, vcolor;
154154 attribute vec3 vtexcoord0;
0 commit comments