Switch to more compact TextGlyph vertex format

This commit is contained in:
Georg Hagen
2025-01-05 00:02:01 +01:00
parent 47a904f572
commit e9a1c629d9
13 changed files with 249 additions and 248 deletions

View File

@@ -1,22 +1,15 @@
#version 450
//layout(location = 0) in vec4 color;
layout(location = 1) in vec2 texCoord;
layout(location = 0) in vec4 color;
layout(location = 1) in vec4 bgColor;
layout(location = 2) in vec2 texCoord;
layout(location = 0) out vec4 outColor;
layout(set = 2, binding = 0) uniform sampler2D texSampler;
layout(set = 3, binding = 0) uniform TextConfig
{
vec4 textColor;
vec4 backgroundColor;
float threshold;
float smoothing;
} textConfig;
void main()
{
vec4 sampled = vec4(1.0, 1.0, 1.0, texture(texSampler, texCoord).r);
outColor = vec4(textConfig.textColor) * sampled;
outColor = vec4(color) * sampled;
}