Added 20-nanovg example.
1109
examples/20-nanovg/nanovg.cpp
Normal file
BIN
examples/20-nanovg/screenshot.png
Normal file
After Width: | Height: | Size: 105 KiB |
1668
examples/common/nanovg/fontstash.h
Normal file
513
examples/common/nanovg/fs_nanovg_fill.bin.h
Normal file
|
@ -0,0 +1,513 @@
|
||||||
|
static const uint8_t fs_nanovg_fill_glsl[3149] =
|
||||||
|
{
|
||||||
|
0x46, 0x53, 0x48, 0x02, 0xcf, 0xda, 0x1b, 0x94, 0x08, 0x00, 0x0c, 0x75, 0x5f, 0x73, 0x63, 0x69, // FSH........u_sci
|
||||||
|
0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x74, 0x08, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x75, 0x5f, // ssorMat.......u_
|
||||||
|
0x70, 0x61, 0x69, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x08, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, 0x75, // paintMat.......u
|
||||||
|
0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x07, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0a, // _innerCol.......
|
||||||
|
0x75, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x07, 0x01, 0x00, 0x00, 0x01, 0x00, // u_outerCol......
|
||||||
|
0x11, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x53, 0x63, 0x61, // .u_scissorExtSca
|
||||||
|
0x6c, 0x65, 0x07, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0e, 0x75, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, // le.......u_exten
|
||||||
|
0x74, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x07, 0x01, 0x00, 0x00, 0x01, 0x00, 0x08, 0x75, 0x5f, // tRadius.......u_
|
||||||
|
0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x07, 0x01, 0x00, 0x00, 0x01, 0x00, 0x05, 0x73, 0x5f, 0x74, // params.......s_t
|
||||||
|
0x65, 0x78, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0xb0, 0x0b, 0x00, 0x00, 0x76, 0x61, 0x72, 0x79, // ex..........vary
|
||||||
|
0x69, 0x6e, 0x67, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, // ing mediump vec2
|
||||||
|
0x20, 0x76, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x76, 0x61, 0x72, // v_position;.var
|
||||||
|
0x79, 0x69, 0x6e, 0x67, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, // ying mediump vec
|
||||||
|
0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, // 2 v_texcoord0;.u
|
||||||
|
0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x6d, // niform mediump m
|
||||||
|
0x61, 0x74, 0x33, 0x20, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x74, // at3 u_scissorMat
|
||||||
|
0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, // ;.uniform medium
|
||||||
|
0x70, 0x20, 0x6d, 0x61, 0x74, 0x33, 0x20, 0x75, 0x5f, 0x70, 0x61, 0x69, 0x6e, 0x74, 0x4d, 0x61, // p mat3 u_paintMa
|
||||||
|
0x74, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, // t;.uniform mediu
|
||||||
|
0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x75, 0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x43, // mp vec4 u_innerC
|
||||||
|
0x6f, 0x6c, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x65, 0x64, 0x69, // ol;.uniform medi
|
||||||
|
0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x75, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, // ump vec4 u_outer
|
||||||
|
0x43, 0x6f, 0x6c, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x65, 0x64, // Col;.uniform med
|
||||||
|
0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, // iump vec4 u_scis
|
||||||
|
0x73, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x3b, 0x0a, 0x75, 0x6e, 0x69, // sorExtScale;.uni
|
||||||
|
0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, // form mediump vec
|
||||||
|
0x34, 0x20, 0x75, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, // 4 u_extentRadius
|
||||||
|
0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, // ;.uniform medium
|
||||||
|
0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3b, // p vec4 u_params;
|
||||||
|
0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, // .uniform sampler
|
||||||
|
0x32, 0x44, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, // 2D s_tex;.void m
|
||||||
|
0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, // ain ().{. lowp
|
||||||
|
0x76, 0x65, 0x63, 0x34, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x31, 0x3b, 0x0a, 0x20, // vec4 result_1;.
|
||||||
|
0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x74, // mediump float t
|
||||||
|
0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, // mpvar_2;. mediu
|
||||||
|
0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, // mp vec3 tmpvar_3
|
||||||
|
0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x2e, 0x7a, 0x20, 0x3d, // ;. tmpvar_3.z =
|
||||||
|
0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, // 1.0;. tmpvar_3
|
||||||
|
0x2e, 0x78, 0x79, 0x20, 0x3d, 0x20, 0x76, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // .xy = v_position
|
||||||
|
0x3b, 0x0a, 0x20, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, // ;. mediump vec2
|
||||||
|
0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, // tmpvar_4;. tmp
|
||||||
|
0x76, 0x61, 0x72, 0x5f, 0x34, 0x20, 0x3d, 0x20, 0x28, 0x76, 0x65, 0x63, 0x32, 0x28, 0x30, 0x2e, // var_4 = (vec2(0.
|
||||||
|
0x35, 0x2c, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x20, 0x2d, 0x20, 0x28, 0x28, 0x0a, 0x20, 0x20, 0x20, // 5, 0.5) - ((.
|
||||||
|
0x20, 0x61, 0x62, 0x73, 0x28, 0x28, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, 0x72, 0x4d, // abs((u_scissorM
|
||||||
|
0x61, 0x74, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x33, 0x29, 0x2e, 0x78, // at * tmpvar_3).x
|
||||||
|
0x79, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x2d, 0x20, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, // y). - u_scisso
|
||||||
|
0x72, 0x45, 0x78, 0x74, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x2e, 0x78, 0x79, 0x29, 0x20, 0x2a, 0x20, // rExtScale.xy) *
|
||||||
|
0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x53, 0x63, 0x61, 0x6c, // u_scissorExtScal
|
||||||
|
0x65, 0x2e, 0x7a, 0x77, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // e.zw));. tmpvar
|
||||||
|
0x5f, 0x32, 0x20, 0x3d, 0x20, 0x28, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x20, 0x28, 0x74, 0x6d, 0x70, // _2 = (clamp (tmp
|
||||||
|
0x76, 0x61, 0x72, 0x5f, 0x34, 0x2e, 0x78, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, // var_4.x, 0.0, 1.
|
||||||
|
0x30, 0x29, 0x20, 0x2a, 0x20, 0x63, 0x6c, 0x61, 0x6d, 0x70, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, // 0) * clamp (tmpv
|
||||||
|
0x61, 0x72, 0x5f, 0x34, 0x2e, 0x79, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, // ar_4.y, 0.0, 1.0
|
||||||
|
0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x66, 0x6c, // ));. mediump fl
|
||||||
|
0x6f, 0x61, 0x74, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x35, 0x3b, 0x0a, 0x20, 0x20, // oat tmpvar_5;.
|
||||||
|
0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x35, 0x20, 0x3d, 0x20, 0x28, 0x6d, 0x69, 0x6e, 0x20, // tmpvar_5 = (min
|
||||||
|
0x28, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x28, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x28, 0x31, 0x2e, 0x30, // (1.0, (. (1.0
|
||||||
|
0x20, 0x2d, 0x20, 0x61, 0x62, 0x73, 0x28, 0x28, 0x28, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // - abs(((v_texco
|
||||||
|
0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x20, 0x2a, 0x20, 0x32, 0x2e, 0x30, 0x29, 0x20, 0x2d, 0x20, // ord0.x * 2.0) -
|
||||||
|
0x31, 0x2e, 0x30, 0x29, 0x29, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x75, 0x5f, 0x70, 0x61, // 1.0))). * u_pa
|
||||||
|
0x72, 0x61, 0x6d, 0x73, 0x2e, 0x79, 0x29, 0x29, 0x20, 0x2a, 0x20, 0x6d, 0x69, 0x6e, 0x20, 0x28, // rams.y)) * min (
|
||||||
|
0x31, 0x2e, 0x30, 0x2c, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, // 1.0, v_texcoord0
|
||||||
|
0x2e, 0x79, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x28, 0x75, 0x5f, 0x70, // .y));. if ((u_p
|
||||||
|
0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x77, 0x20, 0x3d, 0x3d, 0x20, 0x30, 0x2e, 0x30, 0x29, 0x29, // arams.w == 0.0))
|
||||||
|
0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, // {. mediump v
|
||||||
|
0x65, 0x63, 0x34, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x36, 0x3b, 0x0a, 0x20, 0x20, 0x20, // ec4 color_6;.
|
||||||
|
0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x74, 0x6d, // mediump vec3 tm
|
||||||
|
0x70, 0x76, 0x61, 0x72, 0x5f, 0x37, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, // pvar_7;. tmpv
|
||||||
|
0x61, 0x72, 0x5f, 0x37, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, // ar_7.z = 1.0;.
|
||||||
|
0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x37, 0x2e, 0x78, 0x79, 0x20, 0x3d, 0x20, // tmpvar_7.xy =
|
||||||
|
0x76, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, // v_position;.
|
||||||
|
0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x74, 0x6d, 0x70, // mediump vec2 tmp
|
||||||
|
0x76, 0x61, 0x72, 0x5f, 0x38, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // var_8;. tmpva
|
||||||
|
0x72, 0x5f, 0x38, 0x20, 0x3d, 0x20, 0x28, 0x61, 0x62, 0x73, 0x28, 0x28, 0x75, 0x5f, 0x70, 0x61, // r_8 = (abs((u_pa
|
||||||
|
0x69, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // intMat * tmpvar_
|
||||||
|
0x37, 0x29, 0x2e, 0x78, 0x79, 0x29, 0x20, 0x2d, 0x20, 0x28, 0x75, 0x5f, 0x65, 0x78, 0x74, 0x65, // 7).xy) - (u_exte
|
||||||
|
0x6e, 0x74, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x2e, 0x78, 0x79, 0x20, 0x2d, 0x20, 0x75, 0x5f, // ntRadius.xy - u_
|
||||||
|
0x65, 0x78, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x2e, 0x7a, 0x7a, 0x29, // extentRadius.zz)
|
||||||
|
0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, // );. mediump v
|
||||||
|
0x65, 0x63, 0x32, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x3b, 0x0a, 0x20, 0x20, // ec2 tmpvar_9;.
|
||||||
|
0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x20, 0x3d, 0x20, 0x6d, 0x61, 0x78, // tmpvar_9 = max
|
||||||
|
0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x38, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x29, // (tmpvar_8, 0.0)
|
||||||
|
0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, // ;. mediump ve
|
||||||
|
0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x30, 0x3b, 0x0a, 0x20, 0x20, // c4 tmpvar_10;.
|
||||||
|
0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x30, 0x20, 0x3d, 0x20, 0x6d, 0x69, // tmpvar_10 = mi
|
||||||
|
0x78, 0x20, 0x28, 0x75, 0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x2c, 0x20, 0x75, // x (u_innerCol, u
|
||||||
|
0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x2c, 0x20, 0x63, 0x6c, 0x61, 0x6d, 0x70, // _outerCol, clamp
|
||||||
|
0x20, 0x28, 0x28, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x28, 0x28, 0x28, 0x6d, 0x69, 0x6e, // ((. (((min
|
||||||
|
0x20, 0x28, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x61, 0x78, 0x20, 0x28, // (. max (
|
||||||
|
0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x38, 0x2e, 0x78, 0x2c, 0x20, 0x74, 0x6d, 0x70, 0x76, // tmpvar_8.x, tmpv
|
||||||
|
0x61, 0x72, 0x5f, 0x38, 0x2e, 0x79, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2c, 0x20, // ar_8.y). ,
|
||||||
|
0x30, 0x2e, 0x30, 0x29, 0x20, 0x2b, 0x20, 0x73, 0x71, 0x72, 0x74, 0x28, 0x0a, 0x20, 0x20, 0x20, // 0.0) + sqrt(.
|
||||||
|
0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x74, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // dot (tmpvar
|
||||||
|
0x5f, 0x39, 0x2c, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x39, 0x29, 0x0a, 0x20, 0x20, // _9, tmpvar_9).
|
||||||
|
0x20, 0x20, 0x20, 0x20, 0x29, 0x29, 0x20, 0x2d, 0x20, 0x75, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, // )) - u_exten
|
||||||
|
0x74, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x2e, 0x7a, 0x29, 0x20, 0x2b, 0x20, 0x28, 0x75, 0x5f, // tRadius.z) + (u_
|
||||||
|
0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x78, 0x20, 0x2a, 0x20, 0x30, 0x2e, 0x35, 0x29, 0x29, // params.x * 0.5))
|
||||||
|
0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x20, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, // . / u_params
|
||||||
|
0x2e, 0x78, 0x29, 0x2c, 0x20, 0x30, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x29, 0x3b, // .x), 0.0, 1.0));
|
||||||
|
0x0a, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x36, 0x2e, 0x78, 0x79, 0x7a, // . color_6.xyz
|
||||||
|
0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x30, 0x2e, 0x78, 0x79, 0x7a, // = tmpvar_10.xyz
|
||||||
|
0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x36, 0x2e, 0x77, 0x20, // ;. color_6.w
|
||||||
|
0x3d, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x30, 0x2e, 0x77, 0x20, 0x2a, // = (tmpvar_10.w *
|
||||||
|
0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x35, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, // (tmpvar_5 * tmp
|
||||||
|
0x76, 0x61, 0x72, 0x5f, 0x32, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x73, // var_2));. res
|
||||||
|
0x75, 0x6c, 0x74, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x36, 0x3b, // ult_1 = color_6;
|
||||||
|
0x0a, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, // . } else {.
|
||||||
|
0x69, 0x66, 0x20, 0x28, 0x28, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x77, 0x20, // if ((u_params.w
|
||||||
|
0x3d, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, // == 1.0)) {.
|
||||||
|
0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // lowp vec4 color
|
||||||
|
0x5f, 0x31, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, // _11;. mediu
|
||||||
|
0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, // mp vec3 tmpvar_1
|
||||||
|
0x32, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // 2;. tmpvar_
|
||||||
|
0x31, 0x32, 0x2e, 0x7a, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, // 12.z = 1.0;.
|
||||||
|
0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x32, 0x2e, 0x78, 0x79, 0x20, 0x3d, // tmpvar_12.xy =
|
||||||
|
0x20, 0x76, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x20, // v_position;.
|
||||||
|
0x20, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, // lowp vec4 tmp
|
||||||
|
0x76, 0x61, 0x72, 0x5f, 0x31, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x6d, // var_13;. tm
|
||||||
|
0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x33, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, // pvar_13 = textur
|
||||||
|
0x65, 0x32, 0x44, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x2c, 0x20, 0x28, 0x28, 0x75, 0x5f, // e2D (s_tex, ((u_
|
||||||
|
0x70, 0x61, 0x69, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // paintMat * tmpva
|
||||||
|
0x72, 0x5f, 0x31, 0x32, 0x29, 0x2e, 0x78, 0x79, 0x20, 0x2f, 0x20, 0x75, 0x5f, 0x65, 0x78, 0x74, // r_12).xy / u_ext
|
||||||
|
0x65, 0x6e, 0x74, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x2e, 0x78, 0x79, 0x29, 0x29, 0x3b, 0x0a, // entRadius.xy));.
|
||||||
|
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x31, 0x31, 0x20, 0x3d, // color_11 =
|
||||||
|
0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, // tmpvar_13;.
|
||||||
|
0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, // lowp vec4 tmpv
|
||||||
|
0x61, 0x72, 0x5f, 0x31, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, // ar_14;. if
|
||||||
|
0x28, 0x28, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x7a, 0x20, 0x3d, 0x3d, 0x20, // ((u_params.z ==
|
||||||
|
0x30, 0x2e, 0x30, 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, // 0.0)) {.
|
||||||
|
0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x34, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, // tmpvar_14 = tmpv
|
||||||
|
0x61, 0x72, 0x5f, 0x31, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, // ar_13;. } e
|
||||||
|
0x6c, 0x73, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, // lse {. lo
|
||||||
|
0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, // wp vec4 tmpvar_1
|
||||||
|
0x35, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // 5;. tmpva
|
||||||
|
0x72, 0x5f, 0x31, 0x35, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, // r_15.xyz = vec3(
|
||||||
|
0x31, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, // 1.0, 1.0, 1.0);.
|
||||||
|
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, // tmpvar_1
|
||||||
|
0x35, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x33, 0x2e, // 5.w = tmpvar_13.
|
||||||
|
0x78, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // x;. tmpva
|
||||||
|
0x72, 0x5f, 0x31, 0x34, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x35, // r_14 = tmpvar_15
|
||||||
|
0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, // ;. };.
|
||||||
|
0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x31, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, // color_11.xyz =
|
||||||
|
0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x34, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x0a, 0x20, // tmpvar_14.xyz;.
|
||||||
|
0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x31, 0x31, 0x2e, 0x77, 0x20, // color_11.w
|
||||||
|
0x3d, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x34, 0x2e, 0x77, 0x20, 0x2a, // = (tmpvar_14.w *
|
||||||
|
0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x35, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, // (tmpvar_5 * tmp
|
||||||
|
0x76, 0x61, 0x72, 0x5f, 0x32, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, // var_2));. r
|
||||||
|
0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, // esult_1 = color_
|
||||||
|
0x31, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x7b, // 11;. } else {
|
||||||
|
0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x28, 0x75, 0x5f, 0x70, 0x61, // . if ((u_pa
|
||||||
|
0x72, 0x61, 0x6d, 0x73, 0x2e, 0x77, 0x20, 0x3d, 0x3d, 0x20, 0x32, 0x2e, 0x30, 0x29, 0x29, 0x20, // rams.w == 2.0))
|
||||||
|
0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, // {. result
|
||||||
|
0x5f, 0x31, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x34, 0x28, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x31, // _1 = vec4(1.0, 1
|
||||||
|
0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x20, // .0, 1.0, 1.0);.
|
||||||
|
0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, // } else {.
|
||||||
|
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x28, 0x75, 0x5f, 0x70, 0x61, 0x72, // if ((u_par
|
||||||
|
0x61, 0x6d, 0x73, 0x2e, 0x77, 0x20, 0x3d, 0x3d, 0x20, 0x33, 0x2e, 0x30, 0x29, 0x29, 0x20, 0x7b, // ams.w == 3.0)) {
|
||||||
|
0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, // . lowp
|
||||||
|
0x76, 0x65, 0x63, 0x34, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x31, 0x36, 0x3b, 0x0a, 0x20, // vec4 color_16;.
|
||||||
|
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, 0x65, // lowp ve
|
||||||
|
0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x37, 0x3b, 0x0a, 0x20, 0x20, // c4 tmpvar_17;.
|
||||||
|
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, // tmpvar_1
|
||||||
|
0x37, 0x20, 0x3d, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x20, 0x28, 0x73, // 7 = texture2D (s
|
||||||
|
0x5f, 0x74, 0x65, 0x78, 0x2c, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // _tex, v_texcoord
|
||||||
|
0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, // 0);. co
|
||||||
|
0x6c, 0x6f, 0x72, 0x5f, 0x31, 0x36, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // lor_16 = tmpvar_
|
||||||
|
0x31, 0x37, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, // 17;. lo
|
||||||
|
0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, // wp vec4 tmpvar_1
|
||||||
|
0x38, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, // 8;. if
|
||||||
|
0x28, 0x28, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x7a, 0x20, 0x3d, 0x3d, 0x20, // ((u_params.z ==
|
||||||
|
0x30, 0x2e, 0x30, 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, // 0.0)) {.
|
||||||
|
0x20, 0x20, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x38, 0x20, 0x3d, 0x20, // tmpvar_18 =
|
||||||
|
0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x37, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, // tmpvar_17;.
|
||||||
|
0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, // } else {.
|
||||||
|
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x77, 0x70, 0x20, 0x76, // lowp v
|
||||||
|
0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x39, 0x3b, 0x0a, 0x20, // ec4 tmpvar_19;.
|
||||||
|
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // tmpva
|
||||||
|
0x72, 0x5f, 0x31, 0x39, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x33, 0x28, // r_19.xyz = vec3(
|
||||||
|
0x31, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, // 1.0, 1.0, 1.0);.
|
||||||
|
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, // tmpv
|
||||||
|
0x61, 0x72, 0x5f, 0x31, 0x39, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // ar_19.w = tmpvar
|
||||||
|
0x5f, 0x31, 0x37, 0x2e, 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, // _17.x;.
|
||||||
|
0x20, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x38, 0x20, 0x3d, 0x20, 0x74, // tmpvar_18 = t
|
||||||
|
0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x39, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, // mpvar_19;.
|
||||||
|
0x20, 0x20, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, // };.
|
||||||
|
0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x31, 0x36, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, // color_16.xyz =
|
||||||
|
0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x38, 0x2e, 0x78, 0x79, 0x7a, 0x3b, 0x0a, 0x20, // tmpvar_18.xyz;.
|
||||||
|
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x31, // color_1
|
||||||
|
0x36, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x38, // 6.w = (tmpvar_18
|
||||||
|
0x2e, 0x77, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x29, 0x3b, 0x0a, // .w * tmpvar_2);.
|
||||||
|
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, // result
|
||||||
|
0x5f, 0x31, 0x20, 0x3d, 0x20, 0x28, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5f, 0x31, 0x36, 0x20, 0x2a, // _1 = (color_16 *
|
||||||
|
0x20, 0x75, 0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x29, 0x3b, 0x0a, 0x20, 0x20, // u_innerCol);.
|
||||||
|
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, // };. }
|
||||||
|
0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, 0x0a, 0x20, 0x20, // ;. };. };.
|
||||||
|
0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x72, // gl_FragColor = r
|
||||||
|
0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // esult_1;.}...
|
||||||
|
};
|
||||||
|
static const uint8_t fs_nanovg_fill_dx9[1531] =
|
||||||
|
{
|
||||||
|
0x46, 0x53, 0x48, 0x02, 0xcf, 0xda, 0x1b, 0x94, 0x07, 0x00, 0x0e, 0x75, 0x5f, 0x65, 0x78, 0x74, // FSH........u_ext
|
||||||
|
0x65, 0x6e, 0x74, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x15, 0x01, 0x09, 0x00, 0x01, 0x00, 0x0a, // entRadius.......
|
||||||
|
0x75, 0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x15, 0x01, 0x06, 0x00, 0x01, 0x00, // u_innerCol......
|
||||||
|
0x0a, 0x75, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x15, 0x01, 0x07, 0x00, 0x01, // .u_outerCol.....
|
||||||
|
0x00, 0x0a, 0x75, 0x5f, 0x70, 0x61, 0x69, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x18, 0x01, 0x03, 0x00, // ..u_paintMat....
|
||||||
|
0x03, 0x00, 0x08, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x15, 0x01, 0x0a, 0x00, 0x01, // ...u_params.....
|
||||||
|
0x00, 0x11, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x53, 0x63, // ..u_scissorExtSc
|
||||||
|
0x61, 0x6c, 0x65, 0x15, 0x01, 0x08, 0x00, 0x01, 0x00, 0x0c, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, // ale.......u_scis
|
||||||
|
0x73, 0x6f, 0x72, 0x4d, 0x61, 0x74, 0x18, 0x01, 0x00, 0x00, 0x03, 0x00, 0x6c, 0x05, 0x00, 0x03, // sorMat......l...
|
||||||
|
0xff, 0xff, 0xfe, 0xff, 0x63, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x57, 0x01, // ....c.CTAB....W.
|
||||||
|
0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x08, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x81, // ................
|
||||||
|
0x00, 0x00, 0x50, 0x01, 0x00, 0x00, 0xbc, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, // ..P.............
|
||||||
|
0x02, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x02, 0x00, // ................
|
||||||
|
0x09, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf4, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x02, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x01, 0x00, 0x00, 0x02, 0x00, 0x03, 0x00, 0x03, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x18, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x01, 0x00, 0x00, 0x02, 0x00, // ..........(.....
|
||||||
|
0x0a, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x01, // ..............1.
|
||||||
|
0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x43, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x18, 0x01, // ..C.............
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x00, 0xab, 0xab, 0x04, 0x00, // ......s_tex.....
|
||||||
|
0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_
|
||||||
|
0x65, 0x78, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x00, 0xab, 0x01, 0x00, // extentRadius....
|
||||||
|
0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_
|
||||||
|
0x69, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x00, 0x75, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, // innerCol.u_outer
|
||||||
|
0x43, 0x6f, 0x6c, 0x00, 0x75, 0x5f, 0x70, 0x61, 0x69, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x00, 0xab, // Col.u_paintMat..
|
||||||
|
0xab, 0xab, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, 0x75, 0x5f, 0x73, 0x63, 0x69, // ..u_params.u_sci
|
||||||
|
0x73, 0x73, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x00, 0x75, 0x5f, 0x73, // ssorExtScale.u_s
|
||||||
|
0x63, 0x69, 0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x74, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, // cissorMat.ps_3_0
|
||||||
|
0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, // .Microsoft (R) H
|
||||||
|
0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, // LSL Shader Compi
|
||||||
|
0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, // ler 9.29.952.311
|
||||||
|
0x31, 0x00, 0x51, 0x00, 0x00, 0x05, 0x0b, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, // 1.Q..........?..
|
||||||
|
0x00, 0x40, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x80, 0x3f, 0x51, 0x00, 0x00, 0x05, 0x0c, 0x00, // .@.......?Q.....
|
||||||
|
0x0f, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, // .........?..@@..
|
||||||
|
0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, 0x90, 0x1f, 0x00, // ................
|
||||||
|
0x00, 0x02, 0x05, 0x00, 0x01, 0x80, 0x01, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, // ................
|
||||||
|
0x00, 0x90, 0x0b, 0x00, 0x55, 0xa0, 0x0b, 0x00, 0xaa, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, // ....U...........
|
||||||
|
0x01, 0x80, 0x00, 0x00, 0x00, 0x8c, 0x0b, 0x00, 0xff, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // ................
|
||||||
|
0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x0a, 0x00, 0x55, 0xa0, 0x0a, 0x00, 0x00, 0x03, 0x01, 0x00, // ........U.......
|
||||||
|
0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x0b, 0x00, 0xff, 0xa0, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, // ................
|
||||||
|
0x01, 0x80, 0x01, 0x00, 0x55, 0x90, 0x0b, 0x00, 0xff, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // ....U...........
|
||||||
|
0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // ................
|
||||||
|
0x06, 0x80, 0x04, 0x00, 0xd0, 0xa0, 0x00, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ........U.......
|
||||||
|
0x06, 0x80, 0x03, 0x00, 0xd0, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, // ................
|
||||||
|
0x00, 0x03, 0x00, 0x00, 0x06, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x05, 0x00, 0xd0, 0xa0, 0x06, 0x00, // ................
|
||||||
|
0x00, 0x02, 0x01, 0x00, 0x01, 0x80, 0x09, 0x00, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x02, 0x01, 0x00, // ................
|
||||||
|
0x02, 0x80, 0x09, 0x00, 0x55, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x03, 0x80, 0x00, 0x00, // ....U...........
|
||||||
|
0xe9, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0c, 0x80, 0x01, 0x00, // ................
|
||||||
|
0x44, 0xa0, 0x00, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0c, 0x80, 0x00, 0x00, // D...U...........
|
||||||
|
0x44, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x01, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, // D...............
|
||||||
|
0x0c, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x44, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, // ........D.......
|
||||||
|
0x0c, 0x80, 0x01, 0x00, 0xe4, 0x8b, 0x08, 0x00, 0x44, 0xa1, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, // ........D.......
|
||||||
|
0x07, 0x80, 0x0b, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x1c, 0x80, 0x01, 0x00, // ................
|
||||||
|
0xe4, 0x80, 0x08, 0x00, 0xe4, 0xa1, 0x02, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // ................
|
||||||
|
0x08, 0x80, 0x01, 0x00, 0xff, 0x80, 0x01, 0x00, 0xaa, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // ................
|
||||||
|
0x01, 0x80, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, // ................
|
||||||
|
0x04, 0x80, 0x02, 0x00, 0xaa, 0x80, 0x0a, 0x00, 0xff, 0xa0, 0x23, 0x00, 0x00, 0x02, 0x02, 0x00, // ..........#.....
|
||||||
|
0x0c, 0x80, 0x0a, 0x00, 0xb4, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x03, 0x00, 0x0f, 0x80, 0x01, 0x00, // ......B.........
|
||||||
|
0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x04, 0x00, 0x0f, 0x80, 0x03, 0x00, // ................
|
||||||
|
0x00, 0x80, 0x0c, 0x00, 0x40, 0xa0, 0x0c, 0x00, 0x15, 0xa0, 0x58, 0x00, 0x00, 0x04, 0x03, 0x00, // ....@.....X.....
|
||||||
|
0x0f, 0x80, 0x02, 0x00, 0xff, 0x81, 0x03, 0x00, 0xe4, 0x80, 0x04, 0x00, 0xe4, 0x80, 0x05, 0x00, // ................
|
||||||
|
0x00, 0x03, 0x03, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0xff, 0x80, 0x29, 0x00, // ..............).
|
||||||
|
0x02, 0x02, 0x0a, 0x00, 0xff, 0xa0, 0x02, 0x00, 0x55, 0x80, 0x01, 0x00, 0x00, 0x02, 0x04, 0x00, // ........U.......
|
||||||
|
0x0f, 0x80, 0x0b, 0x00, 0xff, 0xa0, 0x2a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x05, 0x00, // ......*.........
|
||||||
|
0x04, 0x80, 0x0c, 0x00, 0xaa, 0xa0, 0x29, 0x00, 0x02, 0x02, 0x0a, 0x00, 0xff, 0xa0, 0x05, 0x00, // ......).........
|
||||||
|
0xaa, 0x80, 0x42, 0x00, 0x00, 0x03, 0x05, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x00, 0x08, // ..B.............
|
||||||
|
0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x06, 0x00, 0x0f, 0x80, 0x05, 0x00, 0x00, 0x80, 0x0c, 0x00, // ................
|
||||||
|
0x40, 0xa0, 0x0c, 0x00, 0x15, 0xa0, 0x58, 0x00, 0x00, 0x04, 0x05, 0x00, 0x0f, 0x80, 0x02, 0x00, // @.....X.........
|
||||||
|
0xff, 0x81, 0x05, 0x00, 0xe4, 0x80, 0x06, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x05, 0x00, // ................
|
||||||
|
0x08, 0x80, 0x00, 0x00, 0xff, 0x80, 0x05, 0x00, 0xff, 0x80, 0x05, 0x00, 0x00, 0x03, 0x04, 0x00, // ................
|
||||||
|
0x0f, 0x80, 0x05, 0x00, 0xe4, 0x80, 0x06, 0x00, 0xe4, 0xa0, 0x2a, 0x00, 0x00, 0x00, 0x01, 0x00, // ..........*.....
|
||||||
|
0x00, 0x02, 0x04, 0x00, 0x0f, 0x80, 0x0c, 0x00, 0x00, 0xa0, 0x2b, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..........+...+.
|
||||||
|
0x00, 0x00, 0x58, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xaa, 0x8c, 0x03, 0x00, // ..X.............
|
||||||
|
0xe4, 0x80, 0x04, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0a, 0x80, 0x09, 0x00, // ................
|
||||||
|
0xaa, 0xa1, 0x09, 0x00, 0x60, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x80, 0x00, 0x00, // ....`...........
|
||||||
|
0xe4, 0x8b, 0x02, 0x00, 0xf4, 0x81, 0x0b, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0a, 0x80, 0x00, 0x00, // ................
|
||||||
|
0xa4, 0x80, 0x0c, 0x00, 0x00, 0xa0, 0x5a, 0x00, 0x00, 0x04, 0x00, 0x00, 0x08, 0x80, 0x02, 0x00, // ......Z.........
|
||||||
|
0xed, 0x80, 0x02, 0x00, 0xed, 0x80, 0x0c, 0x00, 0x00, 0xa0, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, // ................
|
||||||
|
0x08, 0x80, 0x00, 0x00, 0xff, 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, // ................
|
||||||
|
0xff, 0x80, 0x0b, 0x00, 0x00, 0x03, 0x02, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x00, 0x00, // ............U...
|
||||||
|
0xaa, 0x80, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x02, 0x00, 0x55, 0x80, 0x0c, 0x00, // ............U...
|
||||||
|
0x00, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, // ................
|
||||||
|
0x55, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x09, 0x00, // U...........U...
|
||||||
|
0xaa, 0xa1, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0x80, 0x0a, 0x00, 0x00, 0xa0, 0x02, 0x00, // ................
|
||||||
|
0x00, 0x80, 0x00, 0x00, 0x55, 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, 0x80, 0x0a, 0x00, // ....U...........
|
||||||
|
0x00, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x12, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x00, 0x00, // ................
|
||||||
|
0x55, 0x80, 0x01, 0x00, 0x00, 0x02, 0x03, 0x00, 0x0f, 0x80, 0x06, 0x00, 0xe4, 0xa0, 0x02, 0x00, // U...............
|
||||||
|
0x00, 0x03, 0x03, 0x00, 0x0f, 0x80, 0x03, 0x00, 0xe4, 0x81, 0x07, 0x00, 0xe4, 0xa0, 0x04, 0x00, // ................
|
||||||
|
0x00, 0x04, 0x03, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x55, 0x80, 0x03, 0x00, 0xe4, 0x80, 0x06, 0x00, // ........U.......
|
||||||
|
0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x03, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, // ................
|
||||||
|
0xff, 0x80, 0x58, 0x00, 0x00, 0x04, 0x00, 0x08, 0x0f, 0x80, 0x02, 0x00, 0xaa, 0x81, 0x03, 0x00, // ..X.............
|
||||||
|
0xe4, 0x80, 0x01, 0x00, 0xe4, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // ...........
|
||||||
|
};
|
||||||
|
static const uint8_t fs_nanovg_fill_dx11[3372] =
|
||||||
|
{
|
||||||
|
0x46, 0x53, 0x48, 0x02, 0xcf, 0xda, 0x1b, 0x94, 0x07, 0x00, 0x0c, 0x75, 0x5f, 0x73, 0x63, 0x69, // FSH........u_sci
|
||||||
|
0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x74, 0x18, 0x00, 0xb0, 0x09, 0x03, 0x00, 0x0a, 0x75, 0x5f, // ssorMat.......u_
|
||||||
|
0x70, 0x61, 0x69, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x18, 0x00, 0xe0, 0x09, 0x03, 0x00, 0x0a, 0x75, // paintMat.......u
|
||||||
|
0x5f, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x15, 0x00, 0x10, 0x0a, 0x01, 0x00, 0x0a, // _innerCol.......
|
||||||
|
0x75, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x15, 0x00, 0x20, 0x0a, 0x01, 0x00, // u_outerCol.. ...
|
||||||
|
0x11, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x53, 0x63, 0x61, // .u_scissorExtSca
|
||||||
|
0x6c, 0x65, 0x15, 0x00, 0x30, 0x0a, 0x01, 0x00, 0x0e, 0x75, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, // le..0....u_exten
|
||||||
|
0x74, 0x52, 0x61, 0x64, 0x69, 0x75, 0x73, 0x15, 0x00, 0x40, 0x0a, 0x01, 0x00, 0x08, 0x75, 0x5f, // tRadius..@....u_
|
||||||
|
0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x15, 0x00, 0x50, 0x0a, 0x01, 0x00, 0x8c, 0x0c, 0x44, 0x58, // params..P.....DX
|
||||||
|
0x42, 0x43, 0x4a, 0x85, 0xd2, 0x66, 0x3b, 0xfa, 0xb9, 0x35, 0xcc, 0x17, 0x20, 0x80, 0xf6, 0x89, // BCJ..f;..5.. ...
|
||||||
|
0x8e, 0x7a, 0x01, 0x00, 0x00, 0x00, 0x8c, 0x0c, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, // .z............4.
|
||||||
|
0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x50, 0x04, 0x00, 0x00, 0x84, 0x04, 0x00, 0x00, 0x10, 0x0c, // ......P.........
|
||||||
|
0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0xa4, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xa0, 0x00, // ..RDEF..........
|
||||||
|
0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0x00, 0x91, // ................
|
||||||
|
0x00, 0x00, 0x73, 0x03, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ..s...|.........
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x53, 0x61, 0x6d, 0x70, 0x6c, // ......s_texSampl
|
||||||
|
0x65, 0x72, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, // er.s_texTexture.
|
||||||
|
0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x73, 0x00, 0xab, 0x96, 0x00, 0x00, 0x00, 0x11, 0x00, // $Globals........
|
||||||
|
0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x60, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......`.........
|
||||||
|
0x00, 0x00, 0x50, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ..P.............
|
||||||
|
0x00, 0x00, 0x5c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x02, 0x00, 0x00, 0x10, 0x00, // ..........l.....
|
||||||
|
0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x02, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x78, 0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, // ..x... ...@.....
|
||||||
|
0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x60, 0x00, // ..............`.
|
||||||
|
0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00, // ..@.............
|
||||||
|
0x00, 0x00, 0x9b, 0x02, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0xa4, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb4, 0x02, 0x00, 0x00, 0xa0, 0x08, // ................
|
||||||
|
0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00, // ..@.............
|
||||||
|
0x00, 0x00, 0xc0, 0x02, 0x00, 0x00, 0xe0, 0x08, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........@.....
|
||||||
|
0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x02, 0x00, 0x00, 0x20, 0x09, // .............. .
|
||||||
|
0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00, // ..@.............
|
||||||
|
0x00, 0x00, 0xe1, 0x02, 0x00, 0x00, 0x60, 0x09, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, // ......`...@.....
|
||||||
|
0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xed, 0x02, 0x00, 0x00, 0xa0, 0x09, // ................
|
||||||
|
0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x02, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x08, 0x03, 0x00, 0x00, 0xb0, 0x09, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x02, 0x00, // ..........,.....
|
||||||
|
0x00, 0x00, 0x18, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x00, 0xe0, 0x09, // ..........(.....
|
||||||
|
0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x18, 0x03, 0x00, 0x00, 0x00, 0x00, // ..,.............
|
||||||
|
0x00, 0x00, 0x33, 0x03, 0x00, 0x00, 0x10, 0x0a, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, // ..3.............
|
||||||
|
0x00, 0x00, 0x5c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x03, 0x00, 0x00, 0x20, 0x0a, // ..........>... .
|
||||||
|
0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x5c, 0x02, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x49, 0x03, 0x00, 0x00, 0x30, 0x0a, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, // ..I...0.........
|
||||||
|
0x00, 0x00, 0x5c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x03, 0x00, 0x00, 0x40, 0x0a, // ..........[...@.
|
||||||
|
0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x5c, 0x02, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x6a, 0x03, 0x00, 0x00, 0x50, 0x0a, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, // ..j...P.........
|
||||||
|
0x00, 0x00, 0x5c, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view
|
||||||
|
0x52, 0x65, 0x63, 0x74, 0x00, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, // Rect............
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, // ......u_viewTexe
|
||||||
|
0x6c, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x00, 0xab, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, // l.u_view........
|
||||||
|
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..........u_view
|
||||||
|
0x50, 0x72, 0x6f, 0x6a, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0xab, 0x03, 0x00, // Proj.u_model....
|
||||||
|
0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ...... .......u_
|
||||||
|
0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // modelView.u_mode
|
||||||
|
0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, // lViewProj.u_mode
|
||||||
|
0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x58, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, // lViewProjX.u_vie
|
||||||
|
0x77, 0x50, 0x72, 0x6f, 0x6a, 0x58, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, 0x65, // wProjX.u_alphaRe
|
||||||
|
0x66, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // f...............
|
||||||
|
0x00, 0x00, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, 0x72, 0x4d, 0x61, 0x74, 0x00, 0xab, // ..u_scissorMat..
|
||||||
|
0xab, 0xab, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x75, 0x5f, 0x70, 0x61, 0x69, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x00, 0x75, 0x5f, 0x69, // ..u_paintMat.u_i
|
||||||
|
0x6e, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x00, 0x75, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x43, // nnerCol.u_outerC
|
||||||
|
0x6f, 0x6c, 0x00, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x53, // ol.u_scissorExtS
|
||||||
|
0x63, 0x61, 0x6c, 0x65, 0x00, 0x75, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x61, 0x64, // cale.u_extentRad
|
||||||
|
0x69, 0x75, 0x73, 0x00, 0x75, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x00, 0x4d, 0x69, 0x63, // ius.u_params.Mic
|
||||||
|
0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, // rosoft (R) HLSL
|
||||||
|
0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, // Shader Compiler
|
||||||
|
0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x49, 0x53, // 9.29.952.3111.IS
|
||||||
|
0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, // GNh...........P.
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x5c, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, // ......SV_POSITIO
|
||||||
|
0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0xab, 0x4f, 0x53, // N.TEXCOORD....OS
|
||||||
|
0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, // GN,........... .
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, // ......SV_TARGET.
|
||||||
|
0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0x84, 0x07, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0xe1, 0x01, // ..SHDR....@.....
|
||||||
|
0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x00, // ..Y...F. .......
|
||||||
|
0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x18, // ..Z....`......X.
|
||||||
|
0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, // ...p......UU..b.
|
||||||
|
0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0xc2, 0x10, // ..2.......b.....
|
||||||
|
0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, // ......e.... ....
|
||||||
|
0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0x32, 0x00, // ..h.......8...2.
|
||||||
|
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x80, // ......V.......F.
|
||||||
|
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x32, 0x00, // .........2...2.
|
||||||
|
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9b, 0x00, // ......F. .......
|
||||||
|
0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00, 0x00, 0x00, // ..........F.....
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, // ......2.......F.
|
||||||
|
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9d, 0x00, // ......F. .......
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, // ......2.......F.
|
||||||
|
0x10, 0x80, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x80, 0x20, 0x80, 0x41, 0x00, // ..........F. .A.
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa3, 0x00, 0x00, 0x00, 0x32, 0x20, 0x00, 0x0e, 0x32, 0x00, // ..........2 ..2.
|
||||||
|
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, // ......F...A.....
|
||||||
|
0x00, 0x00, 0xe6, 0x8a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa3, 0x00, 0x00, 0x00, 0x02, 0x40, // .... ..........@
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .....?...?......
|
||||||
|
0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, // ..8.............
|
||||||
|
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, // ..............2.
|
||||||
|
0x00, 0x09, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x10, 0x10, 0x00, 0x01, 0x00, // ..".......*.....
|
||||||
|
0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, // ...@.....@.@....
|
||||||
|
0x80, 0xbf, 0x00, 0x00, 0x00, 0x08, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, // ......".........
|
||||||
|
0x10, 0x80, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, // ...........@....
|
||||||
|
0x80, 0x3f, 0x38, 0x00, 0x00, 0x08, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, // .?8...".........
|
||||||
|
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa5, 0x00, // ........ .......
|
||||||
|
0x00, 0x00, 0x33, 0x00, 0x00, 0x07, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, // ..3...".........
|
||||||
|
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x33, 0x00, // .......@.....?3.
|
||||||
|
0x00, 0x07, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x10, 0x10, 0x00, 0x01, 0x00, // ..B.......:.....
|
||||||
|
0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x38, 0x00, 0x00, 0x07, 0x22, 0x00, // ...@.....?8...".
|
||||||
|
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, // ......*.........
|
||||||
|
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x08, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, // ..........B.....
|
||||||
|
0x00, 0x00, 0x3a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x01, 0x40, // ..:. ..........@
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x04, 0x03, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, // ..........*.....
|
||||||
|
0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xc2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, // ..8...........V.
|
||||||
|
0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x84, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9f, 0x00, // ........ .......
|
||||||
|
0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xc2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x84, // ..2.............
|
||||||
|
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, // ...............
|
||||||
|
0x00, 0x00, 0xa6, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xc2, 0x00, // ................
|
||||||
|
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x84, // ................
|
||||||
|
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x32, 0x00, // .............2.
|
||||||
|
0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0xa6, 0x8a, 0x20, 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ .A.....
|
||||||
|
0x00, 0x00, 0xa4, 0x00, 0x00, 0x00, 0x46, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x00, // ......F. .......
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0xc2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x0e, // ................
|
||||||
|
0x10, 0x80, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x04, 0x10, 0x80, 0x41, 0x00, // ..............A.
|
||||||
|
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x01, 0x00, // ......4.........
|
||||||
|
0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, // ..:.......*.....
|
||||||
|
0x00, 0x00, 0x33, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0a, 0x00, // ..3.............
|
||||||
|
0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, // .......@......4.
|
||||||
|
0x00, 0x0a, 0xc2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x0e, 0x10, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ...@............
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x07, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, // ..........B.....
|
||||||
|
0x00, 0x00, 0xe6, 0x0a, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x0a, 0x10, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x4b, 0x00, 0x00, 0x05, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, // ..K...B.......*.
|
||||||
|
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, // ..........B.....
|
||||||
|
0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x01, 0x00, // ..*.............
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, // ......B.......*.
|
||||||
|
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x80, 0x20, 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, // ......*. .A.....
|
||||||
|
0x00, 0x00, 0xa4, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, // ......2...B.....
|
||||||
|
0x00, 0x00, 0x0a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x01, 0x40, // .... ..........@
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x20, // .....?*........
|
||||||
|
0x00, 0x08, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, // ..B.......*.....
|
||||||
|
0x00, 0x00, 0x0a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x00, 0x00, // .... ...........
|
||||||
|
0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x80, 0x41, 0x00, // ..........F. .A.
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa1, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, // ..........F. ...
|
||||||
|
0x00, 0x00, 0xa2, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, // ......2.........
|
||||||
|
0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, // ..........F.....
|
||||||
|
0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa1, 0x00, 0x00, 0x00, 0x38, 0x00, // ..F. .........8.
|
||||||
|
0x00, 0x07, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, // ..B.............
|
||||||
|
0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x82, 0x20, // ..........8....
|
||||||
|
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, // ......*.......:.
|
||||||
|
0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x00, 0x00, // ......6...r ....
|
||||||
|
0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x01, 0x18, 0x00, // ..F.............
|
||||||
|
0x00, 0x08, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x80, 0x20, 0x00, 0x00, 0x00, // ..B.......:. ...
|
||||||
|
0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x1f, 0x00, // .......@.....?..
|
||||||
|
0x04, 0x03, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xc2, 0x00, // ..*.......8.....
|
||||||
|
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x84, // ......V.........
|
||||||
|
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9f, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xc2, 0x00, // .........2.....
|
||||||
|
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x84, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, // ........ .......
|
||||||
|
0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0xa6, 0x0e, 0x10, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xc2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x0e, // ................
|
||||||
|
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x84, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, // ........ .......
|
||||||
|
0x00, 0x00, 0x0e, 0x00, 0x00, 0x08, 0xc2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x0e, // ................
|
||||||
|
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x84, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x00, // ........ .......
|
||||||
|
0x00, 0x00, 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe6, 0x0a, // ..E.............
|
||||||
|
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, // ......F~.......`
|
||||||
|
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x08, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, // ..........B.....
|
||||||
|
0x00, 0x00, 0x2a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x01, 0x40, // ..*. ..........@
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x12, 0x00, 0x10, 0x00, 0x02, 0x00, // ......6.........
|
||||||
|
0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x36, 0x00, 0x00, 0x05, 0x82, 0x00, // ...@.....?6.....
|
||||||
|
0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x37, 0x00, // ..............7.
|
||||||
|
0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x0c, 0x10, 0x00, 0x02, 0x00, // ..F.............
|
||||||
|
0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, // ..8...".........
|
||||||
|
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, // ..............8.
|
||||||
|
0x00, 0x07, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, // ... ............
|
||||||
|
0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, // ..:.......6...r
|
||||||
|
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x12, 0x00, // ......F.........
|
||||||
|
0x00, 0x01, 0x18, 0x00, 0x00, 0x08, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x80, // ......".......:.
|
||||||
|
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, // ..........@....
|
||||||
|
0x00, 0x40, 0x1f, 0x00, 0x04, 0x03, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, // .@............6.
|
||||||
|
0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, // ... .......@....
|
||||||
|
0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x12, 0x00, // .?...?...?...?..
|
||||||
|
0x00, 0x01, 0x18, 0x00, 0x00, 0x08, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x80, // ......".......:.
|
||||||
|
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, // ..........@....
|
||||||
|
0x40, 0x40, 0x1f, 0x00, 0x04, 0x03, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x00, // @@............E.
|
||||||
|
0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0xe6, 0x1a, 0x10, 0x00, 0x01, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, // ..F~.......`....
|
||||||
|
0x00, 0x00, 0x18, 0x00, 0x00, 0x08, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x80, // ......".......*.
|
||||||
|
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, // ..........@....
|
||||||
|
0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x12, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x40, // ..6............@
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x36, 0x00, 0x00, 0x05, 0x82, 0x00, 0x10, 0x00, 0x02, 0x00, // .....?6.........
|
||||||
|
0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x09, 0xf2, 0x00, // ..........7.....
|
||||||
|
0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, // ......V.......F.
|
||||||
|
0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x0c, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x38, 0x00, // ..............8.
|
||||||
|
0x00, 0x07, 0x82, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x20, // ..:.......8....
|
||||||
|
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, // ......F.......F.
|
||||||
|
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa1, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x01, 0x15, 0x00, // ...............
|
||||||
|
0x00, 0x01, 0x15, 0x00, 0x00, 0x01, 0x15, 0x00, 0x00, 0x01, 0x3e, 0x00, 0x00, 0x01, 0x53, 0x54, // ..........>...ST
|
||||||
|
0x41, 0x54, 0x74, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ATt...C.........
|
||||||
|
0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......%.........
|
||||||
|
0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x0a, // ..........`.
|
||||||
|
};
|
89
examples/common/nanovg/fs_nanovg_fill.sc
Normal file
|
@ -0,0 +1,89 @@
|
||||||
|
$input v_position, v_texcoord0
|
||||||
|
|
||||||
|
#include "../common.sh"
|
||||||
|
|
||||||
|
#define EDGE_AA 1
|
||||||
|
|
||||||
|
uniform mat3 u_scissorMat;
|
||||||
|
uniform mat3 u_paintMat;
|
||||||
|
uniform vec4 u_innerCol;
|
||||||
|
uniform vec4 u_outerCol;
|
||||||
|
uniform vec4 u_scissorExtScale;
|
||||||
|
uniform vec4 u_extentRadius;
|
||||||
|
uniform vec4 u_params;
|
||||||
|
SAMPLER2D(s_tex, 0);
|
||||||
|
|
||||||
|
#define u_scissorExt (u_scissorExtScale.xy)
|
||||||
|
#define u_scissorScale (u_scissorExtScale.zw)
|
||||||
|
#define u_extent (u_extentRadius.xy)
|
||||||
|
#define u_radius (u_extentRadius.z)
|
||||||
|
#define u_feather (u_params.x)
|
||||||
|
#define u_strokeMult (u_params.y)
|
||||||
|
#define u_texType (u_params.z)
|
||||||
|
#define u_type (u_params.w)
|
||||||
|
|
||||||
|
float sdroundrect(vec2 pt, vec2 ext, float rad)
|
||||||
|
{
|
||||||
|
vec2 ext2 = ext - vec2(rad,rad);
|
||||||
|
vec2 d = abs(pt) - ext2;
|
||||||
|
return min(max(d.x, d.y), 0.0) + length(max(d, 0.0) ) - rad;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Scissoring
|
||||||
|
float scissorMask(vec2 p)
|
||||||
|
{
|
||||||
|
vec2 sc = abs(mul(u_scissorMat, vec3(p, 1.0) ).xy) - u_scissorExt;
|
||||||
|
sc = vec2(0.5, 0.5) - sc * u_scissorScale;
|
||||||
|
return clamp(sc.x, 0.0, 1.0) * clamp(sc.y, 0.0, 1.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Stroke - from [0..1] to clipped pyramid, where the slope is 1px.
|
||||||
|
float strokeMask(vec2 _texcoord)
|
||||||
|
{
|
||||||
|
#if EDGE_AA
|
||||||
|
return min(1.0, (1.0 - abs(_texcoord.x*2.0 - 1.0) )*u_strokeMult) * min(1.0, _texcoord.y);
|
||||||
|
#else
|
||||||
|
return 1.0;
|
||||||
|
#endif // EDGE_AA
|
||||||
|
}
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 result;
|
||||||
|
float scissor = scissorMask(v_position);
|
||||||
|
float strokeAlpha = strokeMask(v_texcoord0);
|
||||||
|
|
||||||
|
if (u_type == 0.0) // Gradient
|
||||||
|
{
|
||||||
|
// Calculate gradient color using box gradient
|
||||||
|
vec2 pt = mul(u_paintMat, vec3(v_position, 1.0) ).xy;
|
||||||
|
float d = clamp( (sdroundrect(pt, u_extent, u_radius) + u_feather*0.5) / u_feather, 0.0, 1.0);
|
||||||
|
vec4 color = mix(u_innerCol, u_outerCol, d);
|
||||||
|
// Combine alpha
|
||||||
|
color.w *= strokeAlpha * scissor;
|
||||||
|
result = color;
|
||||||
|
}
|
||||||
|
else if (u_type == 1.0) // Image
|
||||||
|
{
|
||||||
|
// Calculate color fron texture
|
||||||
|
vec2 pt = mul(u_paintMat, vec3(v_position, 1.0) ).xy / u_extent;
|
||||||
|
vec4 color = texture2D(s_tex, pt);
|
||||||
|
color = u_texType == 0.0 ? color : vec4(1.0, 1.0, 1.0, color.x);
|
||||||
|
// Combine alpha
|
||||||
|
color.w *= strokeAlpha * scissor;
|
||||||
|
result = color;
|
||||||
|
}
|
||||||
|
else if (u_type == 2.0) // Stencil fill
|
||||||
|
{
|
||||||
|
result = vec4(1.0, 1.0, 1.0, 1.0);
|
||||||
|
}
|
||||||
|
else if (u_type == 3.0) // Textured tris
|
||||||
|
{
|
||||||
|
vec4 color = texture2D(s_tex, v_texcoord0);
|
||||||
|
color = u_texType == 0.0 ? color : vec4(1.0, 1.0, 1.0, color.x);
|
||||||
|
color.w *= scissor;
|
||||||
|
result = color * u_innerCol;
|
||||||
|
}
|
||||||
|
|
||||||
|
gl_FragColor = result;
|
||||||
|
}
|
9
examples/common/nanovg/makefile
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#
|
||||||
|
# Copyright 2011-2014 Branimir Karadzic. All rights reserved.
|
||||||
|
# License: http://www.opensource.org/licenses/BSD-2-Clause
|
||||||
|
#
|
||||||
|
|
||||||
|
include ../../../premake/shader-embeded.mk
|
||||||
|
|
||||||
|
rebuild:
|
||||||
|
@make -s --no-print-directory clean all
|
2399
examples/common/nanovg/nanovg.cpp
Normal file
550
examples/common/nanovg/nanovg.h
Normal file
|
@ -0,0 +1,550 @@
|
||||||
|
//
|
||||||
|
// Copyright (c) 2013 Mikko Mononen memon@inside.org
|
||||||
|
//
|
||||||
|
// This software is provided 'as-is', without any express or implied
|
||||||
|
// warranty. In no event will the authors be held liable for any damages
|
||||||
|
// arising from the use of this software.
|
||||||
|
// Permission is granted to anyone to use this software for any purpose,
|
||||||
|
// including commercial applications, and to alter it and redistribute it
|
||||||
|
// freely, subject to the following restrictions:
|
||||||
|
// 1. The origin of this software must not be misrepresented; you must not
|
||||||
|
// claim that you wrote the original software. If you use this software
|
||||||
|
// in a product, an acknowledgment in the product documentation would be
|
||||||
|
// appreciated but is not required.
|
||||||
|
// 2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
// misrepresented as being the original software.
|
||||||
|
// 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef NANOVG_H
|
||||||
|
#define NANOVG_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define NVG_PI 3.14159265358979323846264338327f
|
||||||
|
|
||||||
|
struct NVGcontext;
|
||||||
|
|
||||||
|
struct NVGcolor {
|
||||||
|
union {
|
||||||
|
float rgba[4];
|
||||||
|
struct {
|
||||||
|
float r,g,b,a;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
struct NVGpaint {
|
||||||
|
float xform[6];
|
||||||
|
float extent[2];
|
||||||
|
float radius;
|
||||||
|
float feather;
|
||||||
|
struct NVGcolor innerColor;
|
||||||
|
struct NVGcolor outerColor;
|
||||||
|
int image;
|
||||||
|
int repeat;
|
||||||
|
};
|
||||||
|
|
||||||
|
enum NVGwinding {
|
||||||
|
NVG_CCW = 1, // Winding for solid shapes
|
||||||
|
NVG_CW = 2, // Winding for holes
|
||||||
|
};
|
||||||
|
|
||||||
|
enum NVGsolidity {
|
||||||
|
NVG_SOLID = 1, // CCW
|
||||||
|
NVG_HOLE = 2, // CW
|
||||||
|
};
|
||||||
|
|
||||||
|
enum NVGlineCap {
|
||||||
|
NVG_BUTT,
|
||||||
|
NVG_ROUND,
|
||||||
|
NVG_SQUARE,
|
||||||
|
NVG_BEVEL,
|
||||||
|
NVG_MITER,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum NVGpatternRepeat {
|
||||||
|
NVG_REPEATX = 0x01, // Repeat image pattern in X direction
|
||||||
|
NVG_REPEATY = 0x02, // Repeat image pattern in Y direction
|
||||||
|
};
|
||||||
|
|
||||||
|
enum NVGalign {
|
||||||
|
// Horizontal align
|
||||||
|
NVG_ALIGN_LEFT = 1<<0, // Default, align text horizontally to left.
|
||||||
|
NVG_ALIGN_CENTER = 1<<1, // Align text horizontally to center.
|
||||||
|
NVG_ALIGN_RIGHT = 1<<2, // Align text horizontally to right.
|
||||||
|
// Vertical align
|
||||||
|
NVG_ALIGN_TOP = 1<<3, // Align text vertically to top.
|
||||||
|
NVG_ALIGN_MIDDLE = 1<<4, // Align text vertically to middle.
|
||||||
|
NVG_ALIGN_BOTTOM = 1<<5, // Align text vertically to bottom.
|
||||||
|
NVG_ALIGN_BASELINE = 1<<6, // Default, align text vertically to baseline.
|
||||||
|
};
|
||||||
|
|
||||||
|
enum NVGalpha {
|
||||||
|
NVG_STRAIGHT_ALPHA,
|
||||||
|
NVG_PREMULTIPLIED_ALPHA,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct NVGglyphPosition {
|
||||||
|
const char* str; // Position of the glyph in the input string.
|
||||||
|
float x; // The x- coordinate of the position of the glyph .
|
||||||
|
};
|
||||||
|
|
||||||
|
struct NVGtextRow {
|
||||||
|
const char* start; // Pointer to the input text where the row starts.
|
||||||
|
const char* end; // Pointer to the input text where the row ends (one past the last character).
|
||||||
|
const char* next; // Pointer to the beginning of the next row.
|
||||||
|
float width; // Logical width of the row.
|
||||||
|
float minx, maxx; // Actual bounds of the row. Logical with and bounds can differ because of kerning and some parts over extending.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Begin drawing a new frame
|
||||||
|
// Calls to nanovg drawing API should be wrapped in nvgBeginFrame() & nvgEndFrame()
|
||||||
|
// nvgBeginFrame() defines the size of the window to render to in relation currently
|
||||||
|
// set viewport (i.e. glViewport on GL backends). Device pixel ration allows to
|
||||||
|
// control the rendering on Hi-DPI devices.
|
||||||
|
// For example, GLFW returns two dimension for an opened window: window size and
|
||||||
|
// frame buffer size. In that case you would set windowWidth/Height to the window size
|
||||||
|
// devicePixelRatio to: frameBufferWidth / windowWidth.
|
||||||
|
// AlphaBlend controls if drawing the shapes to the render target should be done using straight or
|
||||||
|
// premultiplied alpha. If rendering directly to framebuffer you probably want to use NVG_STRAIGHT_ALPHA,
|
||||||
|
// if rendering to texture which should contain transparent regions NVG_PREMULTIPLIED_ALPHA is the
|
||||||
|
// right choice.
|
||||||
|
void nvgBeginFrame(struct NVGcontext* ctx, int windowWidth, int windowHeight, float devicePixelRatio, int alphaBlend);
|
||||||
|
|
||||||
|
// Ends drawing flushing remaining render state.
|
||||||
|
void nvgEndFrame(struct NVGcontext* ctx);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Color utils
|
||||||
|
//
|
||||||
|
// Colors in NanoVG are stored as unsigned ints in ABGR format.
|
||||||
|
|
||||||
|
// Returns a color value from red, green, blue values. Alpha will be set to 255 (1.0f).
|
||||||
|
struct NVGcolor nvgRGB(unsigned char r, unsigned char g, unsigned char b);
|
||||||
|
|
||||||
|
// Returns a color value from red, green, blue values. Alpha will be set to 1.0f.
|
||||||
|
struct NVGcolor nvgRGBf(float r, float g, float b);
|
||||||
|
|
||||||
|
|
||||||
|
// Returns a color value from red, green, blue and alpha values.
|
||||||
|
struct NVGcolor nvgRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
|
||||||
|
|
||||||
|
// Returns a color value from red, green, blue and alpha values.
|
||||||
|
struct NVGcolor nvgRGBAf(float r, float g, float b, float a);
|
||||||
|
|
||||||
|
|
||||||
|
// Linearly interpoaltes from color c0 to c1, and returns resulting color value.
|
||||||
|
struct NVGcolor nvgLerpRGBA(struct NVGcolor c0, struct NVGcolor c1, float u);
|
||||||
|
|
||||||
|
// Sets transparency of a color value.
|
||||||
|
struct NVGcolor nvgTransRGBA(struct NVGcolor c0, unsigned char a);
|
||||||
|
|
||||||
|
// Sets transparency of a color value.
|
||||||
|
struct NVGcolor nvgTransRGBAf(struct NVGcolor c0, float a);
|
||||||
|
|
||||||
|
// Returns color value specified by hue, saturation and lightness.
|
||||||
|
// HSL values are all in range [0..1], alpha will be set to 255.
|
||||||
|
struct NVGcolor nvgHSL(float h, float s, float l);
|
||||||
|
|
||||||
|
// Returns color value specified by hue, saturation and lightness and alpha.
|
||||||
|
// HSL values are all in range [0..1], alpha in range [0..255]
|
||||||
|
struct NVGcolor nvgHSLA(float h, float s, float l, unsigned char a);
|
||||||
|
|
||||||
|
//
|
||||||
|
// State Handling
|
||||||
|
//
|
||||||
|
// NanoVG contains state which represents how paths will be rendered.
|
||||||
|
// The state contains transform, fill and stroke styles, text and font styles,
|
||||||
|
// and scissor clipping.
|
||||||
|
|
||||||
|
// Pushes and saves the current render state into a state stack.
|
||||||
|
// A matching nvgRestore() must be used to restore the state.
|
||||||
|
void nvgSave(struct NVGcontext* ctx);
|
||||||
|
|
||||||
|
// Pops and restores current render state.
|
||||||
|
void nvgRestore(struct NVGcontext* ctx);
|
||||||
|
|
||||||
|
// Resets current render state to default values. Does not affect the render state stack.
|
||||||
|
void nvgReset(struct NVGcontext* ctx);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Render styles
|
||||||
|
//
|
||||||
|
// Fill and stroke render style can be either a solid color or a paint which is a gradient or a pattern.
|
||||||
|
// Solid color is simply defined as a color value, different kinds of paints can be created
|
||||||
|
// using nvgLinearGradient(), nvgBoxGradient(), nvgRadialGradient() and nvgImagePattern().
|
||||||
|
//
|
||||||
|
// Current render style can be saved and restored using nvgSave() and nvgRestore().
|
||||||
|
|
||||||
|
// Sets current stroke style to a solid color.
|
||||||
|
void nvgStrokeColor(struct NVGcontext* ctx, struct NVGcolor color);
|
||||||
|
|
||||||
|
// Sets current stroke style to a paint, which can be a one of the gradients or a pattern.
|
||||||
|
void nvgStrokePaint(struct NVGcontext* ctx, struct NVGpaint paint);
|
||||||
|
|
||||||
|
// Sets current fill cstyle to a solid color.
|
||||||
|
void nvgFillColor(struct NVGcontext* ctx, struct NVGcolor color);
|
||||||
|
|
||||||
|
// Sets current fill style to a paint, which can be a one of the gradients or a pattern.
|
||||||
|
void nvgFillPaint(struct NVGcontext* ctx, struct NVGpaint paint);
|
||||||
|
|
||||||
|
// Sets the miter limit of the stroke style.
|
||||||
|
// Miter limit controls when a sharp corner is beveled.
|
||||||
|
void nvgMiterLimit(struct NVGcontext* ctx, float limit);
|
||||||
|
|
||||||
|
// Sets the stroke witdth of the stroke style.
|
||||||
|
void nvgStrokeWidth(struct NVGcontext* ctx, float size);
|
||||||
|
|
||||||
|
// Sets how the end of the line (cap) is drawn,
|
||||||
|
// Can be one of: NVG_BUTT (default), NVG_ROUND, NVG_SQUARE.
|
||||||
|
void nvgLineCap(struct NVGcontext* ctx, int cap);
|
||||||
|
|
||||||
|
// Sets how sharp path corners are drawn.
|
||||||
|
// Can be one of NVG_MITER (default), NVG_ROUND, NVG_BEVEL.
|
||||||
|
void nvgLineJoin(struct NVGcontext* ctx, int join);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Transforms
|
||||||
|
//
|
||||||
|
// The paths, gradients, patterns and scissor region are transformed by an transformation
|
||||||
|
// matrix at the time when they are passed to the API.
|
||||||
|
// The current transformation matrix is a affine matrix:
|
||||||
|
// [sx kx tx]
|
||||||
|
// [ky sy ty]
|
||||||
|
// [ 0 0 1]
|
||||||
|
// Where: sx,sy define scaling, kx,ky skewing, and tx,ty translation.
|
||||||
|
// The last row is assumed to be 0,0,1 and is not stored.
|
||||||
|
//
|
||||||
|
// Apart from nvgResetTransform(), each transformation function first creates
|
||||||
|
// specific transformation matrix and pre-multiplies the current transformation by it.
|
||||||
|
//
|
||||||
|
// Current coordinate system (transformation) can be saved and restored using nvgSave() and nvgRestore().
|
||||||
|
|
||||||
|
// Resets current transform to a identity matrix.
|
||||||
|
void nvgResetTransform(struct NVGcontext* ctx);
|
||||||
|
|
||||||
|
// Premultiplies current coordinate system by specified matrix.
|
||||||
|
// The parameters are interpreted as matrix as follows:
|
||||||
|
// [a c e]
|
||||||
|
// [b d f]
|
||||||
|
// [0 0 1]
|
||||||
|
void nvgTransform(struct NVGcontext* ctx, float a, float b, float c, float d, float e, float f);
|
||||||
|
|
||||||
|
// Translates current coordinate system.
|
||||||
|
void nvgTranslate(struct NVGcontext* ctx, float x, float y);
|
||||||
|
|
||||||
|
// Rotates current coordinate system.
|
||||||
|
void nvgRotate(struct NVGcontext* ctx, float angle);
|
||||||
|
|
||||||
|
// Scales the current coordinat system.
|
||||||
|
void nvgScale(struct NVGcontext* ctx, float x, float y);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Images
|
||||||
|
//
|
||||||
|
// NanoVG allows you to load jpg, png, psd, tga, pic and gif files to be used for rendering.
|
||||||
|
// In addition you can upload your own image. The image loading is provided by stb_image.
|
||||||
|
|
||||||
|
// Creates image by loading it from the disk from specified file name.
|
||||||
|
// Returns handle to the image.
|
||||||
|
int nvgCreateImage(struct NVGcontext* ctx, const char* filename);
|
||||||
|
|
||||||
|
// Creates image by loading it from the specified chunk of memory.
|
||||||
|
// Returns handle to the image.
|
||||||
|
int nvgCreateImageMem(struct NVGcontext* ctx, unsigned char* data, int ndata);
|
||||||
|
|
||||||
|
// Creates image from specified image data.
|
||||||
|
// Returns handle to the image.
|
||||||
|
int nvgCreateImageRGBA(struct NVGcontext* ctx, int w, int h, const unsigned char* data);
|
||||||
|
|
||||||
|
// Updates image data specified by image handle.
|
||||||
|
void nvgUpdateImage(struct NVGcontext* ctx, int image, const unsigned char* data);
|
||||||
|
|
||||||
|
// Returns the domensions of a created image.
|
||||||
|
void nvgImageSize(struct NVGcontext* ctx, int image, int* w, int* h);
|
||||||
|
|
||||||
|
// Deletes created image.
|
||||||
|
void nvgDeleteImage(struct NVGcontext* ctx, int image);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Paints
|
||||||
|
//
|
||||||
|
// NanoVG supports four types of paints: linear gradient, box gradient, radial gradient and image pattern.
|
||||||
|
// These can be used as paints for strokes and fills.
|
||||||
|
|
||||||
|
// Creates and returns a linear gradient. Parameters (sx,sy)-(ex,ey) specify the start and end coordinates
|
||||||
|
// of the linear gradient, icol specifies the start color and ocol the end color.
|
||||||
|
// The gradient is transformed by the current transform when it is passed to nvgFillPaint() or nvgStrokePaint().
|
||||||
|
struct NVGpaint nvgLinearGradient(struct NVGcontext* ctx, float sx, float sy, float ex, float ey,
|
||||||
|
struct NVGcolor icol, struct NVGcolor ocol);
|
||||||
|
|
||||||
|
// Creates and returns a box gradient. Box gradient is a feathered rounded rectangle, it is useful for rendering
|
||||||
|
// drop shadows or hilights for boxes. Parameters (x,y) define the top-left corner of the rectangle,
|
||||||
|
// (w,h) define the size of the rectangle, r defines the corner radius, and f feather. Feather defines how blurry
|
||||||
|
// the border of the rectangle is. Parameter icol specifies the inner color and ocol the outer color of the gradient.
|
||||||
|
// The gradient is transformed by the current transform when it is passed to nvgFillPaint() or nvgStrokePaint().
|
||||||
|
struct NVGpaint nvgBoxGradient(struct NVGcontext* ctx, float x, float y, float w, float h,
|
||||||
|
float r, float f, struct NVGcolor icol, struct NVGcolor ocol);
|
||||||
|
|
||||||
|
// Creates and returns a radial gradient. Parameters (cx,cy) specify the center, inr and outr specify
|
||||||
|
// the inner and outer radius of the gradient, icol specifies the start color and ocol the end color.
|
||||||
|
// The gradient is transformed by the current transform when it is passed to nvgFillPaint() or nvgStrokePaint().
|
||||||
|
struct NVGpaint nvgRadialGradient(struct NVGcontext* ctx, float cx, float cy, float inr, float outr,
|
||||||
|
struct NVGcolor icol, struct NVGcolor ocol);
|
||||||
|
|
||||||
|
// Creates and returns an image patter. Parameters (ox,oy) specify the left-top location of the image pattern,
|
||||||
|
// (ex,ey) the size of one image, angle rotation around the top-left corner, image is handle to the image to render,
|
||||||
|
// and repeat is combination of NVG_REPEATX and NVG_REPEATY which tells if the image should be repeated across x or y.
|
||||||
|
// The gradient is transformed by the current transform when it is passed to nvgFillPaint() or nvgStrokePaint().
|
||||||
|
struct NVGpaint nvgImagePattern(struct NVGcontext* ctx, float ox, float oy, float ex, float ey,
|
||||||
|
float angle, int image, int repeat);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Scissoring
|
||||||
|
//
|
||||||
|
// Scissoring allows you to clip the rendering into a rectangle. This is useful for varius
|
||||||
|
// user interface cases like rendering a text edit or a timeline.
|
||||||
|
|
||||||
|
// Sets the current
|
||||||
|
// The scissor rectangle is transformed by the current transform.
|
||||||
|
void nvgScissor(struct NVGcontext* ctx, float x, float y, float w, float h);
|
||||||
|
|
||||||
|
// Reset and disables scissoring.
|
||||||
|
void nvgResetScissor(struct NVGcontext* ctx);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Paths
|
||||||
|
//
|
||||||
|
// Drawing a new shape starts with nvgBeginPath(), it clears all the currently defined paths.
|
||||||
|
// Then you define one or more paths and sub-paths which describe the shape. The are functions
|
||||||
|
// to draw common shapes like rectangles and circles, and lower level step-by-step functions,
|
||||||
|
// which allow to define a path curve by curve.
|
||||||
|
//
|
||||||
|
// NanoVG uses even-odd fill rule to draw the shapes. Solid shapes should have counter clockwise
|
||||||
|
// winding and holes should have counter clockwise order. To specify winding of a path you can
|
||||||
|
// call nvgPathWinding(). This is useful especially for the common shapes, which are drawn CCW.
|
||||||
|
//
|
||||||
|
// Finally you can fill the path using current fill style by calling nvgFill(), and stroke it
|
||||||
|
// with current stroke style by calling nvgStroke().
|
||||||
|
//
|
||||||
|
// The curve segments and sub-paths are transformed by the current transform.
|
||||||
|
|
||||||
|
// Clears the current path and sub-paths.
|
||||||
|
void nvgBeginPath(struct NVGcontext* ctx);
|
||||||
|
|
||||||
|
// Starts new sub-path with specified point as first point.
|
||||||
|
void nvgMoveTo(struct NVGcontext* ctx, float x, float y);
|
||||||
|
|
||||||
|
// Adds line segment from the last point in the path to the specified point.
|
||||||
|
void nvgLineTo(struct NVGcontext* ctx, float x, float y);
|
||||||
|
|
||||||
|
// Adds bezier segment from last point in the path via two control points to the specified point.
|
||||||
|
void nvgBezierTo(struct NVGcontext* ctx, float c1x, float c1y, float c2x, float c2y, float x, float y);
|
||||||
|
|
||||||
|
// Adds an arc segment at the corner defined by the last path point, and two specified points.
|
||||||
|
void nvgArcTo(struct NVGcontext* ctx, float x1, float y1, float x2, float y2, float radius);
|
||||||
|
|
||||||
|
// Closes current sub-path with a line segment.
|
||||||
|
void nvgClosePath(struct NVGcontext* ctx);
|
||||||
|
|
||||||
|
// Sets the current sub-path winding, see NVGwinding and NVGsolidity.
|
||||||
|
void nvgPathWinding(struct NVGcontext* ctx, int dir);
|
||||||
|
|
||||||
|
// Creates new arc shaped sub-path.
|
||||||
|
void nvgArc(struct NVGcontext* ctx, float cx, float cy, float r, float a0, float a1, int dir);
|
||||||
|
|
||||||
|
// Creates new rectangle shaped sub-path.
|
||||||
|
void nvgRect(struct NVGcontext* ctx, float x, float y, float w, float h);
|
||||||
|
|
||||||
|
// Creates new rounded rectangle shaped sub-path.
|
||||||
|
void nvgRoundedRect(struct NVGcontext* ctx, float x, float y, float w, float h, float r);
|
||||||
|
|
||||||
|
// Creates new ellipse shaped sub-path.
|
||||||
|
void nvgEllipse(struct NVGcontext* ctx, float cx, float cy, float rx, float ry);
|
||||||
|
|
||||||
|
// Creates new circle shaped sub-path.
|
||||||
|
void nvgCircle(struct NVGcontext* ctx, float cx, float cy, float r);
|
||||||
|
|
||||||
|
// Fills the current path with current fill style.
|
||||||
|
void nvgFill(struct NVGcontext* ctx);
|
||||||
|
|
||||||
|
// Fills the current path with current stroke style.
|
||||||
|
void nvgStroke(struct NVGcontext* ctx);
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Text
|
||||||
|
//
|
||||||
|
// NanoVG allows you to load .ttf files and use the font to render text.
|
||||||
|
//
|
||||||
|
// The appearance of the text can be defined by setting the current text style
|
||||||
|
// and by specifying the fill color. Common text and font settings such as
|
||||||
|
// font size, letter spacing and text align are supported. Font blur allows you
|
||||||
|
// to create simple text effects such as drop shadows.
|
||||||
|
//
|
||||||
|
// At render time the font face can be set based on the font handles or name.
|
||||||
|
//
|
||||||
|
// Font measure functions return values in local space, the calculations are
|
||||||
|
// carried in the same resolution as the final rendering. This is done because
|
||||||
|
// the text glyph positions are snapped to the nearest pixels sharp rendering.
|
||||||
|
//
|
||||||
|
// The local space means that values are not rotated or scale as per the current
|
||||||
|
// transformation. For example if you set font size to 12, which would mean that
|
||||||
|
// line height is 16, then regardless of the current scaling and rotation, the
|
||||||
|
// returned line height is always 16. Some measures may vary because of the scaling
|
||||||
|
// since aforementioned pixel snapping.
|
||||||
|
//
|
||||||
|
// While this may sound a little odd, the setup allows you to always render the
|
||||||
|
// same way regardless of scaling. I.e. following works regardless of scaling:
|
||||||
|
//
|
||||||
|
// const char* txt = "Text me up.";
|
||||||
|
// nvgTextBounds(vg, x,y, txt, NULL, bounds);
|
||||||
|
// nvgBeginPath(vg);
|
||||||
|
// nvgRoundedRect(vg, bounds[0],bounds[1], bounds[2]-bounds[0], bounds[3]-bounds[1]);
|
||||||
|
// nvgFill(vg);
|
||||||
|
//
|
||||||
|
// Note: currently only solid color fill is supported for text.
|
||||||
|
|
||||||
|
// Creates font by loading it from the disk from specified file name.
|
||||||
|
// Returns handle to the font.
|
||||||
|
int nvgCreateFont(struct NVGcontext* ctx, const char* name, const char* filename);
|
||||||
|
|
||||||
|
// Creates image by loading it from the specified memory chunk.
|
||||||
|
// Returns handle to the font.
|
||||||
|
int nvgCreateFontMem(struct NVGcontext* ctx, const char* name, unsigned char* data, int ndata, int freeData);
|
||||||
|
|
||||||
|
// Finds a loaded font of specified name, and returns handle to it, or -1 if the font is not found.
|
||||||
|
int nvgFindFont(struct NVGcontext* ctx, const char* name);
|
||||||
|
|
||||||
|
// Sets the font size of current text style.
|
||||||
|
void nvgFontSize(struct NVGcontext* ctx, float size);
|
||||||
|
|
||||||
|
// Sets the blur of current text style.
|
||||||
|
void nvgFontBlur(struct NVGcontext* ctx, float blur);
|
||||||
|
|
||||||
|
// Sets the letter spacing of current text style.
|
||||||
|
void nvgTextLetterSpacing(struct NVGcontext* ctx, float spacing);
|
||||||
|
|
||||||
|
// Sets the proportional line height of current text style. The line height is specified as multiple of font size.
|
||||||
|
void nvgTextLineHeight(struct NVGcontext* ctx, float lineHeight);
|
||||||
|
|
||||||
|
// Sets the text align of current text style, see NVGaling for options.
|
||||||
|
void nvgTextAlign(struct NVGcontext* ctx, int align);
|
||||||
|
|
||||||
|
// Sets the font face based on specified id of current text style.
|
||||||
|
void nvgFontFaceId(struct NVGcontext* ctx, int font);
|
||||||
|
|
||||||
|
// Sets the font face based on specified name of current text style.
|
||||||
|
void nvgFontFace(struct NVGcontext* ctx, const char* font);
|
||||||
|
|
||||||
|
// Draws text string at specified location. If end is specified only the sub-string up to the end is drawn.
|
||||||
|
float nvgText(struct NVGcontext* ctx, float x, float y, const char* string, const char* end);
|
||||||
|
|
||||||
|
// Draws multi-line text string at specified location wrapped at the specified width. If end is specified only the sub-string up to the end is drawn.
|
||||||
|
// White space is stripped at the beginning of the rows, the text is split at word boundaries or when new-line characters are encountered.
|
||||||
|
// Words longer than the max width are slit at nearest character (i.e. no hyphenation).
|
||||||
|
void nvgTextBox(struct NVGcontext* ctx, float x, float y, float breakRowWidth, const char* string, const char* end);
|
||||||
|
|
||||||
|
// Measures the specified text string. Parameter bounds should be a pointer to float[4],
|
||||||
|
// if the bounding box of the text should be returned. The bounds value are [xmin,ymin, xmax,ymax]
|
||||||
|
// Returns the horizontal advance of the measured text (i.e. where the next character should drawn).
|
||||||
|
// Measured values are returned in local coordinate space.
|
||||||
|
float nvgTextBounds(struct NVGcontext* ctx, float x, float y, const char* string, const char* end, float* bounds);
|
||||||
|
|
||||||
|
// Measures the specified multi-text string. Parameter bounds should be a pointer to float[4],
|
||||||
|
// if the bounding box of the text should be returned. The bounds value are [xmin,ymin, xmax,ymax]
|
||||||
|
// Measured values are returned in local coordinate space.
|
||||||
|
void nvgTextBoxBounds(struct NVGcontext* ctx, float x, float y, float breakRowWidth, const char* string, const char* end, float* bounds);
|
||||||
|
|
||||||
|
// Calculates the glyph x positions of the specified text. If end is specified only the sub-string will be used.
|
||||||
|
// Measured values are returned in local coordinate space.
|
||||||
|
int nvgTextGlyphPositions(struct NVGcontext* ctx, float x, float y, const char* string, const char* end, struct NVGglyphPosition* positions, int maxPositions);
|
||||||
|
|
||||||
|
// Returns the vertical metrics based on the current text style.
|
||||||
|
// Measured values are returned in local coordinate space.
|
||||||
|
void nvgTextMetrics(struct NVGcontext* ctx, float* ascender, float* descender, float* lineh);
|
||||||
|
|
||||||
|
// Breaks the specified text into lines. If end is specified only the sub-string will be used.
|
||||||
|
// White space is stripped at the beginning of the rows, the text is split at word boundaries or when new-line characters are encountered.
|
||||||
|
// Words longer than the max width are slit at nearest character (i.e. no hyphenation).
|
||||||
|
int nvgTextBreakLines(struct NVGcontext* ctx, const char* string, const char* end, float breakRowWidth, struct NVGtextRow* rows, int maxRows);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Internal Render API
|
||||||
|
//
|
||||||
|
enum NVGtexture {
|
||||||
|
NVG_TEXTURE_ALPHA = 0x01,
|
||||||
|
NVG_TEXTURE_RGBA = 0x02,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct NVGscissor
|
||||||
|
{
|
||||||
|
float xform[6];
|
||||||
|
float extent[2];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct NVGvertex {
|
||||||
|
float x,y,u,v;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct NVGpath {
|
||||||
|
int first;
|
||||||
|
int count;
|
||||||
|
unsigned char closed;
|
||||||
|
int nbevel;
|
||||||
|
struct NVGvertex* fill;
|
||||||
|
int nfill;
|
||||||
|
struct NVGvertex* stroke;
|
||||||
|
int nstroke;
|
||||||
|
int winding;
|
||||||
|
int convex;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct NVGparams {
|
||||||
|
void* userPtr;
|
||||||
|
int atlasWidth, atlasHeight;
|
||||||
|
int edgeAntiAlias;
|
||||||
|
int (*renderCreate)(void* uptr);
|
||||||
|
int (*renderCreateTexture)(void* uptr, int type, int w, int h, const unsigned char* data);
|
||||||
|
int (*renderDeleteTexture)(void* uptr, int image);
|
||||||
|
int (*renderUpdateTexture)(void* uptr, int image, int x, int y, int w, int h, const unsigned char* data);
|
||||||
|
int (*renderGetTextureSize)(void* uptr, int image, int* w, int* h);
|
||||||
|
void (*renderViewport)(void* uptr, int width, int height, int alphaBlend);
|
||||||
|
void (*renderFlush)(void* uptr, int alphaBlend);
|
||||||
|
void (*renderFill)(void* uptr, struct NVGpaint* paint, struct NVGscissor* scissor, float fringe, const float* bounds, const struct NVGpath* paths, int npaths);
|
||||||
|
void (*renderStroke)(void* uptr, struct NVGpaint* paint, struct NVGscissor* scissor, float fringe, float strokeWidth, const struct NVGpath* paths, int npaths);
|
||||||
|
void (*renderTriangles)(void* uptr, struct NVGpaint* paint, struct NVGscissor* scissor, const struct NVGvertex* verts, int nverts);
|
||||||
|
void (*renderDelete)(void* uptr);
|
||||||
|
};
|
||||||
|
|
||||||
|
// Contructor and destructor, called by the render back-end.
|
||||||
|
struct NVGcontext* nvgCreateInternal(struct NVGparams* params);
|
||||||
|
void nvgDeleteInternal(struct NVGcontext* ctx);
|
||||||
|
|
||||||
|
// Debug function to dump cached path data.
|
||||||
|
void nvgDebugDumpPathCache(struct NVGcontext* ctx);
|
||||||
|
|
||||||
|
//
|
||||||
|
struct NVGcontext* nvgCreate(int atlasw, int atlash, int edgeaa);
|
||||||
|
|
||||||
|
//
|
||||||
|
void nvgDelete(struct NVGcontext* ctx);
|
||||||
|
|
||||||
|
// Compiler references
|
||||||
|
// http://sourceforge.net/p/predef/wiki/Compilers/
|
||||||
|
#if _MSC_VER >= 1800
|
||||||
|
// VS 2013 seems to be too smart for school, it will still list the variable as unused if passed into sizeof().
|
||||||
|
#define NVG_NOTUSED(v) do { (void)(v); } while(0)
|
||||||
|
#else
|
||||||
|
#define NVG_NOTUSED(v) (void)sizeof(v)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // NANOVG_H
|
1010
examples/common/nanovg/nanovg_bgfx.cpp
Normal file
5
examples/common/nanovg/varying.def.sc
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
vec2 v_position : TEXCOORD0 = vec2(0.0, 0.0);
|
||||||
|
vec2 v_texcoord0 : TEXCOORD1 = vec2(0.0, 0.0);
|
||||||
|
|
||||||
|
vec2 a_position : POSITION;
|
||||||
|
vec2 a_texcoord0 : TEXCOORD0;
|
122
examples/common/nanovg/vs_nanovg_fill.bin.h
Normal file
|
@ -0,0 +1,122 @@
|
||||||
|
static const uint8_t vs_nanovg_fill_glsl[484] =
|
||||||
|
{
|
||||||
|
0x56, 0x53, 0x48, 0x02, 0xcf, 0xda, 0x1b, 0x94, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie
|
||||||
|
0x77, 0x53, 0x69, 0x7a, 0x65, 0x05, 0x01, 0x00, 0x00, 0x01, 0x00, 0xc4, 0x01, 0x00, 0x00, 0x61, // wSize..........a
|
||||||
|
0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, // ttribute mediump
|
||||||
|
0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // vec2 a_position
|
||||||
|
0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x6d, 0x65, 0x64, 0x69, // ;.attribute medi
|
||||||
|
0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, // ump vec2 a_texco
|
||||||
|
0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x6d, 0x65, // ord0;.varying me
|
||||||
|
0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x70, 0x6f, 0x73, // diump vec2 v_pos
|
||||||
|
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x6d, // ition;.varying m
|
||||||
|
0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, // ediump vec2 v_te
|
||||||
|
0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, // xcoord0;.uniform
|
||||||
|
0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x75, 0x5f, // mediump vec2 u_
|
||||||
|
0x76, 0x69, 0x65, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, // viewSize;.void m
|
||||||
|
0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x70, 0x6f, 0x73, // ain ().{. v_pos
|
||||||
|
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // ition = a_positi
|
||||||
|
0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // on;. v_texcoord
|
||||||
|
0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, // 0 = a_texcoord0;
|
||||||
|
0x0a, 0x20, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, // . mediump vec4
|
||||||
|
0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, // tmpvar_1;. tmpv
|
||||||
|
0x61, 0x72, 0x5f, 0x31, 0x2e, 0x7a, 0x77, 0x20, 0x3d, 0x20, 0x76, 0x65, 0x63, 0x32, 0x28, 0x30, // ar_1.zw = vec2(0
|
||||||
|
0x2e, 0x30, 0x2c, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, // .0, 1.0);. tmpv
|
||||||
|
0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x20, 0x3d, 0x20, 0x28, 0x28, 0x28, 0x32, 0x2e, 0x30, 0x20, // ar_1.x = (((2.0
|
||||||
|
0x2a, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x78, 0x29, 0x20, // * a_position.x)
|
||||||
|
0x2f, 0x20, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x2e, 0x78, 0x29, 0x20, // / u_viewSize.x)
|
||||||
|
0x2d, 0x20, 0x31, 0x2e, 0x30, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // - 1.0);. tmpvar
|
||||||
|
0x5f, 0x31, 0x2e, 0x79, 0x20, 0x3d, 0x20, 0x28, 0x31, 0x2e, 0x30, 0x20, 0x2d, 0x20, 0x28, 0x28, // _1.y = (1.0 - ((
|
||||||
|
0x32, 0x2e, 0x30, 0x20, 0x2a, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, // 2.0 * a_position
|
||||||
|
0x2e, 0x79, 0x29, 0x20, 0x2f, 0x20, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x53, 0x69, 0x7a, 0x65, // .y) / u_viewSize
|
||||||
|
0x2e, 0x79, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, // .y));. gl_Posit
|
||||||
|
0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, // ion = tmpvar_1;.
|
||||||
|
0x7d, 0x0a, 0x0a, 0x00, // }...
|
||||||
|
};
|
||||||
|
static const uint8_t vs_nanovg_fill_dx9[378] =
|
||||||
|
{
|
||||||
|
0x56, 0x53, 0x48, 0x02, 0xcf, 0xda, 0x1b, 0x94, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie
|
||||||
|
0x77, 0x53, 0x69, 0x7a, 0x65, 0x05, 0x01, 0x00, 0x00, 0x01, 0x00, 0x5c, 0x01, 0x00, 0x03, 0xfe, // wSize...........
|
||||||
|
0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...".CTAB....S..
|
||||||
|
0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, // ................
|
||||||
|
0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // .L...0..........
|
||||||
|
0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x53, // .<.......u_viewS
|
||||||
|
0x69, 0x7a, 0x65, 0x00, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, // ize.............
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....vs_3_0.Micr
|
||||||
|
0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S
|
||||||
|
0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, // hader Compiler 9
|
||||||
|
0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x51, 0x00, 0x00, // .29.952.3111.Q..
|
||||||
|
0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, // ............?...
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, // ................
|
||||||
|
0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, // ................
|
||||||
|
0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, // ................
|
||||||
|
0x80, 0x01, 0x00, 0x03, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x01, 0x80, 0x02, 0x00, 0x03, // ................
|
||||||
|
0xe0, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, // ................
|
||||||
|
0x03, 0x00, 0x00, 0x06, 0x80, 0x00, 0x00, 0xd0, 0x90, 0x00, 0x00, 0xd0, 0x90, 0x04, 0x00, 0x00, // ................
|
||||||
|
0x04, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x55, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, // .......U........
|
||||||
|
0xa0, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x04, 0x00, 0x00, // ...........U....
|
||||||
|
0x04, 0x00, 0x00, 0x02, 0xe0, 0x00, 0x00, 0xaa, 0x80, 0x00, 0x00, 0x00, 0x81, 0x01, 0x00, 0x55, // ...............U
|
||||||
|
0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0c, 0xe0, 0x01, 0x00, 0x64, 0xa0, 0x01, 0x00, 0x00, // ...........d....
|
||||||
|
0x02, 0x01, 0x00, 0x03, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x03, // ................
|
||||||
|
0xe0, 0x01, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ..........
|
||||||
|
};
|
||||||
|
static const uint8_t vs_nanovg_fill_dx11[927] =
|
||||||
|
{
|
||||||
|
0x56, 0x53, 0x48, 0x02, 0xcf, 0xda, 0x1b, 0x94, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie
|
||||||
|
0x77, 0x53, 0x69, 0x7a, 0x65, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x03, 0x44, 0x58, 0x42, // wSize......p.DXB
|
||||||
|
0x43, 0x8b, 0x9a, 0x0e, 0x46, 0x1f, 0x82, 0x67, 0x51, 0x86, 0xb5, 0x12, 0xb7, 0x89, 0xa7, 0x1e, // C...F..gQ.......
|
||||||
|
0x1b, 0x01, 0x00, 0x00, 0x00, 0x70, 0x03, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, // .....p.......4..
|
||||||
|
0x00, 0x04, 0x01, 0x00, 0x00, 0x58, 0x01, 0x00, 0x00, 0xc8, 0x01, 0x00, 0x00, 0xf4, 0x02, 0x00, // .....X..........
|
||||||
|
0x00, 0x52, 0x44, 0x45, 0x46, 0xc8, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, // .RDEF........H..
|
||||||
|
0x00, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x04, 0xfe, 0xff, 0x00, 0x91, 0x00, // ................
|
||||||
|
0x00, 0x94, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .....<..........
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x73, 0x00, 0xab, 0xab, // .....$Globals...
|
||||||
|
0xab, 0x3c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, // .<.......`......
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........x......
|
||||||
|
0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x00, 0xab, 0x01, 0x00, 0x03, // .u_viewSize.....
|
||||||
|
0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d, 0x69, 0x63, // .............Mic
|
||||||
|
0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, // rosoft (R) HLSL
|
||||||
|
0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, // Shader Compiler
|
||||||
|
0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, // 9.29.952.3111...
|
||||||
|
0xab, 0x49, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, // .ISGNL..........
|
||||||
|
0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // .8..............
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........A......
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, // ................
|
||||||
|
0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, // .POSITION.TEXCOO
|
||||||
|
0x52, 0x44, 0x00, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, // RD...OSGNh......
|
||||||
|
0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // .....P..........
|
||||||
|
0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x03, 0x0c, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x53, 0x56, 0x5f, // .............SV_
|
||||||
|
0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, // POSITION.TEXCOOR
|
||||||
|
0x44, 0x00, 0xab, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0x24, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, // D....SHDR$...@..
|
||||||
|
0x00, 0x49, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, // .I...Y...F. ....
|
||||||
|
0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, // ....._...2......
|
||||||
|
0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, // ._...2.......g..
|
||||||
|
0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, // .. ..........e..
|
||||||
|
0x03, 0x32, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xc2, 0x20, 0x10, // .2 ......e.... .
|
||||||
|
0x00, 0x01, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .....h..........
|
||||||
|
0x07, 0x32, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, // .2.......F......
|
||||||
|
0x00, 0x46, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x08, 0x32, 0x00, 0x10, // .F...........2..
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x80, 0x20, // .....F.......F.
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x12, 0x20, 0x10, // .............. .
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, // ..............@.
|
||||||
|
0x00, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x08, 0x22, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, // ........." .....
|
||||||
|
0x00, 0x1a, 0x00, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, // .....A........@.
|
||||||
|
0x00, 0x00, 0x00, 0x80, 0x3f, 0x36, 0x00, 0x00, 0x08, 0xc2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, // ....?6.... .....
|
||||||
|
0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ..@.............
|
||||||
|
0x00, 0x00, 0x00, 0x80, 0x3f, 0x36, 0x00, 0x00, 0x05, 0x32, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, // ....?6...2 .....
|
||||||
|
0x00, 0x46, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xc2, 0x20, 0x10, // .F.......6.... .
|
||||||
|
0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x14, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, // .............>..
|
||||||
|
0x01, 0x53, 0x54, 0x41, 0x54, 0x74, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // .STATt..........
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, // ................
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, // ...............
|
||||||
|
};
|
11
examples/common/nanovg/vs_nanovg_fill.sc
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
$input a_position, a_texcoord0
|
||||||
|
$output v_position, v_texcoord0
|
||||||
|
|
||||||
|
uniform vec2 u_viewSize;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
v_position = a_position;
|
||||||
|
v_texcoord0 = a_texcoord0;
|
||||||
|
gl_Position = vec4(2.0*v_position.x/u_viewSize.x - 1.0, 1.0 - 2.0*v_position.y/u_viewSize.y, 0.0, 1.0);
|
||||||
|
}
|
|
@ -23,5 +23,7 @@ rebuild:
|
||||||
@make -s --no-print-directory rebuild -C 17-drawstress
|
@make -s --no-print-directory rebuild -C 17-drawstress
|
||||||
@make -s --no-print-directory rebuild -C 18-ibl
|
@make -s --no-print-directory rebuild -C 18-ibl
|
||||||
@make -s --no-print-directory rebuild -C 19-oit
|
@make -s --no-print-directory rebuild -C 19-oit
|
||||||
|
# @make -s --no-print-directory rebuild -C 20-nanovg
|
||||||
@make -s --no-print-directory rebuild -C common/font
|
@make -s --no-print-directory rebuild -C common/font
|
||||||
@make -s --no-print-directory rebuild -C common/imgui
|
@make -s --no-print-directory rebuild -C common/imgui
|
||||||
|
@make -s --no-print-directory rebuild -C common/nanovg
|
||||||
|
|
BIN
examples/runtime/font/entypo.ttf
Normal file
BIN
examples/runtime/font/roboto-bold.ttf
Normal file
BIN
examples/runtime/font/roboto-regular.ttf
Normal file
BIN
examples/runtime/images/image1.jpg
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
examples/runtime/images/image10.jpg
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
examples/runtime/images/image11.jpg
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
examples/runtime/images/image12.jpg
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
examples/runtime/images/image2.jpg
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
examples/runtime/images/image3.jpg
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
examples/runtime/images/image4.jpg
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
examples/runtime/images/image5.jpg
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
examples/runtime/images/image6.jpg
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
examples/runtime/images/image7.jpg
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
examples/runtime/images/image8.jpg
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
examples/runtime/images/image9.jpg
Normal file
After Width: | Height: | Size: 3.9 KiB |
|
@ -171,6 +171,7 @@ exampleProject("16-shadowmaps", "f9a91cb0-7b1b-11e3-981f-0800200c9a66")
|
||||||
exampleProject("17-drawstress", "9aeea4c6-80dc-11e3-b3ca-4da6db0f677b")
|
exampleProject("17-drawstress", "9aeea4c6-80dc-11e3-b3ca-4da6db0f677b")
|
||||||
exampleProject("18-ibl", "711bcbb0-9531-11e3-a5e2-0800200c9a66")
|
exampleProject("18-ibl", "711bcbb0-9531-11e3-a5e2-0800200c9a66")
|
||||||
exampleProject("19-oit", "d7eca4fc-96d7-11e3-a73b-fcafdb0f677b")
|
exampleProject("19-oit", "d7eca4fc-96d7-11e3-a73b-fcafdb0f677b")
|
||||||
|
exampleProject("20-nanovg", "359ce7c4-cd06-11e3-bb8b-6c2f9a125b5a")
|
||||||
|
|
||||||
dofile "makedisttex.lua"
|
dofile "makedisttex.lua"
|
||||||
dofile "shaderc.lua"
|
dofile "shaderc.lua"
|
||||||
|
|