bgfx/examples/common/font/fs_font_basic.sc

14 lines
291 B
Python
Raw Normal View History

2013-04-22 16:42:11 -04:00
$input v_color0, v_texcoord0
#include "../../common/common.sh"
SAMPLERCUBE(u_texColor, 0);
void main()
2013-06-04 02:16:02 -04:00
{
2013-04-22 16:42:11 -04:00
vec4 color = textureCube(u_texColor, v_texcoord0.xyz);
2013-06-04 02:16:02 -04:00
int index = int(v_texcoord0.w*4.0 + 0.5);
float a = color.bgra[index];
gl_FragColor = vec4(v_color0.rgb, v_color0.a * a);
2013-04-22 16:42:11 -04:00
}