static const char *demo_vshader_glsl = "uniform mat4 u_matViewProjection;\n" "\n" "attribute vec4 a_glyph_vertex;\n" "\n" "varying vec4 v_glyph;\n" "\n" "vec4\n" "glyph_vertex_transcode (vec2 v)\n" "{\n" " ivec2 g = ivec2 (v);\n" " ivec2 corner = ivec2 (mod (v, 2.));\n" " g /= 2;\n" " ivec2 nominal_size = ivec2 (mod (vec2(g), 64.));\n" " return vec4 (corner * nominal_size, g * 4);\n" "}\n" "\n" "void\n" "main()\n" "{\n" " gl_Position = u_matViewProjection * vec4 (a_glyph_vertex.xy, 0, 1);\n" " v_glyph = glyph_vertex_transcode (a_glyph_vertex.zw);\n" "}\n" ;