Font Fixes

•Only the font alpha channel is decreased.
•Display missing texture for missing glyphs
This commit is contained in:
JacobTech 2024-03-31 19:16:15 -04:00
parent 31fb6d7e43
commit 33f8ef9ee0
3 changed files with 15 additions and 2 deletions

View File

@ -10,7 +10,7 @@
<IncludeSymbols>False</IncludeSymbols>
<RepositoryUrl>https://git.jacobtech.com/JacobTech.com/GraphicsManager</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Version>1.0.8-alpha99</Version>
<Version>1.0.9-alpha01</Version>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">

View File

@ -271,6 +271,19 @@ public class Texture
if (!BadChars.ContainsKey(l))
{
BadChars.Add(l, TextureManager.TextureManagers[con].AddTexture(Tools.GetResourceStream("GraphicsManager.Resources.Textures.BadChar.png")));
BadChars[l].Unit = (s.GetUniformLocation("u_texture") switch
{
0 => TextureUnit.Texture0,
1 => TextureUnit.Texture1,
2 => TextureUnit.Texture2,
3 => TextureUnit.Texture3,
4 => TextureUnit.Texture4,
5 => TextureUnit.Texture5,
6 => TextureUnit.Texture6,
7 => TextureUnit.Texture7,
8 => TextureUnit.Texture8,
9 => TextureUnit.Texture9,
});
Label._characters[con][l].Add(temp, new()
{
Size = Label._characters[con][l].First().Value.Size,

View File

@ -12,5 +12,5 @@ void main()
{
vec2 uv = vUV.xy;
float text = texture(u_texture, uv).r;
fragColor = textColor*text;
fragColor = vec4(textColor.rgb, textColor.a*text);
}