mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 00:58:30 -05:00
Rebuild GLSL debug font shader.
This commit is contained in:
parent
0011a5c7ec
commit
971d07e736
4 changed files with 61 additions and 107 deletions
107
src/charset.h
107
src/charset.h
|
@ -523,111 +523,8 @@ static const uint8_t vga8x16[256*16] =
|
|||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
static const uint8_t vs_debugfont_glsl[462] =
|
||||
{
|
||||
'p', 'r', 'e', 'c', 'i', 's', 'i', 'o',
|
||||
'n', ' ', 'h', 'i', 'g', 'h', 'p', ' ',
|
||||
'f', 'l', 'o', 'a', 't', ';', 0x0a,0x0a,
|
||||
'u', 'n', 'i', 'f', 'o', 'r', 'm', ' ',
|
||||
'm', 'a', 't', '4', ' ', 'u', '_', 'm',
|
||||
'o', 'd', 'e', 'l', 'V', 'i', 'e', 'w',
|
||||
'P', 'r', 'o', 'j', ';', 0x0a,'v', 'a',
|
||||
'r', 'y', 'i', 'n', 'g', ' ', 'v', 'e',
|
||||
'c', '4', ' ', 'v', '_', 'c', 'o', 'l',
|
||||
'o', 'r', '1', ';', 0x0a,'v', 'a', 'r',
|
||||
'y', 'i', 'n', 'g', ' ', 'v', 'e', 'c',
|
||||
'4', ' ', 'v', '_', 'c', 'o', 'l', 'o',
|
||||
'r', ';', 0x0a,'v', 'a', 'r', 'y', 'i',
|
||||
'n', 'g', ' ', 'v', 'e', 'c', '2', ' ',
|
||||
'v', '_', 't', 'e', 'x', 'c', 'o', 'o',
|
||||
'r', 'd', '0', ';', 0x0a,'a', 't', 't',
|
||||
'r', 'i', 'b', 'u', 't', 'e', ' ', 'v',
|
||||
'e', 'c', '2', ' ', 'a', '_', 't', 'e',
|
||||
'x', 'c', 'o', 'o', 'r', 'd', '0', ';',
|
||||
0x0a,'a', 't', 't', 'r', 'i', 'b', 'u',
|
||||
't', 'e', ' ', 'v', 'e', 'c', '4', ' ',
|
||||
'a', '_', 'c', 'o', 'l', 'o', 'r', '1',
|
||||
';', 0x0a,'a', 't', 't', 'r', 'i', 'b',
|
||||
'u', 't', 'e', ' ', 'v', 'e', 'c', '4',
|
||||
' ', 'a', '_', 'c', 'o', 'l', 'o', 'r',
|
||||
';', 0x0a,'a', 't', 't', 'r', 'i', 'b',
|
||||
'u', 't', 'e', ' ', 'v', 'e', 'c', '3',
|
||||
' ', 'a', '_', 'p', 'o', 's', 'i', 't',
|
||||
'i', 'o', 'n', ';', 0x0a,'v', 'o', 'i',
|
||||
'd', ' ', 'm', 'a', 'i', 'n', ' ', '(',
|
||||
')', 0x0a,'{', 0x0a,' ', ' ', 'v', 'e',
|
||||
'c', '4', ' ', 't', 'm', 'p', 'v', 'a',
|
||||
'r', '_', '1', ';', 0x0a,' ', ' ', 't',
|
||||
'm', 'p', 'v', 'a', 'r', '_', '1', '.',
|
||||
'w', ' ', '=', ' ', '1', '.', '0', ';',
|
||||
0x0a,' ', ' ', 't', 'm', 'p', 'v', 'a',
|
||||
'r', '_', '1', '.', 'x', 'y', 'z', ' ',
|
||||
'=', ' ', 'a', '_', 'p', 'o', 's', 'i',
|
||||
't', 'i', 'o', 'n', ';', 0x0a,' ', ' ',
|
||||
'g', 'l', '_', 'P', 'o', 's', 'i', 't',
|
||||
'i', 'o', 'n', ' ', '=', ' ', '(', 'u',
|
||||
'_', 'm', 'o', 'd', 'e', 'l', 'V', 'i',
|
||||
'e', 'w', 'P', 'r', 'o', 'j', ' ', '*',
|
||||
' ', 't', 'm', 'p', 'v', 'a', 'r', '_',
|
||||
'1', ')', ';', 0x0a,' ', ' ', 'v', '_',
|
||||
't', 'e', 'x', 'c', 'o', 'o', 'r', 'd',
|
||||
'0', ' ', '=', ' ', 'a', '_', 't', 'e',
|
||||
'x', 'c', 'o', 'o', 'r', 'd', '0', ';',
|
||||
0x0a,' ', ' ', 'v', '_', 'c', 'o', 'l',
|
||||
'o', 'r', ' ', '=', ' ', '(', 'a', '_',
|
||||
'c', 'o', 'l', 'o', 'r', ' ', '*', ' ',
|
||||
'0', '.', '0', '0', '3', '9', '2', '1',
|
||||
'5', '7', ')', ';', 0x0a,' ', ' ', 'v',
|
||||
'_', 'c', 'o', 'l', 'o', 'r', '1', ' ',
|
||||
'=', ' ', '(', 'a', '_', 'c', 'o', 'l',
|
||||
'o', 'r', '1', ' ', '*', ' ', '0', '.',
|
||||
'0', '0', '3', '9', '2', '1', '5', '7',
|
||||
')', ';', 0x0a,'}', 0x0a,0x0a
|
||||
};
|
||||
|
||||
static const uint8_t fs_debugfont_glsl[320] =
|
||||
{
|
||||
'p', 'r', 'e', 'c', 'i', 's', 'i', 'o',
|
||||
'n', ' ', 'h', 'i', 'g', 'h', 'p', ' ',
|
||||
'f', 'l', 'o', 'a', 't', ';', 0x0a,0x0a,
|
||||
'u', 'n', 'i', 'f', 'o', 'r', 'm', ' ',
|
||||
's', 'a', 'm', 'p', 'l', 'e', 'r', '2',
|
||||
'D', ' ', 'u', '_', 't', 'e', 'x', 'C',
|
||||
'o', 'l', 'o', 'r', ';', 0x0a,'v', 'a',
|
||||
'r', 'y', 'i', 'n', 'g', ' ', 'v', 'e',
|
||||
'c', '4', ' ', 'v', '_', 'c', 'o', 'l',
|
||||
'o', 'r', '1', ';', 0x0a,'v', 'a', 'r',
|
||||
'y', 'i', 'n', 'g', ' ', 'v', 'e', 'c',
|
||||
'4', ' ', 'v', '_', 'c', 'o', 'l', 'o',
|
||||
'r', ';', 0x0a,'v', 'a', 'r', 'y', 'i',
|
||||
'n', 'g', ' ', 'v', 'e', 'c', '2', ' ',
|
||||
'v', '_', 't', 'e', 'x', 'c', 'o', 'o',
|
||||
'r', 'd', '0', ';', 0x0a,'v', 'o', 'i',
|
||||
'd', ' ', 'm', 'a', 'i', 'n', ' ', '(',
|
||||
')', 0x0a,'{', 0x0a,' ', ' ', 'v', 'e',
|
||||
'c', '4', ' ', 't', 'm', 'p', 'v', 'a',
|
||||
'r', '_', '1', ';', 0x0a,' ', ' ', 't',
|
||||
'm', 'p', 'v', 'a', 'r', '_', '1', ' ',
|
||||
'=', ' ', 'm', 'i', 'x', ' ', '(', 'v',
|
||||
'_', 'c', 'o', 'l', 'o', 'r', '1', ',',
|
||||
' ', 'v', '_', 'c', 'o', 'l', 'o', 'r',
|
||||
',', ' ', 't', 'e', 'x', 't', 'u', 'r',
|
||||
'e', '2', 'D', ' ', '(', 'u', '_', 't',
|
||||
'e', 'x', 'C', 'o', 'l', 'o', 'r', ',',
|
||||
' ', 'v', '_', 't', 'e', 'x', 'c', 'o',
|
||||
'o', 'r', 'd', '0', ')', '.', 'x', 'x',
|
||||
'x', 'x', ')', ';', 0x0a,' ', ' ', 'i',
|
||||
'f', ' ', '(', '(', 't', 'm', 'p', 'v',
|
||||
'a', 'r', '_', '1', '.', 'w', ' ', '<',
|
||||
' ', '0', '.', '0', '0', '3', '9', '2',
|
||||
'1', '5', '7', ')', ')', ' ', '{', 0x0a,
|
||||
' ', ' ', ' ', ' ', 'd', 'i', 's', 'c',
|
||||
'a', 'r', 'd', ';', 0x0a,' ', ' ', '}',
|
||||
';', 0x0a,' ', ' ', 'g', 'l', '_', 'F',
|
||||
'r', 'a', 'g', 'C', 'o', 'l', 'o', 'r',
|
||||
' ', '=', ' ', 't', 'm', 'p', 'v', 'a',
|
||||
'r', '_', '1', ';', 0x0a,'}', 0x0a,0x0a
|
||||
};
|
||||
#include "vs_debugfont_glsl.bin.h"
|
||||
#include "fs_debugfont_glsl.bin.h"
|
||||
|
||||
#include "vs_debugfont_dx9.bin.h"
|
||||
#include "fs_debugfont_dx9.bin.h"
|
||||
|
|
25
src/fs_debugfont_glsl.bin.h
Normal file
25
src/fs_debugfont_glsl.bin.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
static const uint8_t fs_debugfont_glsl[352] =
|
||||
{
|
||||
0x23, 0x69, 0x66, 0x64, 0x65, 0x66, 0x20, 0x47, 0x4c, 0x5f, 0x45, 0x53, 0x0a, 0x70, 0x72, 0x65, // #ifdef GL_ES.pre
|
||||
0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, // cision highp flo
|
||||
0x61, 0x74, 0x3b, 0x0a, 0x23, 0x65, 0x6e, 0x64, 0x69, 0x66, 0x20, 0x2f, 0x2f, 0x20, 0x47, 0x4c, // at;.#endif // GL
|
||||
0x5f, 0x45, 0x53, 0x0a, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, // _ES..uniform sam
|
||||
0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, 0x75, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, // pler2D u_texColo
|
||||
0x72, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, // r;.varying vec4
|
||||
0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x31, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, // v_color1;.varyin
|
||||
0x67, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, // g vec4 v_color0;
|
||||
0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, // .varying vec2 v_
|
||||
0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, // texcoord0;.void
|
||||
0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x76, 0x65, 0x63, 0x34, // main ().{. vec4
|
||||
0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, // tmpvar_1;. tmp
|
||||
0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x6d, 0x69, 0x78, 0x20, 0x28, 0x76, 0x5f, 0x63, // var_1 = mix (v_c
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x31, 0x2c, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2c, // olor1, v_color0,
|
||||
0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, 0x44, 0x20, 0x28, 0x75, 0x5f, 0x74, 0x65, // texture2D (u_te
|
||||
0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // xColor, v_texcoo
|
||||
0x72, 0x64, 0x30, 0x29, 0x2e, 0x78, 0x78, 0x78, 0x78, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x69, 0x66, // rd0).xxxx);. if
|
||||
0x20, 0x28, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3c, 0x20, // ((tmpvar_1.w <
|
||||
0x30, 0x2e, 0x30, 0x30, 0x33, 0x39, 0x32, 0x31, 0x35, 0x37, 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x20, // 0.00392157)) {.
|
||||
0x20, 0x20, 0x20, 0x64, 0x69, 0x73, 0x63, 0x61, 0x72, 0x64, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x3b, // discard;. };
|
||||
0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, // . gl_FragColor
|
||||
0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // = tmpvar_1;.}...
|
||||
};
|
|
@ -1050,11 +1050,11 @@ namespace bgfx
|
|||
desc.MipLODBias = 0.0f;
|
||||
desc.MaxAnisotropy = 1;
|
||||
desc.ComparisonFunc = D3D11_COMPARISON_ALWAYS;
|
||||
desc.BorderColor[0] = 0.0f;
|
||||
desc.BorderColor[0] = 0.0f;
|
||||
desc.BorderColor[1] = 0.0f;
|
||||
desc.BorderColor[2] = 0.0f;
|
||||
desc.BorderColor[3] = 0.0f;
|
||||
desc.MinLOD = 0;
|
||||
desc.MinLOD = 0;
|
||||
desc.MaxLOD = D3D11_FLOAT32_MAX;
|
||||
s_renderCtx.m_device->CreateSamplerState(&desc, &m_sampler);
|
||||
|
||||
|
|
32
src/vs_debugfont_glsl.bin.h
Normal file
32
src/vs_debugfont_glsl.bin.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
static const uint8_t vs_debugfont_glsl[464] =
|
||||
{
|
||||
0x23, 0x69, 0x66, 0x64, 0x65, 0x66, 0x20, 0x47, 0x4c, 0x5f, 0x45, 0x53, 0x0a, 0x70, 0x72, 0x65, // #ifdef GL_ES.pre
|
||||
0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x69, 0x67, 0x68, 0x70, 0x20, 0x66, 0x6c, 0x6f, // cision highp flo
|
||||
0x61, 0x74, 0x3b, 0x0a, 0x23, 0x65, 0x6e, 0x64, 0x69, 0x66, 0x20, 0x2f, 0x2f, 0x20, 0x47, 0x4c, // at;.#endif // GL
|
||||
0x5f, 0x45, 0x53, 0x0a, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x61, 0x74, // _ES..uniform mat
|
||||
0x34, 0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, // 4 u_modelViewPro
|
||||
0x6a, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, // j;.varying vec4
|
||||
0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x31, 0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, // v_color1;.varyin
|
||||
0x67, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, // g vec4 v_color0;
|
||||
0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x76, 0x5f, // .varying vec2 v_
|
||||
0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, // texcoord0;.attri
|
||||
0x62, 0x75, 0x74, 0x65, 0x20, 0x76, 0x65, 0x63, 0x32, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, // bute vec2 a_texc
|
||||
0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, // oord0;.attribute
|
||||
0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x31, 0x3b, 0x0a, // vec4 a_color1;.
|
||||
0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x61, // attribute vec4 a
|
||||
0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, // _color;.attribut
|
||||
0x65, 0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // e vec3 a_positio
|
||||
0x6e, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, // n;.void main ().
|
||||
0x7b, 0x0a, 0x20, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // {. vec4 tmpvar_
|
||||
0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, // 1;. tmpvar_1.w
|
||||
0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // = 1.0;. tmpvar_
|
||||
0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, // 1.xyz = a_positi
|
||||
0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, // on;. gl_Positio
|
||||
0x6e, 0x20, 0x3d, 0x20, 0x28, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, // n = (u_modelView
|
||||
0x50, 0x72, 0x6f, 0x6a, 0x20, 0x2a, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x29, // Proj * tmpvar_1)
|
||||
0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, // ;. v_texcoord0
|
||||
0x3d, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x20, // = a_texcoord0;.
|
||||
0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x63, 0x6f, // v_color0 = a_co
|
||||
0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x31, 0x20, // lor;. v_color1
|
||||
0x3d, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // = a_color1;.}...
|
||||
};
|
Loading…
Reference in a new issue