blob: 8f8260e601c37a787e13b8cb01913f0f30b30bab [file] [edit]
static const char *demo_vertex_glsl =
"/*\n"
" * Copyright 2026 Behdad Esfahbod. All Rights Reserved.\n"
" */\n"
"\n"
"uniform mat4 u_matViewProjection;\n"
"uniform vec2 u_viewport;\n"
"\n"
"in vec2 a_position;\n"
"in vec2 a_texcoord;\n"
"in vec2 a_normal;\n"
"in float a_emPerPos;\n"
"in uint a_glyphLoc;\n"
"\n"
"out vec2 v_texcoord;\n"
"flat out uint v_glyphLoc;\n"
"\n"
"void main ()\n"
"{\n"
" vec2 pos = a_position;\n"
" vec2 tex = a_texcoord;\n"
"\n"
" vec4 jac = vec4 (a_emPerPos, 0.0, 0.0, -a_emPerPos);\n"
"\n"
" hb_gpu_dilate (pos, tex, a_normal, jac,\n"
" u_matViewProjection, u_viewport);\n"
"\n"
" gl_Position = u_matViewProjection * vec4 (pos, 0.0, 1.0);\n"
" v_texcoord = tex;\n"
" v_glyphLoc = a_glyphLoc;\n"
"}\n"
;