fae 0.2.0

A simple and fast 2D rendering crate with optional window creation and text rendering functionality.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#version 110

varying vec2 frag_texcoord;
varying vec4 frag_color;
uniform sampler2D tex;

void main(void) {
  vec4 out_color;
  if (frag_texcoord.x == -1.0 && frag_texcoord.y == -1.0) {
    out_color = frag_color;
  } else {
    out_color = frag_color * texture2D(tex, frag_texcoord);
  }
  if (out_color.a < 0.01) {
    discard;
  }
  gl_FragColor = out_color;
}